Honda NSR150 Stock Paintwork

July 12th, 2010

The original and the perception that this is the only stock paintwork of NSR 150:

No! This is NOT the only one. There is another one too!

However, I have yet to see this stock paintwork in Singapore yet. Maybe Singapore doesn’t import this paintwork of NSR 150. If my memory did not failed me, I saw this paintwork before at some Taiwan and Hong Kong websites.

This is very disappointing despite the sales of NSR 150 in Singapore was very good during the 90s. One old friend of mine even told me that NSR 150 SP was so hot and popular during the 90s such that every car-park has at least two NSR 150! When he was still studying at Singapore Polytechnic during year 2000, there were about 30 ++ NSR 150 in the car-park!

Now on the road, we could still see quite a number of NSR 150 alive. Its reliable engine and low costs maintenance still makes it a popular choice among youths. Even some uncles are still riding it, with the mounting of rack and box! Hope the spirit of NSR does not die!

Willie Automobile

Unlink in CakePHP

July 9th, 2010

unlink in CakePHP 1.3 doesn’t seem to work perfectly. You will always receive Warning error (2) due to “No such file or directories”.

Fret not! Allow me to introduce the class File in CakePHP 1.3

Apparently, little documentation, examples or tutorials have surfaced for this File Class. But, we shall make use of this to delete file/directories in CakePHP 1.3

For instance, you would like to delete butterfly.jpg under YOURWEBROOT/img folder. First, you construct a File object:

$file = new File(WWW_ROOT ."/img/butterfly.jpg");

As you can see, we make use of CakePHP WWW_ROOT to define the directory instead of using $this->webroot. This is because the file are store using system directories. By using webroot directories, CakePHP will output “No such file or directories” error again.

Example output of WWW_ROOT: E:\xampp\htdocs\cake13\app\webroot\
Example output of $this->webroot: \cake13\

Last but not least, to delete butterfly.jpg, we do the following:

if($file->delete()){
   echo "file deleted successfully";
}else{
   echo "file failed to be delete";
}

$file->delete() return true when the file has successfully been deleted. Hence, we check for successions of file deletion using the if statement as shown above.

I hope this tutorial helps ! :D

Willie Programming , , , ,

Javascript in CakePHP 1.3

July 8th, 2010

The newly updated version of CakePHP in version 1.3 packs a punch! It is now more easier to code as the Helper methods are better organized now.

For instance, linking external javascript in CakePHP 1.2 is quite an hassle as Javascript itself has Javascript Helper. However, The Javascript Helper is deprecated in 1.3 and will be removed in future versions of CakePHP. Henceforth, lets look at how HTML Helper load javascript.

In CakePHP 1.2, to load an external javascript, we do this:

<?= $javascript->link("jquery", true); ?>

Now in CakePHP 1.3, we can make use of HTML Helper, we do the following:

<?= $html->script("jquery"); ?>

Nevertheless, if you have multiple external js file to load, you can load it into an array:

<?= $html->script(array('jquery','wysiwyg','scripts')); ?>

Easy and more organized now eh? External CSS files were all along being load using HTML Helper. Now with the loading of Js files through HTML helper instead of invoking Javascript Helper, it is much more convenient! Moreover, you will only need to load one helper which is HTML Helper instead of loading 2. :D

Willie Programming , , ,

童安格 – 耶利亚女郎

July 5th, 2010

Very classic old song that spans around all pubs and KTVs during the 90s

Willie Uncategorized

Fixing my NSR frame leg

July 3rd, 2010

Recently, got into accident again. My NSR takes much of the damage due to the nature of being a fairing bike (sports bike). As this time round I can’t didn’t claim insurance, all the repair works have to be D-I-Y by me alone.

I noticed from experience that once NSR fairing(s) absorb the damages, caused from the accident, the frame “leg” holding the fairing together tends to get crooked. Rather to buy and waste your precious time looking through Honda Distributor for a new one, might as well you KNOCK it with hammer.

Yes, knocking the frame leg hard enough can get it back to shape. But you can’t expect it to 100% fit the fairings. You need to squeeze before you can really tighten the farings together.

In the mean time, I will go take some pictures of how the frame leg looks like. Do bookmark!

Willie Automobile

Jack Neo’s Army Song

July 1st, 2010

NSR250 Race (烈火戰車)

June 28th, 2010

Dropdown menu for WordPress Archives

June 20th, 2010

As your wordpress ages on, the archives list is getting longer and longer. This doesn’t look neat and tidy at all. Hence, just replace the following code:

Original:

1
2
3
<ul>
   <?php wp_get_archives('type=monthly'); ?>
</ul>

Replace with:

1
2
3
4
<select name="archive-dropdown" onChange='document.location.href=this.options[this.selectedIndex].value;'> 
   <option value=""><?php echo attribute_escape(__('Select Month')); ?></option> 
   <?php wp_get_archives('type=monthly&format=option&show_post_count=1'); ?> 
</select>

Disclaimer :: The original archive code should be written in most wordpress theme. Just replace it and you will get:

For more template tags and regarding archives, do refer to http://codex.wordpress.org/Template_Tags/wp_get_archives

Willie Programming, Software

Adjusting NSR 150 Oil Pump

June 12th, 2010

This is a guide written by me to adjust Honda NSR 150 SP Oil Pump to increase or to decrease your 2T Oil intake. If you are having too much white smoke, you might want to decrease your 2T oil intake and vice-versa.

Warning :: It is highly recommended that you have some basic mechanical skills to perform this job. You must understand that a wrong adjustment of the oil pump might caused piston seizure or even reducing the lifespan of the engine. Henceforth, I hold no responsibility for any damages caused by following this guide to adjust your NSR 150 oil pump.

First of all, remove your right cowling to access the bike Oil Pump system. Then,

Next, understand that the red highlights in the picture below is the Oil Control Cable.

With this in mind,


You might noticed that there is a lock nut too below the “documented” lock nut in the picture above. Remember to screw both lock nut tightly once you have finish adjusting the oil control cable. Failure to do so might result the Oil Pump system going haywire!

Do keep in mind that the aligning mark on the oil pump drum MUST aligned with the index mark projection on the oil pump body when you do a full throttle. This is the default setting for the Oil Pump system. However, an extra adjustment of 1mm (0.04 inch) of the oil pump drum aligning mark going pass the index mark projection is acceptable. The 2T intake will be further increased.


In addition, NEVER let the index mark on the oil pump drum aligned before the index mark projection. Failure to do so might result in serious engine damage!

Once you are done with the adjustment, just tighten both the adjusting nut and lock nut to “secure” the oil control cable.

That’s all for my guide. One last tip to share, a few round turning of the top lock nut on the oil control cable is very sensitive. A few round can affects the 2T ratio to petrol even though the Oil Control Cable doesn’t seem to be going downward. Adjust accordingly to your own needs.

Good luck and have fun!~

Willie Automobile , , , , , , ,

1 Year Soldier

June 11th, 2010

Officially left with 365 days to ORD …


sian :(

Willie Life