Click here to Skip to main content
15,896,348 members
Home / Discussions / C#
   

C#

 
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 
QuestionWeb service Pin
chotuithamgia30-May-09 18:13
chotuithamgia30-May-09 18:13 
AnswerRe: Web service Pin
Dave Kreskowiak30-May-09 18:42
mveDave Kreskowiak30-May-09 18:42 
JokeRe: Web service Pin
Manas Bhardwaj30-May-09 20:13
professionalManas Bhardwaj30-May-09 20:13 
QuestionOne apps causes another app to crash.. [modified] Pin
Jonathan Tripathy30-May-09 11:28
Jonathan Tripathy30-May-09 11:28 
AnswerRe: One apps causes another app to crash.. Pin
Luc Pattyn30-May-09 15:22
sitebuilderLuc Pattyn30-May-09 15:22 
GeneralRe: One apps causes another app to crash.. Pin
Jonathan Tripathy30-May-09 23:32
Jonathan Tripathy30-May-09 23:32 

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.