New Posts  All Forums:Forum Nav:

Movie Minute Converter

post #1 of 3
Thread Starter 
Yeah, figuring out how long a movie is doesn't take a lot of work...
But I just don't want to think that hard . So I programmed
this little doohickey to do it for me.

I lost the source code and I don't really feel like Decompiling it.

So it basically runs down like this:

temp = minutes % 60;
hours = minutes / 60;
minutes = temp;

while ( hours > 24 )
{ hours = hours - 24; days++; }
// print that bad boy

Is it leaky... yep. Does it require a slow language, no...
Do you need Java, yep, unless you redo it in C++ or
your native born language.

~Chris

Have fun figuring out how long your TV box sets run!
Methuselah
(13 items)
 
  
CPUMotherboardGraphicsRAM
Athlon Opteron 170 MSI K8N Neo2 Platinum EVGA 7800GS 1GB 
Hard DriveOptical DriveOSMonitor
1.5TB NEC DVD Writer Win XP Pro, Ubuntu 7.10 i386 Dell 2407WFP (a04) 
KeyboardPowerCaseMouse
Apple Pro White Generic 500W Aerocool Logitech MX510 
Mouse Pad
UPS!!! 
  hide details  
Reply
Methuselah
(13 items)
 
  
CPUMotherboardGraphicsRAM
Athlon Opteron 170 MSI K8N Neo2 Platinum EVGA 7800GS 1GB 
Hard DriveOptical DriveOSMonitor
1.5TB NEC DVD Writer Win XP Pro, Ubuntu 7.10 i386 Dell 2407WFP (a04) 
KeyboardPowerCaseMouse
Apple Pro White Generic 500W Aerocool Logitech MX510 
Mouse Pad
UPS!!! 
  hide details  
Reply
post #2 of 3
why even make a temp variable. you just need
hours = minutes/60
minutes %= 60
days = hours/24

print

all the rest is unnecessary
It goes to eleven
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6300 DS3 EVGA 8600GTS 2GB XMS2 DDR2-800 
Hard DriveOSMonitorKeyboard
1.294 TB Arch Linux/XP Samsung 226bw Eclipse II 
PowerCaseMouse
Corsair 520HX Lian-Li v1000B Plus G7 
  hide details  
Reply
It goes to eleven
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6300 DS3 EVGA 8600GTS 2GB XMS2 DDR2-800 
Hard DriveOSMonitorKeyboard
1.294 TB Arch Linux/XP Samsung 226bw Eclipse II 
PowerCaseMouse
Corsair 520HX Lian-Li v1000B Plus G7 
  hide details  
Reply
post #3 of 3
Thread Starter 
yeah, thats kinda how my code went, and since i
put it together in about 3 minutes I focused more
on getting to compile than caring about how it
worked. that and i lost the source, so doing it
from memory is a little different.
Methuselah
(13 items)
 
  
CPUMotherboardGraphicsRAM
Athlon Opteron 170 MSI K8N Neo2 Platinum EVGA 7800GS 1GB 
Hard DriveOptical DriveOSMonitor
1.5TB NEC DVD Writer Win XP Pro, Ubuntu 7.10 i386 Dell 2407WFP (a04) 
KeyboardPowerCaseMouse
Apple Pro White Generic 500W Aerocool Logitech MX510 
Mouse Pad
UPS!!! 
  hide details  
Reply
Methuselah
(13 items)
 
  
CPUMotherboardGraphicsRAM
Athlon Opteron 170 MSI K8N Neo2 Platinum EVGA 7800GS 1GB 
Hard DriveOptical DriveOSMonitor
1.5TB NEC DVD Writer Win XP Pro, Ubuntu 7.10 i386 Dell 2407WFP (a04) 
KeyboardPowerCaseMouse
Apple Pro White Generic 500W Aerocool Logitech MX510 
Mouse Pad
UPS!!! 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Application Programming