Monday, May 30, 2011

Javascript study notes

There are 2 levels of event handler model.
For level 0, We can only set the event handler as an attribute of an element.
For level 2, We can register many handlers to the same element.

We use two function addEventListener( ) and removeEventListener( )
1. Event Propagation
First, during the capturing phase, events propagate from the Document object down through the document tree to the target node.
The next phase of event propagation occurs at the target node itself.
The third phase of event propagation is the bubbling phase, in which the event propagates or bubbles back up the document hierarchy from the target element up to the Document object.
2.If registerd many handler on same element for same event, We could never grantee the order of handler invoked.
3. if you register the same handler function more than once on the same element, all registrations after the first are ignored.

Wednesday, May 18, 2011

resolve "Nonce already used or out of range"

I've encountered this error. And after looking around on the internet, The most suggested cause is wrong date. However mine is caused by another reason.
Yesterday I've revoke 'others' 's write privilege from all the files under /app/tmp/. And the Cakephp Openid component will need to update the file store to work.

The resolve solution is chmod the privilege of tmp files to 777

Wednesday, May 11, 2011

Yes, It's Online

A new personalized public sharing search engine.

Tuesday, May 10, 2011

export and import ddl from mysql

export ddl for mysql database

mysqldbexport --server=username:passassword@hostname_or_ip --skip=GRANTS --export=DEFINITIONS schema_name > foo.sql


mysqldbimport --server=username:password@hostname_or_ip --skip=GRANTS --import=DEFINITIONS foo.sql

Sunday, May 08, 2011

无题

It has been a long time since the last post. All because of the great fire wall.
Recent tasks and plans.
First of all, is my website. Now. teches for beta1.0 is ready. Only the search bundle is required now.
After that, the personal affair is really bothering me. How nice would it be if I meet the perfect girl.
Of the financial aspect, Things are going on well.
I hate waiting for nothing.
是为记