Friday, July 10, 2009

CSS - :hover don't work in IE

I hate IE.

Spent a lot of time trouble shooting my my li:hover does not appear in IE6. Works in FF, Opera, Chrome, IE7.

Anyway, read this:

It points to this:
http://www.xs4all.nl/~peterned/

Now my css will not pass validation. Damn it.

Saturday, March 07, 2009

Aptana with cakePHP


Aptana is a pretty good IDE (http://www.aptana.com/) based on Ecplise.

The great thing is that it works with cakePHP. 

Just one thing is that cakePHP v1.2 have the views with a ".ctp" extension and Aptana does not handle the code colouring, etc. Luckily this is an easy fix:

Click Window->Preferences...

Select General->Editors->File Associations

Click the "Add.." button and add in *.ctp

*.ctp will appear under "File Types". Click on *.ctp and click the "Add.." button for Associated Editors. Select Aptana PHP Editor.

Done.

Sunday, March 01, 2009

Largesse


I read this:

Just in case the story is taken off after some time, it's about this man Leonard Abess Jr. He gave away $60million out of his own pocket to his own employees after he sold off part of the bank he owns. 

He got about $700million from the sale. But the important thing is that he bought the bank on borrowed money, and built the bank from $400m to $2,750m.

In the forums that I read this from, a lot of people are saying "Wah, I wish I have a boss like him".

Maybe the interpretation of the story is different, but the message is probably about giving, not receiving. 

I'll try to be as generous as Mr. Abess.

He is a kind soul and a model for everyone.

Friday, February 27, 2009

Farewell to Carpark Auntie

This week will mark the change of carpark management at my office building. Everyday for the past 2 yrs, I'll pass by the carpark entry when going to work and greet the carpark auntie.

She has been working there for the past 13 years.  Now there's a change of management and she is retrenched.

13 years sitting in that small box for 10 hours a day. Sadly, she is just at the mercy of the company. With limited skillset, there's really not a lot of other things she can do. Luckily the carpark management company has employed her on a part-time basis (i.e. no CPF) and she only works 2 days a week, and gets like $300/mth.

A few of us treated her to a dinner today and we found that her kids are already working so she is not working to support her family, just herself. 

Couple of girls from my office bought her a handbag. I thought that's a very nice gesture.

Anyway, it's quite sad to see her go.

Monday, February 23, 2009

Useful Javascript

It's been a while, but I'm doing a bit of javascript again. I have to perform some validation on the user's input and with regular expression it makes the validation much cleaner. The downside is the someone else who comes along and have no idea about regular expression is going to have problem maintaining the code. Oh well.

Validating Email
function validate_email(field) {
  var email = document.getElementById(field).value;
  return /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email)
}

Validating Mobile Number
function validate_mobile(field) {
  var mobile_no = document.getElementById(field).value;
  return /^[89][0-9]{7}$/.test(mobile_no);
}

Clean and simple.

Friday, February 20, 2009

Kondratiev wave

Well, according to the Kondratiev wave, which seems quite accurate for 2008 recession, the economy will be at the bottom in 2012. It goes like this:

2012 - Bottom of market
2016 - Peak (Sell!)
2019 - Market panic
2023 - Bottom of market
2026 - Peak
2032 - Bottom of market
2034 - Peak
2035 - Market Panic
2039 - Bottom of market

So in 2039, I would be drawing out my CPF. The question is, what is the minimum sum at that time, and will any be left?

Friday, February 13, 2009

Updates

Well, one year plus with no updates. How am I going to remember what happened when I'm 60?

Summary of 2008:
  • Made it as key senior official for Singapore Grand Prix after all. Missed the Clipsal training, but went for the Melbourne F1 race. Great experience
  • Met a lot of people through F1. Most nice a few, er hem. Cannot wait for F1 season to start again.
  • Also made it as one of the trainer for Singapore GP to train the officials.
  • Completed the K1 series with the finale at the SGP paddock area. Quite a memorable and good event.
  • Sold off the Toyota EE100 1.3 Carb and got a 2007 Subaru Impreza TS at $49,995 on 26 Dec 2007. (Probably the cheapest it was ever on sale for, due to the new hatch back model being sold)
  • Sadly, sold off the Toyota KE70 4AGE 20V Quad Throttle Sept 2008. Haiz. No money don't play car. I still think about her(?) sometimes. At least now don't pay road tax for two cars.
  • Converted TS to rear wheel drive. Yippee
  • Work wise, wanted to leave but decided to stay at current company.