247 Topics
|
|
|
Hi, I am using the following code to download files from the internet: [code=c]size_t write_data(void *ptr, size_t size, size_t nmemb, FILE *stream) { size_t written; written = fwrite(ptr, size, nmemb, stream); return written; } int main(int argc, char** argv) { FILE *downloaded_file; if ( (downloaded_file = fopen (download_path , "w" … |
i did go thru a google search and found some functions .. but those results where horrifying , i guess i am using a wrong method of finding time . [code] def test(): "Stupid test function" L = [] for i in range(100): L.append(i) if __name__=='__main__': from timeit import Timer … |
|
I am making a program that involves adding time. It involves adding a beginning time, duration which would lead to the result of an end time from the sum of beginning time and duration. I will illustrate the problem i am having below: 12:15 start time with a duration of … |
|
(Read Title) I honestly have no idea how to do this. I've tried diagnostics.stopwatch, system.timespan , and system.datetime, but I can't wrap my head around how I would do this. Any suggestions? |
|
:cool: hi Friends,.,. !! i want to know a perfect time consumption for a given particular program.. [B][COLOR="red"]IN MILLISECONDs[/COLOR][/B] I know the way of using following method: [CODE=c] start=clock(); /*... ... my programming logic . . . ... */ end=clock(); difference=(end-start);[/CODE] But it gives time in seconds , which is … |
|
Hey, I was wondering if any one could help me with several problems I am having. 1st problem: Can anyone tell me how to combine two int's and put a ':' in between. Bascially I want the user to enter the hour and minutes separately, then combine them both together … |
|
Hi all, I'm working on conference room booking software with MS-Access as the back end. I need to retrieve the records which doesn't clash with the already booked dates. I have a table called conference_room_status which has the fields Conference_Room_Name | BookedPerson | DateFrom | DateTo | TimeFrom | TimeTo … |
|
I have a database with some tables from a restaurant and users can see if they are [I]free[/I] of [I]reserved[/I]. If [I]free[/I] they cand book that table. Now, my question is this: What can i do so that after (let's say 1 day (or any amount of time) after the … |
|
Hi, can u help me? i've got problems. this is my table: No Status Date/Time Aging 1 registerd 2010-06-21 11:44:51 0 hours 2 in progress 2010-06-24 12:39:12 40 hours 3 closed 2010-06-24 12:40:18 40 hours(total aging) how to get aging if time count only at 08.00 until 21.00 and only … |
|
Hi, how can I run jquery function every 5 minute and updating value on website? |
|
I have a table with a bunch of check boxes, this is not a plug: (found at [url snipped]), I am trying to figure out how to store each checkbox's value in real time (there is no "Submit" button). I run jQuery through my site and was thinking that PHP/jQuery … |
|
Hello, I have a project for school and I need it finished a in a few days. What the project does is reads data from a txt file. Each row of the txt file contains a timestamp hh:mm:ss,mmm (example: 00:05:33,141). Whenever the system time is equal to one of the … |
|
I want to compare web map serving tools for response time when serving a variety of maps. Can you direct me to a free or if not proprietary tool to use for the tool comparison. |
|
Here tool functions, which came up during discussions earlier. Expanded slightly, added elimination of traceback prints by try..except. Added dd.mm.yy routine as that is format in my home country Finland. Optimized docstring beginnings to be informative in editor tooltip (at least IDLE shows, but code must be run or imported … |
|
Hi, I'm trying to take a date, add a day to it, and then convert it to a string. The date's format starts out like: '10/1/2009', and should end like: '2009-10-1'. I can do that part, but then I can't convert it to a date format and add a day. … |
|
|
Given s.ss or seconds accurate to the hundredth place, what is the most effective way to convert it to the string mm:ss.s? Here is my current attempt: [CODE]import time def convert(t): print time.strftime("%M:%S",time.gmtime(round(t,1)))+str((".%01d" % (((round(t,1))-int(round(t,1)))*10))) t = float(raw_input('Enter time in s.ss: ')) convert(t)[/CODE] However, the results don't seem quite right: … |
Hi I just subscribed to Time Warner Triple Play that uses Road Runner. So I bought Apple Time Capsule to hook it up with my MacBook Pro. It is not working. I do see I have full Airport connection but I have an error stating it is not recognizing IP … |
|
[CODE] maxDays = calendar.getActualMaximum(calendar.DAY_OF_MONTH); System.out.println(maxDays); [/CODE] When looking through the javadocs it seems like this would work but it apparently doesn't. Any help on figuring why it doesn't or another way would be appreciated |
|
Hi guys , I am creating a timekeeping application to keep track of users. In my database I have a table which stores the time a user starts their break and finishes their break. I want to return the total time that the user is on break in minutes to … |
|
Hi, I have a circuit that charges a capacitor and discharges it. The length of the discharge pulse is supposed to be determined by the ADC value from a POT. The pot is wired as a voltage divider and I have tested that the voltage to the pic pin varies … |
|
[CODE]void age() { boolean isValid = false; Calendar user = null; while (!isValid) { System.out.print("Enter Date (mm/dd/yyyy): "); DateFormat df = new SimpleDateFormat("MM/dd/yy"); String s = In.in(); Date date = null; try { date = df.parse(s); } catch (ParseException e) { System.out.println("Date error"); } user = Calendar.getInstance(); user.setTime(date); if (user.getTime().getTime() … |
|
any help would b greatly appreciated for the following how do i modify this to output the date in multiple formats: a)DDD YYYY MM/DD/YY June 14, 1992 b) use overloaded constructors to create Date objects initialized with dates of the formats in part (a). c) create a date constructor that … |
|
hey does anyone know if i am using the srand() fucntion correctly to randomly choose if a persons letter is X or O? [CODE]#include <iostream> #include <cstdlib> using namespace std; int main() { srand(time(0)); int playerTurn = rand() % 2; char initPname; if (playerTurn == 1) { initPname= 'X'; playerTurn++; … |
|
[U]for[/U] i<-1 [U]to[/U] n [U]do[/U] [INDENT][U]for[/U] j<-1 [U]to[/U] n^2 [U]do[/U][/INDENT] [INDENT][INDENT]write(i*j)[/INDENT][/INDENT] [INDENT][U]end-for[/U][/INDENT] [U]end-for[/U] |
|
Hey everyone. I am having problems trying to figure out how the user can select the times they want to start work at, the time they want to have from lunch and finally the time they would like to finish. I then would calculate the number of actual working hours. … |
|
Happy new year and peace to you all! Can you please explain to me what is the execution time T(n) of the 2 algorithms? Algorithm 1: for i ← 1 to n do for j ← 1 to i do for k ← j to i+j do a ← a … |
|
I have a component which hooks up with the paint event of assigned control and draws on its surface, Whenever i make any changes to the component i need to resize the form or control at design time in order to see the changes. I want to ask if there … |
|
Hi again, I have a small application that calculates time left over in a day after events. The problem I have is that if either the starting time or ending time is 4.10 or 5.10 I get slightly incorrect answer. Eg. if the only event starts at 4 and ends … |
|
I was looking at some odd design stuff and ran across [URL="http://www.christiaanpostma.nl/index.htm?clock.htm"]this clock[/URL] - he used 120 clock works to create this clock. |
|
Hi Java Developers, wondering if someone can point out why references to 'Student' (successfully compiled java class) in my ValidRecords.java source file don't seem to resolve at compile time? It's important to say that ANY and ALL references to Student object from inside ValidRecords.java don't resolve... not just the one … |
The End.