92 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for patk570

I have a code that pulls a JSON response, and I need to compare times from now() and a previous when the timestamp was created. I am able to pull the info and have it display. However, when i try and get the comparison to work it just sits there …

Member Avatar for jkon
0
393
Member Avatar for Sudo Bash

I am writing a game in which I need to know whether or not a user preforms an action in one second or less. I can not use time() because it measures time in seconds. If the user starts the action half-way through a second it would mess with accuracy. …

Member Avatar for Yangang
0
4K
Member Avatar for Niloofar24

Hi friends. With `datetime.datetime.now()` or `datetime.datetime.today()` i can get the current date (English calendar) for my program but what about if i want to get the current date (from Persian calendar) for my program; then what should i do? As my pc os date is set to English calendar so …

Member Avatar for Niloofar24
0
329
Member Avatar for Niloofar24

Hello friends. I want to create a countdown program for the new year that is comming. I know i can use this code for example, for short certain time: from threading import Timer def sayhi(): print "hello everybody!" t = Timer(10, sayhi) t.start() But the new year begins in 29 …

Member Avatar for Niloofar24
0
815
Member Avatar for it@61@sec

I want to copy all the files from one directory to another using the fread() and fwrite()-statements. Some of these files are rather large in size, and that's why I want to calculate who long the transfer will take. (Later I will use this information to show a progress bar …

Member Avatar for it@61@sec
0
1K
Member Avatar for GingerDontCare

Hello Daniweb, So, I am currently working on a simple download time estimator program using JOptionPane and some loops. I have some beginning code and wanted to check how it is working, only it seems I messed up something and am stuck in my loop when I run it. I …

Member Avatar for GingerDontCare
0
1K
Member Avatar for Praveen_10

