PHP: number of days between two dates

It’s Saturday, what am I doing in front of the computer? I should be out and enjoy life. ^o^ A colleague asked to customize a theme for his blog using WordPress. Because I didn’t have any good plan this Saturday, learning PHP sound like a logical and useful choice. Well, I bribed myself with a bottle of Tui. Then, I found an interesting PHP related post by Chorn Sokun titled PHP date diff. The author was trying to calculate the number days between two give dates. At the end of the post, he asked “What would you do instead?” ...

July 4, 2009 · 2 min · 242 words · kenno

Import photos from iPhone without iPhoto

So how do you transfer your photos from the iPhone 3G to your laptop running OS X if you don’t have iPhoto app? — Easy, just use the buit in app called Image Capture. The app can be run from: Finder -> Applications -> Image Capture Now, you can either download some or all photos by clicking on either one of the bottons as shown in the screenshot. Remember that you should have the iPhone connected to your copmuter, otherwise you would see the message saying the no device found or connected. ...

July 3, 2009 · 1 min · 102 words · kenno

Remove Universal Access Preference icon from Gnome panel

One of the advantages of using GNU/Linux operating system is that you hardly have to restart it. I have Debian on my laptop and it’s been running for months, until last night. It crashed and froze. Anyway, that’s not the main point this post was written. After restarting, I saw this new icon in the Gnome top panel (the third icon from the right): Well, for the start, I don’t know what it is and I don’t think I will have a need for it either. So I wanted to remove it, but right click on this icon would do nothing. Left clicked on it would give me some setting option, but nowhere does it mention how to remove it. ...

June 23, 2009 · 1 min · 213 words · kenno

C# Math.Round

This is just a quick note to remind myself: <br /> Math.Round(4.4); //Returns 4.0.<br /> Math.Round(4.5); //Returns 4.0.<br /> Math.Round(4.6); //Returns 5.0. Credit: Math.Round Method

June 23, 2009 · 1 min · 25 words · kenno

Pidgin 2.5.5 &#8211; cannot connect to Yahoo messenger

I just noticed the abnormality with Pidgin 2.5.5 (running on Debian) these few days — I couldn’t connect my Yahoo messenger account at all. According to the discussion of Bug #389278 it appears that Yahoo was trying to change its protocol. A quick way to have Pidgin connecting to Yahoo messenger server again is to change the Pager server setting for the Yahoo account in Pidgin. To do this, from Pidgin: ...

June 20, 2009 · 1 min · 158 words · kenno