My Blog

Blog


jQuery : Select A Tab via Text Link

8.05.2010 | 0 Comments

Opening a tab via a text link sounds trivial. But when tried, it’s actually not. I mean, it is an easy fix if you experienced it before but for someone who is still learning the ropes of jQuery and JavaScript in general, it’s quite frustrating.
Read more…


WordPress 404 Page Not Working in IE

7.29.2010 | 0 Comments

As stated in the title, my 404 template in WordPress does not show up every time a non-existent URL is accessed in my site. The page works perfectly in FireFox and Chrome, though. So I made a quick search and found that the solution is to add another header information in the page. So here’s what to insert at the very start of 404.php.


<?php ob_start(); ?>
<?php header("HTTP/1.1 404 Not Found"); ?>

For this, credit goes to wpcanada.
http://wpcanada.ca/2008/03/20/ie-and-custom-error-pages/

Read more…


Reset MySQL Root Password in CentOS

7.21.2010 | 0 Comments

“Senior moments” tends to occur more frequently these days. Sign that I’m getting old. And several times already, I forgot the root password of my MySQL installation.

You can recover MySQL database server password with following five easy steps.
Read more…


POSB – PayPal Bank Code and Branch Code

7.17.2010 | 3 Comments

Adding a bank in PayPal is easy especially if you are a POSB/DBS client. But first, you need to know some bank codes to be able to proceed. I did not easily find the needed information from the DBS website (I know it’s somewhere there but I just can’t find it even after scouring the ibanking system). Luckily, UOB has a list of the codes needed as pointed out in the PayPal forum.

So in case I need it again, I’m posting it here. It’s not just for my benefit but also for those who happen to stumble in my site.

Bank Name : Post Office Savings Bank
Institution Code : 7171
Branch Code : 081
Account No : [your 9 digit account number without the dashes]

IMPORTANT NOTE:

  1. All POSB branches has one branch code — 081. The actual branch is embedded in the 9-digit account number.
  2. This is only applicable for POSB accounts with 9 digits account no. Those with 10 digit account numbers must refer to their own respective branches.
  3. Your account name in this form should be the same as your account name in your bank. Otherwise, there will be a SGD5 return fee that will be charged on your paypal account.

Read more…


Oracle IN : Maximum Number of Values

7.10.2010 | 0 Comments

In case you wonder what it the maximum number of values you can put inside the IN condition, it is 1000 as of Oracle 9i. It is documented in the link below.
http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96536/ch44.htm#288033.

Example:

SELECT * FROM emp
WHERE emp_no IN(1,2,3,4,5......1000);

I needed this because I was given a long list of values (around 500 values) and I need to fetch records in a table using that data. It would be easy if I can insert it first into a temp table and then join. Unfortunately, I only have read rights on the database so I need to use the IN condition. But I got concerned because in Oracle 7 and 8i releases, the maximum number of values you can put inside IN is a maximum of 255 (one byte).

Note:

Take note that the IN(SUBQUERY) does not have limitations because that’s essentially a join.

Example:
SELECT * FROM emp
WHERE emp_no IN(SELECT emp_no FROM dept_emp);

However as part of my best practices, I make sure that the results of the IN subquery is either one or none for optimal performance (not applicable in some instances).