Saturday, November 19, 2011

simple way to enable mod_deflate in httpd server

http://httpd.apache.org/docs/2.0/mod/mod_deflate.html
Compress everything except images

<Location />
# Insert filter
SetOutputFilter DEFLATE

# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</Location>

Sunday, November 13, 2011

resolve undefined symbol: Perl_Gthr_key_ptr

When I upgrade my OS to Fedora16, such error occurs when I ran my perl program. use yum to reinstall perl dose not work.
The solution is as following
1 rm -rf /usr/local/lib64/perl5
2 reintall perl
This should work

Friday, July 29, 2011

status

The beta version of loading click stream has been released.
The DDL for database is designed.
next step
will wait the requirment and do some pre-computing.
Also, the time is still unsolved yet.

Tuesday, July 19, 2011

Click flow analysis

Currently, about 30G of click records are logged. About 80M rows of records. For the first version, We'll get the basic PV PU etc.
We use the perl script to do the job for now.

And we find a good module called module bigint
Unlike integer, this pragma creates integer constants that are only limited in their size by the available memory and CPU time.

Since we can use the database to do calculation. The script will only nomolize the records and then load into the database.

We can defined the format of to be loaded data now.

Monday, July 18, 2011

current status

For now. I'm working on the click flow staff. We have no privilege to code the script of logging. We can only make use of the log files. I have developped the scripts. Waiting for the measurements now. The model is quit useful though. Many of them can be imply, some of them cannot. Will need the data of the real data to test the performance with vast number of customber. And we have to analysis the customers seperatly.

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.
是为记