//returns the date of the last day of this month
function lastDayThisMonth($offset = 0) {
return (int)strftime("%d", mktime(0, 0, 0, date("n") + $offset + 1, 0, date("Y")));
}
//returns the day of the week of a given day
function dayOfTheWeek($dd, $mm, $yyyy) {
return date("w", mktime(0, 0, 0, $mm, $dd, $yyyy));
}
//returns the date of Good Friday in yyyy-mm-dd format
function easterFriday($yyyy) {
$firstDig = 0;
$remain19 = 0;
$temp = 0;
$tA = 0;
$tB = 0;
$tC = 0;
$tD = 0;
$tE = 0;
$firstDig = floor($yyyy/100);
$remain19 = $yyyy % 19;
$temp = floor(($firstDig - 15) / 2) + 202 - 11 * $remain19;
$temp = $temp % 30;
$tA = $temp + 21;
if ($temp == 29)
$tA = $tA - 1;
if ($temp == 28 && $remain19 > 10)
$tA = $tA - 1;
$tB = ($tA - 19) % 7;
$tC = (40 - $firstDig) % 4;
if ($tC == 3)
$tC = $tC + 1;
if ($tC > 1)
$tC = $tC + 1;
$temp = $yyyy % 100;
$tD = ($temp + floor($temp / 4)) % 7;
$tE = ((20 - $tB - $tC - $tD) % 7) + 1;
$dd = $tA + $tE;
if ($dd > 31) {
$dd = $dd - 31;
$mm = 4;
} else
$mm = 3;
return strftime("%Y-%m-%d", mktime(0, 0, 0, $mm, $dd - 2, $yyyy));
}
03 December 2008
01 September 2008
25 August 2008
Ride to work, first round trip
Left home at about 7am, arrived at work at about 7:40. 40 minutes, 16.9km, top speed 38.7km/h, average 25km/h.
Left work at 4pm, got home at about 5pm. Up hill all the way, only averaged 19km/h. Top speed was about 44km/h.
Left work at 4pm, got home at about 5pm. Up hill all the way, only averaged 19km/h. Top speed was about 44km/h.
21 August 2008
Ride home day...
First thing in the morning, listening to the news. Well, this morning's news was a little bit unexpected, a plane crashed in Spain, reminded me the horrendous Tenerife accident in 1977. Anyway, what really annoyed me was they said there 'might' be small hails late today.
What I learned from the hail storm on 28 Feb 2007 was, never park my car in an open car park if there will be hails coming. Luckily my wife is taking today off, so she dropped me and my bike in Civic and I rode to work from there. Went to Civic during lunch time to pick up some cycling gear, and went to ANU for a couple of hours after work. Rode home at about 7:15pm and arrived at 8.
The 16km trip took me 48 minutes, caught up on Gungahlin drive thanks to the stupid bike lane that goes up and down. Only averaged 19.9km/h, topped at 39km/h. First time to ride home, hope next time I can beat 40 minutes.
What I learned from the hail storm on 28 Feb 2007 was, never park my car in an open car park if there will be hails coming. Luckily my wife is taking today off, so she dropped me and my bike in Civic and I rode to work from there. Went to Civic during lunch time to pick up some cycling gear, and went to ANU for a couple of hours after work. Rode home at about 7:15pm and arrived at 8.
The 16km trip took me 48 minutes, caught up on Gungahlin drive thanks to the stupid bike lane that goes up and down. Only averaged 19.9km/h, topped at 39km/h. First time to ride home, hope next time I can beat 40 minutes.
20 August 2008
Windows XP woe at the bowser

Got a $25 fuel card for renewing my NRMA membership earlier this year, tried to used it yesterday at the servo in Gungahlin. After joking with the boy at the counter by saying I fueled my car at pump zero (it was actually 10 with the "1" somehow hidden behind the pillar), the POS machine became frozen, all of a sudden.
Fortunately it didn't show any BSD, but it did show up the Windows version info at the bottom of the screen while rebooting. Quite interestingly, the screen on that swipe card thingy did show some more entertaining, like "Wow Initialising", and "Wow Logon" blah blah blah...
I wonder what's gonna happen when Micro$oft withdraws its support to Windows XP, completely.
Quest for better health
Influenced by my fabulous colleagues, I have picked up running and cycling. Got a secondhand Giant OCR1 for $800 with loads of accessories, my cycling exercise started on 19 Aug 08 and the first trip was about 8km at a top speed of 39.1km/h, and today I reached a top speed of 41.7km/h, both trips were on a hilly road. These are the things I have done from day 1:10 Aug 3.1km (running)
11 Aug 3.2lm (running)
12 Aug 3.1km (running)
13 Aug 3.0km (running)
14 Aug 3.2km (running)
15 Aug 3.0km (running)
16 Aug had a rest
17 Aug 2.4km (running)
18 Aug 3.6km (running)
19 Aug 8.1km (cycling)
20 Aug 6.4km (cycling) 2.0km (running)
21 Aug 20km+ (cycling)
22 Aug 2.4km (running)
23 Aug 3.2km (running)
I'll keep updating this post...
29 February 2008
IP Law Resources
First read: Laying Down the Law - Book
Any IP Law book published in 2005+
http://www.wipo.int/freepublications/en
Any IP Law book published in 2005+
http://www.wipo.int/freepublications/en
29 December 2007
The new Apple iBoob?
17 November 2007
Jason's blah blah blah
- Configuration used for installing PHP5 on Mac OS X:
This doco on how to install gd library on OS X is particularly helpful:
http://www.libgd.org/DOC_INSTALL_OSX
- To validate a regular expression in the nutch conf files:
06 September 2007
Canberra Suburbs
View Larger Map
- Driving from Lloyd Pl Kambah to the Old Parliament House via the Pkwy, Cotter Rd and Adelaide Ave is a 17lm trip, which took about 15 minutes when the traffic is light, and there are about 4 ro 5 traffic lights along the trip.
- Driving from Erindale Shopping Centre to the National Library is a 16 km trip, took about 20 minutes via Yamba Dr and Adelaide Ave when the traffic is light. There are about 5 traffic lights along the trip.
- Driving from the intersection of Mirrabei Dr and Gundaroo Rd (Ngunnawal/Nicholls) to the National Library via Gundaroo Rd, Gungahlin Dr, Barton Hwy, Northbourne Ave spans 14.5 km and took about 20 minutes when the traffic is light, and there are about 10 traffic lights along the trip, most are on Northbourne where traffic is very sluggish.
Mawson / Lyons are both small, thinly traded suburbs located in Woden Valley. These suburbs are affordable and people can go in there and do some work to the older style homes to make them more comfortable.
Curtin, also located in Woden Valley, many experts believe it's undervalued and offers good growth prospects.
Gordon's median house price grew strongly in the past year, largely boosted by new development. This area has a natural restriction on the supply of land since its near the NSW border. Values are expected to grow but in the long term.
Subscribe to:
Comments (Atom)


