|
|
|
|
|
|
Powered byD's Bloggie
| Weblog Main complete archive ... |
|
|
xXx - The Next Level - 1:43 am
Movie - DaRen
I watched this movie on the DVD during the weekends, xXx - The Next Level (also known as State of the Union), sequel of the first xXx. The movie itself isn't that bad but also not really a "wow" to me. In fact, I prefer more about the "behind the scene" section, eg. how a particular scene, explosion, stunt is shot in the movie.
Personally, I love the scene where Stone Darius connects an aircraft carrier's catapult launch hook to an empty tank and make a direct hit on an incoming enemy tank which is chasing for him. That's so COOOOOL and crazy!! hehe...
A worth to watch film (if you're a fan of explosions here and there).
New episode of 'Kang Xi' - 1:25 am
Entertainment - DaRen
Just finish watching "Kang Xi Lai Le", the first new episode after little S took pregnancy leave one month ago. S.H.E is taking little S role as partner of Kang Yong. The programme will do a rotation by inviting other people to partner with Kang Yong until little S is back next year. Selina and Ella are pretty active and talkactive but Hebe is so quiet. I guess if this continues, then only S.E. is more than enough for the show since Hebe doesn't makes much difference for being in the show or not.
The name of 'Kang Xi Lai Le' is changed to 'Kang Yong Dang Jia' for the time being.
ps: I can't type in mandarin until I changed MySQL database's encoding to Unicode and get my template's charset set as Unicode. Check out here for more news.
Y2K bug ? What about Y2038 ? - 11:38 pm
Computing , Event , Security , Standards - DaRen
5 years ago, I witnessed the historical moment where time passed by, marking the start of a new millennium. There are a lot of news about the Y2K bug before that, about how it will causes impact to our every day life. But well thanks to those people who done the preparation, fixing and patching on the electronic devices that we rely on, I stepped into the year 2000 without having a single trouble, just that I need to remember not to write year 1999 instead of 2000 when filling up forms.
So, now what? I'm working on some sort of birthday reminder thing in PHP and I got frustrated when it comes to storing a person's birth date. First of all I don't like to use MySQL datetime date type, I prefer using unix epoch which can be easily generated using php time() and mktime(), saving me the steps to converting the format. However unix epoch is only valid from January 1 1970 00:00:00 GMT onwards, making those people who born before 1970 invalid. So I do some google-ing to find out why the developers of Unix or even PHP refuse to start unix epoch from, say, year 1600 ? (Windows Win32 FILETIME epoch is at January 1 1601 00:00:00 UTC, Im guessing windows is using unsigned 32-bit, because windows don't work with negative timestamps... lazy to do the calculations...) Before I got my answers, I dsicovered some interesting news.
After the Y2K problem, are you aware of the next coming bug similar to Y2K's one ?
The Y2038 problem
In computing, the year 2038 problem may cause some computer software to fail in or about the year 2038. The problem affects programs that use the POSIX time representation, which represents time as the number of seconds since January 1, 1970. This representation is standard in Unix-like operating systems and also affects software written for most other operating systems because of the broad deployment of C. On most 32-bit systems, the time_t data type used to store this second count is a signed 32-bit integer. The latest time that can be represented in this format, following the POSIX standard, is 03:14:08 UTC on January 19, 2038. Times beyond this moment will "wrap around" and be represented internally as a negative number, and cause programs to fail, since they will see these times not as being in 2038 but rather in 1970 or 1901, depending on the implementation. Erroneous calculations and decisions may therefore result.
Using a 64-bit architecture will solve this problem, delaying the date problem to about 300 billion years later. To be more precise, it will happen on Sunday, 4 December, year 292,277,026,596. After 292 billion years later, maybe a 128-bit will be used which hmm...really isn't our business anymore. Who cares what will happen after 292 billion years eh ? I don't even really care if my weblog will crash or not in year 2038... hehe... who cares anyway ?
source:
http://en.wikipedia.org/wiki/Unix_epoch
http://en.wikipedia.org/wiki/Year_2038_problem
Last edited: Sat 2005-12-17 @ 03:20 , by DaRen 3 time(s)
Found a bug ? Report to me ! - 7:14 pm
Bug , Site Issue - DaRen
If you spot any bugs, security exploit, warning/error messages or weird CSS rendering when visiting my site, please kindly report them to me. Please also specify the browser and version of the browser you're using. In other words, I would like to hear from you if your web browser is throwing you with errors (either Windows / Linux / Mac based).
You can leave me a message by posting a comment on this entry or contact me. Thanks
ps : not those bugs that crawl on your LCD screen or keyboard ... hehe ...
Weblog Archive - 7:17 pm
Site Issue , Site Updates - DaRen
My weblog archive is complete. User is able to browse blog entries by category, by year, by month, by day or by time. Some parts of the archive supports pagination and the rest are able to browse previous/next section according to post by post, day by day and month by month. Other sites updates include templates cosmetic update, cleaning dead codes and clean up the css file. Before that my css is a mess and a lot of them are redundant, it's so messy that it can makes your browser roar at you :p Besides that, I hope I fixed the IP grabbing problem woeisiong mentioned.
Last edited: Mon 2005-10-17 @ 19:01 , by DaRen 1 time(s)
PHP Passing by Reference - 3:07 pm
Bug , Coding , PHP - DaRen
PHP's function supports passing by reference. However, default values may ONLY be passed by reference starting from PHP >= 5. Default values in PHP functions are like:
[ Hide ] // function declaration with default value
function foo($bar = 'default value here'){ ... };
// function declaration with passing by reference
function foo(&$bar){ ... };
What pissed me off is that I'm using PHP 5 for my computer but the hosting server is using PHP4. I only realize that PHP 4 doesn't supports that after I uploaded all my files to the server. Example of default values passed by reference:
[ Hide ] // This won't work in PHP < 5
function foo(&$bar = 'default value here'){ ... };
Workaround :
Set allow_call_time_pass_reference to true in php.ini if you're using php >= 5 so that you won't get a bunch of warning messages filling your screen.
Trick to do default values passed by reference [ Hide ] <?
// function declaration
function foo($bar = 'default value here') { ... };
// function calling
foo(); // valid call
foo(&$var); // this, however is consider deprecated in PHP >= 5
?>
Base on the above code:
PHP < 5 complains:
Parse error: parse error, expecting ')' and later on by a fatal error and killing the script execution.
PHP >= 5 complains:
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer.
Changing Weather - 12:12 pm
Personal - DaRen
Just woke up, it's noon on weekend but the sky looks like 5am in the morning. Weather is changing and has been raining for 3 days. It will continue for a couple of days before the weather truely turns warm again. The cold weather makes people feel lazy ~~
Working on weblog archive - 11:48 pm
PHP , Site Issue , Site Updates - DaRen
I've been working on the weblog archives these few days, most of them are done. The calendar should be working correctly now. Thanks to PHP online documentation, I've got PHP's time(), mktime(), gmmktime(), date(), gmdate() messed up and confused for a while. It's very confusing when it comes to local time and GMT/UTC conversion especially the online documentation from PHP site isn't clearly enough. It's like I'm using +10 EST time zone for localhost (testing), storing the timestamps in GMT format, and trying to adjust to +10 GMT in a server which is using +3 GMT time zone. Hows that huh ?
For the weblog archive part, I still need to implement a feature so that blogs displaying are split into pages. This will be very handy for increasing blog post and for easy navigation. There is a more "proper" and technical term for it, pagination, or google it if you wanna know more.
Osgood Schlatter Disease - 11:30 pm
Personal - DaRen
My knee "injury" is confirmed by doctor as Osgood Schlatter Disease. "A common disease", he said. X-ray and Physiotherapy (physical therapy) can be arranged but not necessary. The pain is caused by the inflammation of my knee tendon, and the inflammation is probably caused by harsh exercise (which I don't really think so). According to the doc, I still need 2-3 months time in order to recover. That's the only bad news for my knee. *Gayness !*
Friday's Appointment - 4:55 pm
Personal - DaRen
I just called up the medical centre and re-confirm my appointment on Friday. Hopefully the doctor can confirm that my knee is recovering well and don't give any bad news about it. I still need my knee to walk and play around the world in future.
|
|
|
|
|