Sunday, December 14, 2008

Sunday, October 26, 2008

Magician

My elder sister got jay's latest album again 'Capricorn'...
I like the song 'Gei Wo Yi shou Ge De Shi Jian' means give me the time of a song.
I've read the lyric, so touching...

Saturday, September 20, 2008

Jay on the run

Long holiday has passed and the school will start again. Maybe i'll be on the run too.

Wednesday, September 10, 2008

L

A genius detective in Death Note movie, known as L. Using his intelligence to solve lots of mystery cases. Cool!

Saturday, September 6, 2008

Jay Again In Concert



Jay in concert, playing piano... Freshly draw....

Harry Potter



I wish I can join the exciting of magic world. Then I can own a time turner, so I can back and forth to the time i want...Isn't it incredible???

Monday, September 1, 2008

Useful code in VB2005 to lock input key

This code is written in the keypress event handler. It will lock the type of key. So, user won't type the restricted key(s), which is defined by the programmer.
Beside alphabet and digit, this code also available for keys like quotation, which will cause error for input into database by using SQL query.
Example code below means user only can input digit and plus symbol.

----------------------------------------------------------------------------------
Private Sub txtphone_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txttelp.KeyPress
If Not (Char.IsDigit(e.KeyChar) OrElse Char.IsControl(e.KeyChar)) AndAlso Not e.KeyChar = "+"c Then e.Handled = True
End Sub
----------------------------------------------------------------------------------

Try it yourself, it really works!!!

Tuesday, August 26, 2008

Secret

Uhm, the original of this drawing is already given to a friend of mine. Luckily, I'd saved a copy in my computer.

Monday, August 25, 2008

Encrypt value

Some confidental information as password, mostly need to be encrypted. Here I have a simple coding in VB 2005. To decrypt, just need to make the same code with encrypt, then change to it's opposition code. If in encrypt using *2 (times 2), then in decrypt using /2 (divided by 2). Here is an example of encrypt code. Try it yourself...

----------------------------------------------------------------------------------
For i = 1 To Len(Password)
Result = Result & Chr(Asc(Mid(Password, i, 1)) * 2)
Next
----------------------------------------------------------------------------------

Simple code to save n retrieve data from registry

Sometimes, we need to use registry to save some information of a system. That's better than using text file which can be removed easily by user. Here I have simple code in VB 2005 to make it. Just using SaveSetting and GetSetting. SaveSetting for save the value and GetSetting for retrieve the saved value.

Example:
SaveSetting "MySystem", "UserManagement", "Server", "Elini"
servername=GetSetting "MySystem", "UserManagement", "Server"

To see where the value is saved, follow steps below:
1. On the start menu, choose and open Run...
2. type regedit and click OK button
3. Open HKEY_CURRENT_USER -> Software -> VB and VBA Program Setting
4. There will have a folder MySystem -> User Management as set before in SaveSetting code
5. Open the folder and there will have variable name (in this case will be "Server") and the saved value.

Wednesday, June 4, 2008

I like drawing





One of my hobbies is drawing. I'm not expert, just like it...
See more of my drawing
Jay hip hop
Mary Chan
Pansy

Mostly i will draw Jay Chou. Because my elder sister is a big fan of jay chou.
So, I got lots of his pictures to draw.

Wednesday, April 30, 2008

Javascript for Credit Card Validity

I had a team project at school, making a website which need to input customer data to complete a business transaction.
The transaction needs customer credit card information and of course we must to check the validity of the card number for certain card type.
That's the problem, we didn't know how to make it.Then after I searched, I got information of how to make it and it really works. Fortunately it also helped us to add extra points in our website project.
What we did is just to add a javascript into the head section of webpage (page where user will input the credit card number). The javascript below only for checking 4 types of credit card.
Click this link to get the javascript code:
CardValidity