247 Topics

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
391
Member Avatar for Patiodude

I run a website where I periodically post articles. I'd like to add a timestamp/datestamp to each article showing the post date (the upload date, I assume, would be the logical choice). I had already asked for advice on this topic; unfortunately, the result is a blank. Literally. Here's an …

Member Avatar for Ty omotayoo
0
714
Member Avatar for fo2sh

Hello, I am running a software on a Linux machine, I am synchronizing time via default ntpd configurations available in Linux (/etc/ntp.conf). I am connecting to the customer NTP server. Now i was requested to tell which synchronization type is used on my machine (Frequency Synchronization/ Time Synchronization or Time-of-day …

Member Avatar for rproffitt
0
516
Member Avatar for SalmiSoft

I am using an Arduino to prototype a project in which the real time is important. My device has a real time clock and internet access. I have some NTP code I can use to get the current time in GMT and I can apply an offset for the timezone …

Member Avatar for rubberman
0
259
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 Roger_2

i have created a recursive method that returns the size of a binary search tree, i would like to analyze the running time of my implementation but i dont know how. I know the best case is O(1) if node is null but what about worst case? my researches online …

Member Avatar for Mickey_2
0
418
Member Avatar for pwolf

it says the following: Write a function that converts the time to 24hr format. Examples [CODE] >>> time24hr('12:34am') '0034hr' >>> time24hr('12:15pm') '1215hr' [/CODE] so i wrote the following: [CODE] def time24hr(tstr): a = tstr.split(':') am = {'12':'00','1':'01','2':'02','3':'03','4':'04','5':'05','6':'06', '7':'07','8':'08','9':'09','10':'10','11':'11'} pm = {'12':'12','1':'13','2':'14','3':'15','4':'16','5':'17','6':'18', '7':'19','8':'20','9':'21','10':'22','11':'23'} if 'am' in tstr: return am[a[0]] + a[1][:2] …

Member Avatar for Abhinav_4
0
3K
Member Avatar for Gribouillis
Member Avatar for Gribouillis
0
499
Member Avatar for Toby_1

I need to make some KML code that is basically a coloured track. So far I have worked out that it either has to be lots of small lines or placemarks. However usually with this there is no way to use the time bar. Is there a way to be …

Member Avatar for almostbob
0
318
Member Avatar for man.chester.581

im looking for way to make my game allow players to play with each others via internet i can use some kind of rooms i need help to know what is the recommended engines that can i use for real time multiplayer apps

0
166
Member Avatar for ddanbe

This is just for fun. You know how old you are(I hope), but do you know how many days you are walking around on this planet? The two routines presented here could be used more practically in an ever present employee application.

Member Avatar for ddanbe
0
695
Member Avatar for chester1908

Hello, i was wondering if i could get an opinion on the following code as it is giving me a headache: int counter = 498853097; int k = 0; clock_t start, end; float seconds1,seconds2; start = clock(); for (int i = 0; i < counter; i++) { k++; } end …

Member Avatar for chester1908
0
288
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
326
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
810
Member Avatar for Daniel_34

I'm studying for a test and appreciate your help. How to calculate the running time (T(n)) of the following segment (written in Pascal): k := 0; m := n; while m <= n do begin k := k + 1; m := k * k; end; for i := 1 …

Member Avatar for glenn_3
0
218
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 Diellza

Dear all, I have created a code for QuicSort algorithm with random numbers and time executation but now I want to do for Countin sort And I don't know, Can anybady help me based in this example. Thanks include <iostream> include <conio.h> include <time.h> include <stdlib.h> //srand and rand functions …

Member Avatar for David_50
0
692
Member Avatar for Diellza

I want to make this code with random numebr array and time executation? Does anybady nows how can I do? #include <iostream> using namespace std; void print(int a[], int sz) { for (int i = 0; i < sz; i++ ) cout << a[i] << " "; cout << endl; …

Member Avatar for Diellza
0
283
Member Avatar for smdjilani

i created a mailing option,when retriving messages it's taking lot of time and showing error of time delay.......can someone help??

Member Avatar for diafol
0
170
Member Avatar for vegaseat

With the advent of Python33 the module time has received a high resolution timer/counter. Here we use time.perf_counter() in a decorator to conveniently time two test functions.

3
2K
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 Sizwe_1
Member Avatar for JorgeM
0
214
Member Avatar for CreatorZeus

so i have a page where i want a 2 second image intro then for the image to fade to the acutal page. maybe some sort of table that has a onload that after 2 seconds fades into the actual page? i could not figure it out.

Member Avatar for LaxLoafer
0
236
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
415
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 silverdust

I'm trying to set a time limit of like 2 mins after time of a click event. How can I achieve this? Most of the countdown timers I see all over the internet are countdowns to dates like Aug 23, 2015

Member Avatar for silverdust
0
210
Member Avatar for XodoX

I found this site http://www.guyrutenberg.com/2007/09/22/profiling-code-using-clock_gettime/ If I have a server-client code and this: clock_gettime(CLOCK_REALTIME, &time_a); // create socket clock_gettime(CLOCK_REALTIME, &time_b); // close socket If I have a and b wand want to measure the time it takes to communicate, what's the best way ? Still not fully understanding the exact …

Member Avatar for NathanOliver
0
256
Member Avatar for bejfake

Hi, I need to implement list based on dynamic arrays (second task is to implement as double linked list). Both tasks are done, but I have problem with time limit on test platform when values are millionths. I suppose that resizing dynamic array is delaying so much. I have implemented …

Member Avatar for rubberman
0
986
Member Avatar for CreatorZeus

So decided I should switch to VS13 for the added benefits. Copied the cold, transfered the files, alls good right? Wrong. Actually its not that bad. Just one main problem. `ltm` See this fella? This is the one guy that is standing in the way of me and the debachury …

Member Avatar for JasonHippy
0
240
Member Avatar for RazorRamon

Hey you all I got a time calculation question. I'm attempting to do a lot of PHP and AJAX code appending to HTML. I want to know if my code below will accurately calculate the time of entire code being executed or solely just the PHP code. If it just …

Member Avatar for diafol
0
360

The End.