Berkeley CSUA MOTD:Entry 15650
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/07/08 [General] UID:1000 Activity:popular
7/8     

1999/3/29-30 [Computer/Theory, Computer/SW/OS/Windows] UID:15650 Activity:high
3/29    Algorithm question:  Is an easy way to figure out the number of
        days between two given dates?  Eg. given 98/11/05 and 98/12/09
        as input, the output would be 34 days?  Is there a C function
        that can xlate the date into some absolute number and then do the
        arithmetic and then covert it back?  Thanks!
        \_ Let me guess. You're trying to implement If-Modified-Since for
           ee 122 right?  What I've used since my early days of programming
           is time_t time(time_t *t); or 'man 2 time' at the unix prompt.
           It'll return the number of seconds since Jan 1, 1970. --jeff
        \_ Convert both to Julian dates and subtract.
           \_ http://wwwmacho.mcmaster.ca/JAVA/JD.html  guess you'll have
              to figure out the algorithm from the JavaScript fcns
              \_ Or just use mktime(3) and subtract.
2025/07/08 [General] UID:1000 Activity:popular
7/8     

You may also be interested in these entries...
2012/1/24-3/3 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Misc] UID:54296 Activity:nil
1/24    http://james-iry.blogspot.com/2009/05/brief-incomplete-and-mostly-wrong.html
        Amusing "history" of computer science.
        \_ Where's the mentioning of Al Gore the inventor of AlGorithm?
	...
2011/6/29-7/21 [Computer/SW/Database, Computer/SW] UID:54133 Activity:nil
6/29    "An Israeli algorithm sheds light on the Bible"
        http://www.csua.org/u/tq4 (news.yahoo.com)
        "Software developed by an Israeli team is giving intriguing new hints
        about what researchers believe to be the multiple hands that wrote the
        Bible."
        \_ "Hype developed by an American OnLine News Feed is giving
	...
2010/8/9-19 [Computer/SW/Security] UID:53917 Activity:nil
8/9     I got two files, one is size 522190848 and the other is size
        521648128.  Both sha256 to the same number.  (and sha1 too).
        I don't think this is supposed to happen, right? (least not with
        sha256).
        \_ how are you checking?
           \_ I burned one file to cd, so i mounted /cdrom and
	...
2010/1/20-29 [Computer/SW/Languages/Misc, Computer/SW/Security] UID:53649 Activity:nil
1/20    Did Chinese come up with new way of quicksort?
        http://www.nytimes.com/2010/01/20/technology/20cyber.html
        Joe Stewart, a malware specialist with SecureWorks, a computer
        security company based in Atlanta, said he determined the main
        program used in the attack contained a module based on an unusu
        al algorithm from a Chinese technical paper that has been
	...
2009/10/24-11/3 [Computer/HW/Laptop] UID:53466 Activity:kinda low
10/24   How well do you see color? I got 8, how about you?
        http://www.xrite.com/custom_page.aspx?PageID=77
        \_ 7
           \_ what monitor did you use?
              \_ LCD on thinkpad x32, under not so great lighting conditions.
        \_ I scored 101, which seems impossible. Then again, I didn't
	...
2009/1/13-22 [Computer/Theory] UID:52367 Activity:kinda low
1/13    I am writing a commandline parser for a class and I could use some
        tips for algorithms to use. (The project is over and done so I am
        not cheating, but I am dissatisfied with my end result.) I STFW and
        didn't come up with too much I liked. I read the source for some
        shells like tcsh and that is *WAY* too complicated and relies on
        a lot of other code. I know that browsers and other apps have
	...
2008/12/2-6 [Computer/SW/Apps, Academia/Berkeley/CSUA/Motd] UID:52140 Activity:kinda low
12/1    Just curious -- what do you guys generally use soda for? Why do you
        log on? Personally, I use it to keep a presence on IRC and AIM/gTalk
        at all times, and mess around with some Python programming (been
        setting up Twisted and such so I can play with making an irc bot).
        --toulouse
        \_ I use it to post SHIT, er, I mean, spill my guts about the company
	...
2008/11/25-28 [Computer/Theory] UID:52108 Activity:nil
11/25   Holy crap! I was the one asking how to open a locked up masterlock a
        few days ago. I tried the algorithm on this webpage:
        http://www.wikihow.com/Crack-a-%22Master-Lock%22-Combination-Lock
        and it worked! Thanks to whoever suggested it.
        \_ Good to know, thanks for the reply.
	...
Cache (246 bytes)
wwwmacho.mcmaster.ca/JAVA/JD.html
Calendar Date to Julian Date Calculator The algorithm used is from "Astronomical Formulae for Calculators" (2nd edition) by Jean Meeus ISBN 0-943396-01-8 . Enter the UT date and time in the appropriate fields and then press the Compute JD button.