247 Topics

Member Avatar for
Member Avatar for Levo

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" …

Member Avatar for 0x69
0
1K
Member Avatar for rahul8590

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 …

Member Avatar for Beat_Slayer
0
840
Member Avatar for Drakarus

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 …

Member Avatar for Aranarth
0
86
Member Avatar for wade2462

(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?

Member Avatar for Geekitygeek
0
149
Member Avatar for rax_19

: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 …

Member Avatar for rax_19
0
294
Member Avatar for Drakarus

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 …

Member Avatar for Drakarus
0
160
Member Avatar for s_sridhar

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 …

Member Avatar for dmarino1
0
148
Member Avatar for Th3nutz

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 …

Member Avatar for xylude
0
100
Member Avatar for riskiana

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 …

0
72
Member Avatar for nertos
Member Avatar for sergb
0
65
Member Avatar for SerjSagan

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 …

Member Avatar for SerjSagan
0
308
Member Avatar for sodevrom

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 …

Member Avatar for sodevrom
0
484
Member Avatar for sohanw

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.

Member Avatar for articlewriter1
0
112
Member Avatar for TrustyTony

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 …

Member Avatar for TrustyTony
1
951
Member Avatar for theweirdone

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. …

Member Avatar for TrustyTony
0
253
Member Avatar for cyon

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: …

Member Avatar for TrustyTony
0
483
Member Avatar for InsightsDigital

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 …

Member Avatar for Edgy
0
95
Member Avatar for white feather

[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

Member Avatar for BestJewSinceJC
0
142
Member Avatar for dwayned

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 …

Member Avatar for dwayned
0
629
Member Avatar for riccardo-m

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 …

Member Avatar for riccardo-m
0
116
Member Avatar for white feather

[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() …

Member Avatar for white feather
1
108
Member Avatar for corby

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 …

Member Avatar for corby
0
155
Member Avatar for corby

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++; …

Member Avatar for corby
0
136
Member Avatar for corby

[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]

Member Avatar for corby
0
125
Member Avatar for JAM1011

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. …

Member Avatar for JAM1011
0
84
Member Avatar for coffee_bean

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 …

Member Avatar for Salem
0
107
Member Avatar for Damon88

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 …

Member Avatar for Damon88
0
2K
Member Avatar for Moonrise_state

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 …

Member Avatar for Moonrise_state
0
109
Member Avatar for GrimJack

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.

Member Avatar for nav33n
1
285
Member Avatar for bentlogic

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 …

Member Avatar for peter_budo
0
334

The End.