Monday, July 28, 2008

onmouseout and onmouseleave

onmouseleave is only for IE, but is helpful to suppress the event from the children nodes.

Some introduction in http://www.quirksmode.org/js/events_mouse.html.

Actually, I am looking how to have cascading menu disappear when mouse out.
I hope this example http://bytes.com/forum/thread553630.html is going to help. Got to try it later on.

Wednesday, July 23, 2008

knol

CNet report :
Google's Wikipedia rival, Knol, goes public

Just created an article and saved, but I did not see where was it.
Click My Knols, but always go to search page. Not quit good experience.

Monday, July 21, 2008

button size

Try to fine tune button size.

IE has long button bug, to work it out try this solution.


FF also has a problem, which can not make it smaller (can't remove padding).
According to http://www.designdetector.com/demos/buttons-padding-demo.html,
3px padding left and right, and 1px padding top and bottom appears to be added even when zero padding is applied. Looking at bugzilla, I found Bug 140562 – button control with 0px padding still displays a frame around its contents. Hope it will be fixed in the 3.1 release.

Friday, July 18, 2008

File upload statistics

The syntax should like

<input type="file"
maxsize="xxx"
progressInitColor="color1"
progressFilledColor="color2"
>

Also, file object should have "progress" properties, which show what is uploading percentage. So, javascript function can read that.

For the UI, once the file is starting to upload, INPUT file area show progressInitColor as background color and progressFilledColor flooding in base on uploading percentage. Also, the upload percentage number show next to file name.

This is what I think.

I saw some of ajax implementations show the file upload status bar. They are all by stage, not really progressive. As browser security, server don't know the file size until fully upload, so there is no way to use ajax to create real progress bar.

Tuesday, July 15, 2008

Notepad++ - replace a pattern with line break then sort line in the order

There are something new in the Notepad++ 5.0.

I can replace a pattern with line break.
Let's say I have
"AAA" "BBB" "CCC" "ABC"
I enter CTL+F to open Find, then switch to Replace.
In Find What, I enter " " and Replace With \n, then I need to check Search Mode > Extended (\n, \r ...). Then hit "Replace All" button.
I got
"AAA
BBB
CCC
ABC"
I just delete two quotes simply.
Then in the menu > TextFX > Text FX Tools > Sort Line ...

That's all.
Notepad++ is getting better and better,

Monday, July 14, 2008

PHP vs JAVA

PHP VS JAVA





  1. PHP is easy to develop and deploy.


  2. Java is programming language, but PHP is only presentation layer for web.

    1. Some feature PHP can't do that.
    2. Java is sophisticated. Java has more libraries.
    3. Java can do thing more organized. People is arguing PHP code is messy.
    4. Ideally, we would like to some layer in the application for better developer collaboration, like presentation layer, logic layer, database layer.



  3. PHP is still evolving and some fundamental structure is not well planned. New version of PHP add some lack features. However, when update to new version PHP, backward compatible is big issue.


  4. More vendors support java. More enterprise certify java. More community force for java.


  5. PHP use oci to connect database. OCI is considering faster than thin drive, but more depend on system environment. Oracle suggest to use thin driver as server-side internal driver.