I need to insert a cobobox value ,date value into database but am not sure if this is the method...i keep getting an exception saying 'Incorrect syntax near '@Numberpassengers'.' private void button1_Click(object sender, EventArgs e) { string c = ""; string s = ""; string d = ""; string t …

Member Avatar for Praveen_10
0
417
Member Avatar for nadiam

Hi guys. i have an event page that displays events from database. in my database I have a column with datetime format. is there a way to only get the date or time separate from each other in a select to be displayed? php: <?php require "connection.php"; $sessid = $_SESSION['sess_user_id']; …

Member Avatar for nadiam
0
2K
Member Avatar for thirteen_xx

Hi, I'm new to vb and I need to record the time the user used a certain privilege and the time s/he finished using it. i used date/time picker but whenever i run the program, i can't edit the time. only the date. help please?

Member Avatar for thirteen_xx
0
801
Member Avatar for hvebsr

I want to put the path and name of a spreadsheet, the page and number of pages and the date and time into the footer(s) and display it in Times New Roman 6 pts. I made the following macro: Range("A1").Select ActiveWindow.View = xlPageLayoutView` Application.PrintCommunication = False With ActiveSheet.PageSetup .LeftFooter = …

Member Avatar for hvebsr
0
292
Member Avatar for Pooja_2

I am a computer science student and i have to do a miniproject using only c.my project title is "to estimate time complexity of a given algorithm/program code.please tell me how can i initiate that i tried counter,line count it couldn't help,i have to submit my project at the first …

Member Avatar for Pooja_2
0
172
Member Avatar for MrNoobieCoder

I am currently in need of help on a piece of homework, I'm using python 3.3 and i need to set a delay on a times table program that i created heres the code: def get_int(prompt="Enter an integer: "): """this function will loop until an integer is entered""" while True: …

Member Avatar for MrNoobieCoder
0
233
Member Avatar for drieran

Hi, I'm developing with a BeagleBoard Black (BBB) under Ubuntu using C. When the BBB is powered on I'm doing many time controlled tasks. My problem happens when NTP changes the clock and all my counters are not valid. Normally BBB starts with no date/time set, some seconds later (if …

Member Avatar for drieran
0
239
Member Avatar for Kratoswoo

So I have this linq code and I am trying to get it to look at the datbase and what it is doing is pulling back the last record put into the database. My asp page refreshes and displays the new information that was updated. What I want is to …

Member Avatar for Kratoswoo
0
221
Member Avatar for yuvjeeth

Hi I want to know how to know if user is running the program for first time? I have a .txt file which will be loaded on start, but it is the first time and there is no such file. If anybody contributes, I will be happy Thanks in advance …

Member Avatar for mridul.ahuja
0
233
Member Avatar for Suzie999

Hi. I'm having some touble printing year. Here is the code where I expected an output of "Year: 2013" time_t tm; time(&tm); struct tm ts; errno_t err = localtime_s(&ts,&tm); cout << "Year:\t" << ts.tm_year << endl; But what I get is "Year: 113" Appreciate any help offered.

Member Avatar for Suzie999
0
167
Member Avatar for richosr

Hi, I want to select all records from a table where the DateAdded field's date and time (Default value Timestamp field) is more than say 3 hrs ago. eg: something like SELECT tbldata.* FROM tbldata WHERE (tbldata.DateAdded <= now()-3); I can get it working with days difference but do not …

Member Avatar for richosr
0
347
Member Avatar for ms061210

Hello, i'm kinda starting to feel out of my mind now. I am creating a simple web game. I am now in the process of putting some php codes here in game to have scores.My problem is that, My game's top score is the person who played the game very …

Member Avatar for ms061210
0
260
Member Avatar for A Haunted Army

i've been working on a game project, its a slider platformer and i've been having problem with getting the movement working, the movement is time based instead of being fixed to the frames per secound so the movement is consistent. the movement was working when i was testing out the …

Member Avatar for A Haunted Army
0
1K
Member Avatar for ScarWars9

Hello, I have been working on a time clock program where the user can enter their time in and time out using two DateTimePickers, and it will tell them how many hours and minutes they worked. I was able to format the DateTimePicker to only show the hours and minutes. …

Member Avatar for Begginnerdev
0
843
Member Avatar for vaultdweller123

hey guys... just wanna ask, is setting timezone on php automatically computes for daylight saving times? i mean does it autmatically detect DST and automaticaly add +1 hour on specific month? thanks in advance

Member Avatar for LastMitch
0
8K
Member Avatar for minitauros

Hello there. I am kind of confused. In PHP I substract two unix timestamps from each other. The first: mktime(0, 0, 0, 10, 22, 2012) The second: mktime(24, 0, 0, 10, 28, 2012) For as far as I know the time difference between these two timestamps is exactly 7 days. …

Member Avatar for diafol
0
238
Member Avatar for FUTURECompEng

Currently this method has a run time of O(N^2) and I am trying to get it to O(N). Any suggestion as to where I should start? public void removeAll(e removeNum) { node nodeToFind = this.find(removeNum); while(nodeToFind != null) { this.remove(nodeToFind); nodeToFind = this.find(removeNum); } } Thanks

Member Avatar for JamesCherrill
0
296
Member Avatar for jontennyeah
Member Avatar for FUTURECompEng

What is the running time for the following recursive function: pubic static int Sum(int [] a, int start, int end) { if ((end – start) = =0) return a[end]; else { int mid = (end + start) / 2; return (Sum(a, start,mid) + Sum(a,mid+1,end)); } } Can someone please explain …

Member Avatar for FUTURECompEng
0
295
Member Avatar for JavaPrograms
Member Avatar for mmcdonald

Sorry people but I'm really struggling with this and I don't know why... but still. I have a stored unix timestamp. [a] I have the current timestamp not in unix format (YYYY-MM-DD HH:MM:SS) [b] I need to: 1) convert the current timestamp [b] into a unix timestamp 2) I need …

Member Avatar for leviathan185
0
270
Member Avatar for Nutster

I have noticed that when I first post something, either as a new discussion or as a response to someone else, I can edit what I just posted. When I come back quite some time later, the option to edit is not longer presented. I am wondering how long that …

Member Avatar for Nutster
0
276
Member Avatar for PhilEaton

I need to order these dates in descending order (last should be first) and in fact how they now appear. However they do not necessarily appear like those so I need a SQL Order By clause to order these descending: 2012-01-23 09:53:24.097105 2012-01-20 17:31:57.565458 2012-01-20 17:01:09.154587 2012-01-20 16:28:40.685735 2012-01-16 12:03:54.99954 …

Member Avatar for JorgeM
0
441
Member Avatar for magicmarkuk

Hi I am using a script similar to Scriptlance which is using the server time to datestamp everything and display dates and times of the start and end of projects. The problem is that the server is in the US running on PDT time and I am in the UK …

Member Avatar for magicmarkuk
0
244

The End.