Click here to Skip to main content
15,922,584 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to add a application to system menu and Startup in System Configuration Utility? Pin
0x3c031-May-09 2:09
0x3c031-May-09 2:09 
AnswerRe: How to add a application to system menu and Startup in System Configuration Utility? Pin
Luc Pattyn31-May-09 2:43
sitebuilderLuc Pattyn31-May-09 2:43 
AnswerRe: How to add a application to system menu and Startup in System Configuration Utility? Pin
Giorgi Dalakishvili31-May-09 3:15
mentorGiorgi Dalakishvili31-May-09 3:15 
QuestionHow to use swf file in C#? Pin
SNI31-May-09 1:38
SNI31-May-09 1:38 
AnswerRe: How to use swf file in C#? Pin
0x3c031-May-09 1:43
0x3c031-May-09 1:43 
GeneralRe: How to use swf file in C#? Pin
SNI31-May-09 3:22
SNI31-May-09 3:22 
GeneralRe: How to use swf file in C#? Pin
0x3c031-May-09 7:06
0x3c031-May-09 7:06 
QuestionTime Calculation Pin
indian2231-May-09 0:54
indian2231-May-09 0:54 
AnswerRe: Time Calculation Pin
mrcooll31-May-09 1:15
mrcooll31-May-09 1:15 
GeneralRe: Time Calculation Pin
indian2231-May-09 1:23
indian2231-May-09 1:23 
GeneralRe: Time Calculation Pin
0x3c031-May-09 1:27
0x3c031-May-09 1:27 
GeneralRe: Time Calculation Pin
indian2231-May-09 1:30
indian2231-May-09 1:30 
GeneralRe: Time Calculation Pin
0x3c031-May-09 1:33
0x3c031-May-09 1:33 
GeneralRe: Time Calculation [modified] Pin
Alan N31-May-09 3:23
Alan N31-May-09 3:23 
Hi,
Hmm, you need to stop for a moment and think about what you are trying to do.

If the measured time span is 24 hours or more then information about the number of days that have passed is required to perform the calculation.

If the time span is guaranteed to be less than 24 hours the following pseudocode is valid
// Calculate time span
duration = endtime - starttime;
// if the value is negative then assume that
// midnight has passed
// and therefore end day = start day + 1
if duration < 0 then duration = duration + 24 hours;


Note how this would fail as soon as the actual time span is 24 hours or more.

Alan.
[EDIT corrected error in code fragment]

modified on Sunday, May 31, 2009 9:29 AM

GeneralRe: Time Calculation Pin
mrcooll31-May-09 1:53
mrcooll31-May-09 1:53 
AnswerRe: Time Calculation Pin
0x3c031-May-09 1:17
0x3c031-May-09 1:17 
Questionvideo file from web service Pin
Faysal30-May-09 22:06
Faysal30-May-09 22:06 
QuestionOverride non virtual Methods Pin
hafi8030-May-09 21:18
hafi8030-May-09 21:18 
AnswerRe: Override non virtual Methods Pin
Nuri Ismail30-May-09 22:28
Nuri Ismail30-May-09 22:28 
AnswerRe: Override non virtual Methods Pin
S. Senthil Kumar31-May-09 7:45
S. Senthil Kumar31-May-09 7:45 
AnswerRe: Override non virtual Methods Pin
PIEBALDconsult31-May-09 15:49
mvePIEBALDconsult31-May-09 15:49 
QuestionFullText Search Pin
ellllllllie30-May-09 19:14
ellllllllie30-May-09 19:14 
AnswerRe: FullText Search Pin
I Believe In GOD31-May-09 2:01
I Believe In GOD31-May-09 2:01 
QuestionForms, Transparencykey and Windows VISTA Pin
franco nero30-May-09 18:39
franco nero30-May-09 18:39 
AnswerRe: Forms, Transparencykey and Windows VISTA Pin
franco nero30-May-09 20:00
franco nero30-May-09 20:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.