To print Date and Time for Given Date range and it should be cumulative
◷
تاریخ انتشار: 1395/1/26 | ساعت: 12:08
Vote count: 0 public class DateTime { public static java.util.LinkedList searchBetweenDates(java.util.Date startDate, java.util.Date endDate) { java.util.Date begin = new Date(startDate.getTime()); java.util.LinkedList list = new java.util.LinkedList(); list.add(new Date(begin.getTime())); java.util...
C# Make Chart Legend Represent Two Colors
◷
تاریخ انتشار: 1395/1/26 | ساعت: 12:08
Vote count: 0 I created a column chart in my application which look like this: As you can see the positive values are green and the negative values are red. I need to represent this in the legend. I just don't know how. What I already tried: I added CustomItems to the Legend. Here is the code: Legen...
Hacker rank displays wrong output to my solution
◷
تاریخ انتشار: 1395/1/26 | ساعت: 12:08
Vote count: 0 I was trying to solve this problem. https://www.hackerrank.com/challenges/introduction-to-regex The code is working absolutely fine in my PC. But hacker ranks throws error after two runs. Dont know why.. Please help import re n1 = int(input()) for i in (0, n1): n = input() if (re.finda...
Chart.js just disappears for no reason
◷
تاریخ انتشار: 1395/1/26 | ساعت: 10:20
Vote count: 0 I have the chart.js on one of my view's and at first opening the chart looks fine and works as supposed to. However, when I go through the app and retu to the view, the chart just is no longer there. asked 5 mins agoMehdiN Let's block ads! (Why?)
imwrite python not saving image [Mac]
◷
تاریخ انتشار: 1395/1/26 | ساعت: 10:20
Vote count: 0 I am trying to save a frame from a video playback. The code runs without any errors, however, i could not find my saved image in my folder. Below is the script that i have written. I am using python version 3.5 and OpenCV3 on a mac. Any help is greatly appreciated. Thanks in advance. i...
Printf does not work unless another printf is present
◷
تاریخ انتشار: 1395/1/26 | ساعت: 10:20
Vote count: 0 I was trying to solve a challenge in C on HackerRank. There is a square matrix with n rows and columns.The challenge is to print the absolute difference between the two sums of the matrix's diagonals as a single integer. Here's the link: https://www.hackerrank.com/challenges/diagonal-d...
How can I improve efficiency with large datasets (at least I think they're large)?
◷
تاریخ انتشار: 1395/1/26 | ساعت: 9:14
Vote count: 0 I have a database that is modeling data similar to the kind of data you might see collected for sports. I have users and events, and users have roles at these events. Each of these events also has stats and belongs to a category, that are all currently related so: ========= ========== ...
Efficient PHP algorithm go generate all combinations / permutations of inputs
◷
تاریخ انتشار: 1395/1/26 | ساعت: 9:14
Vote count: 0 I'm trying to calculate all combinations of an set of values in an array for a number of inputs. Similar to this Question: PHP algorithm to generate all combinations of a specific size from a single set For example: function sampling($chars, $size, $combinations = array()) { if (empty(...
Breadth First Traversal Algorithm
◷
تاریخ انتشار: 1395/1/26 | ساعت: 9:14
Vote count: 0 For a given n, I am trying to find the smallest number that is divisible by n, and also has sum of digits as n. For example: For n = 10, Output should be 190, For n = 11, Output should be 209 I have adopted the Breadth First Traversal Approach to solve my problem. #include <iostream> #...
login page doesn't show error and doesn't login php
◷
تاریخ انتشار: 1395/1/26 | ساعت: 7:56
Vote count: 0 this validation page doesn't show error and doesn't redirect to the home page. I check if it reach the verifying from the databse and it works fine but doesn't redirect the page so I think that the problem is with "$user = $req->fetch()" help plz if(isset($_POST['login'])){ $use ame = ...
Which event method naming convention is more common?
◷
تاریخ انتشار: 1395/1/26 | ساعت: 7:56
Vote count: 0 There are a minimum of three methods for an event emitter class: one to add an event listener, one to remove an existing event listener, and one to fire an event. jQuery uses on, off, and trigger. node.js's EventEmitter uses on, remove, and emit. I've also seen bind/unbind, addEventLis...
Launch chrome application on startup
◷
تاریخ انتشار: 1395/1/26 | ساعت: 7:56
Vote count: 0 I would like to open a packaged chrome application automatically when the browser starts.I have tried: chrome-extension://app id/But it doesn't work. I get chrome-extension://invalid/ error page. asked 24 secs agoE_bme Let's block ads! (Why?)
Find string value in comma-separated list
◷
تاریخ انتشار: 1395/1/26 | ساعت: 6:51
Vote count: 0 I have a list(string) with members in the form of 'label,location'; labels are distinct. I need a method which accepts a label parameter and retu s a location. I can iterate through using foreach to find the correct label, then manipulate the list member using Split to retu the locatio...
Tornado receive and send notifications from mongodb via websocket
◷
تاریخ انتشار: 1395/1/26 | ساعت: 6:51
Vote count: 0 I am quite a newbie to To ado, Mongodb and Websocket, just following some tutorial examples to gain my knowledge. During the process, I am trying to set up a basic To ado web application that can listen to local Mongodb changes(ex. a new document inserted), and then notify and display ...
Chrome (Android) Keyboard carries word over to next input on js focus change
◷
تاریخ انتشار: 1395/1/26 | ساعت: 6:51
Vote count: 0 I have two inputs, when the first recieves an enter keyup, it focuses to the next one (see the script tag). On Chrome (49) on Android (6.0.1), when you press the -> button on the right-bottom of the keyboard (standard keyboard), it keeps the last word typed in the keyboard and carries ...
Decoding multiple sentences in tensorflow with respect to the sentence dependencies
◷
تاریخ انتشار: 1395/1/26 | ساعت: 5:50
Vote count: 0 the decode function in the translate.py file from the github contains the line model.batch_size = 1 # We decode one sentence at a time. In this example I want to decode not one, but three sentences: This is todays MovieWorld cinema schedule. Look for the special offers available for go...
Redirect to another view and pass json value
◷
تاریخ انتشار: 1395/1/26 | ساعت: 5:50
Vote count: 0 I am new to MVC, I create a page that get the first name and last name in text boxes and run an api to get the customer info. The userObject in the code bellow contains the user information in Jason format. When I get the value back from API I need to redirect to another page(view) wit...
is there any way to make a page unable to refresh
◷
تاریخ انتشار: 1395/1/26 | ساعت: 5:50
Vote count: 0 i have an html page that puts the worker on pausaa time which will be subsctracted from his/her day job the problem is that if he/she refresh the time the timer starts from the beeggining automatically.i want it to continue in its normal flow .Is there any way to make the page not refr...
If you link against a DLL, is it possible to launch your executable if that DLL is missing
◷
تاریخ انتشار: 1395/1/26 | ساعت: 4:35
Vote count: 0 A coworker and I were having a discussion and neither of us is actually sure of how this would work. Let's say that you create a program that uses function Foo() from Bar.DLL. If Bar.DLL is missing, will it still be possible to launch the program and it will just crash when attempting ...
Java Static Nested Type Semantic
◷
تاریخ انتشار: 1395/1/26 | ساعت: 4:35
Vote count: 0 I've been lea ing Java recently and reached the following conclusion: declaring a static nested type is a meaningless redundancy. I was reading the answers on the below question and while I do understand the answers (and it cleared my inetial confusion - similar to the one the asker ha...