Archive for May, 2008

Worklog: continuing the web history project

Wednesday, May 28th, 2008

These days I restored the web history project, which aims to collect time series data from the web. One good use of it is to make my own intelligence reports into many economic indicators, with the help of many online databases like careerbuilder.com and craigslist.org.

Now the project is able to restart collecting old data. The next step is to study more deep into craigslist.org and provide very detailed reports of each category/region.

A small party

Thursday, May 22nd, 2008

Just come back from a small party where there are two boys, two girls and four mothers. Lele had a lot of fun. When four kids played a bamboo dragonfly, Lele was a little unpatient during waiting his turn. After several rounds, he finally learned to wait his turn and hand the toy to the next player. He also said thank you when he accepted something from others. Lele cried when he said goodbye to his new friends. I found he became to enjoy playing with other children. I am really happy for his improvement.

Recently I am worrying if Lele is related with autism because of an article from a mother in his soccer class. Now I am encouraged by Lele’s behavior. Comparing with other children, he still lacks social skill, but he has improved than before.

Einstein on religion

Friday, May 16th, 2008

An abridgement of the letter from Albert Einstein to Eric Gutkind from Princeton in January 1954, translated from German by Joan Stambaugh.

… The word God is for me nothing more than the expression and product of human weaknesses, the Bible a collection of honourable, but still primitive legends which are nevertheless pretty childish. No interpretation no matter how subtle can (for me) change this. These subtilised interpretations are highly manifold according to their nature and have almost nothing to do with the original text. For me the Jewish religion like all other religions is an incarnation of the most childish superstitions. And the Jewish people to whom I gladly belong and with whose mentality I have a deep affinity have no different quality for me than all other people. As far as my experience goes, they are also no better than other human groups, although they are protected from the worst cancers by a lack of power. Otherwise I cannot see anything ‘chosen’ about them.

游戏时间–鹦鹉学舌(动物系列)

Wednesday, May 14th, 2008

老师说“开始”,小朋友就变成鹦鹉模仿老师说话,一旦老师说“结束”,小朋友就停止模仿。

开始先从动物名字开始。

斑马 - 鸡 - 鸭子- 牛 - 企鹅 - 长颈鹿 - 山羊 - 绵羊 - 大象 - 猴子 - 猩猩 - 鳄鱼 - 海马 - 海狮 - 兔子 - 孔雀 - 乌鸦 - 狐狸 -   猫 - 狗 - 恐龙 - 熊 - 动物

接着是句子。

动物园里住着很多动物。

斑马是身上有黑白条的马。

长颈鹿伸长脖子可以看很远。

大象的鼻子很灵活。

孔雀开屏非常漂亮。

乌鸦呱呱叫,走路摇摇摆。

兔子不会走路只会跳。

恐龙是生活在很久以前的动物。

猴子喜欢在树上跳来跳去。

北极熊生活在寒冷的地方,它的毛是白色的。

小鸡小鸭长得象,小鸡尖尖嘴,小鸭扁扁嘴,

企鹅有翅膀却不会飞,但是它会游泳。

山羊绵羊长得象,山羊胡子长长头长角,绵羊毛儿卷卷产羊毛。

“结束。”

Some programming quotes

Tuesday, May 13th, 2008

“The likelihood of keeping all or part of a software artifact consistent with any corresponding text that describes it, is inversely proportional to the square of the cognitive distance between them.” — http://c2.com/cgi/wiki?LocalityOfReferenceDocumentation

“We will encourage you to develop the three great virtues of a programmer: laziness, impatience, and hubris.” — Larry Wall

Firefox keyboard shortcut

Friday, May 9th, 2008

I am suffering from wrist pain. I’d like to use keyboard shortcuts to control my browser in order to reduce the mouse-using time. I collect some essential keyboard shortcuts for Firefox.

Ctrl + T (new tab)
Ctrl + L or F6(cursor to address bar)
Ctrl + K(cursor to search bar)
Backspace or Alt + left (browse back)
Shift + Backspace or Alt + right (browse forward)
Ctrl + [1-9] (select tab (1-9))
Ctrl + Tab (switch tabs)
Ctrl + -/+ (reduce / enlarge font size)
Ctrl + R or F5 (reload current page)
Ctrl + Enter (add http://www and .com to word in address bar)
Ctrl + F (find text in current page)
Ctrl + G (find next)
Ctrl + Shift + T (Undo last closed tab)
Shift + Enter (open link in new window)
Ctrl + Enter (open link in new tab)
Alt + Enter (open address/search in new tab)
Ctrl + W (close a tab)

Firefox built-in keyword/quicksearch

Search google by typing: g TEXT

You can add your quick search keywords.

1. visit the url, e.g. www.google.com/maps.
2. right click the search input.
3. select “add a keyword for this search”.
4. input the keyword, e.g. gm.
5. now you can search google maps by typing : gm TEXT.

You can refer more keyboard shortcuts at http://support.mozilla.com/en-US/kb/Keyboard+shortcuts.

If you are interested in IE keyboard shortcuts, please visit http://support.microsoft.com/kb/306832.

Manual grub installation to MBR

Monday, May 5th, 2008


# grub is located at /dev/hda2:/boot/grub
grub> root (hd0,1)
# install grub to MBR of /dev/hda
grub> setup (hd0)
grub> quite

Lele stays at home

Saturday, May 3rd, 2008

Lele quit the daycare on Apr. 11. It’s already three weeks.  During the past three weeks, I was busy taking him to attend all kinds of activities and tried to find something interesting to do as well as installing my new computer. In order to schedule our  activity time, I started to use google calendar. It’s a useful tool. But I eventually move to Windows calendar when I found it’s faster than google calendar. I summarize these three weeks at here.

First week:

- enrolled to an indoor soccer class at the first week.

- attended Chinese story time in Redmond library.

- attended Crossroad kid’s play and learn program.

- observe Redmond co-op preschool. Lele stayed about one hour in the class. He  likes the school very much. He kept on asking when he could go to the school again in the following days.

- walked at the river trail.

- bought some art and craft tools and paper.

- volunteered at starlight foundation.

- children museum.

Second week:

- observe Bellevue co-op preschool. Lele refused to go when we left.

- soccer class.

- walk to grasslawn play ground.

- circus at mercer island and pine lake park.

- volunteered at startlight foundation.

- swimming.

Third week:

- soccer class.

- drop-in program in the community center

- developmental obsevation at kindering center.

- volunteered at startlight foundation.

- children museum.

- kid’s workshop at home depot.

- swimming.

I am researching the summer kid’s programs. I wish we could have more chances to play with other kids and parents.

I also found some home school web sites. We will try some activities and share the experience.

Install Apache 2, PHP 5.2, MySQL server 5.0, and phpMyAdmin on Windows Vista

Friday, May 2nd, 2008

I was busy installing softwares at my new computer. The LCD monitor of my Dell laptop stopped working normally. It’s time to change to a new computer. I was using Windows XP because I am not interested in try new but unstable softwares. This time I have to change to Vista since Xudong warned me it’s hard to find some device drivers if I continue to use Windows XP.

I never know it’s so hard to let  open source softwares running on Vista. I am not the only person who meet so many problems. Whenever I met the problem, I always found many people had already met the same problems. Fortunately I could find the solutions for the problems although some of them didn’t work for my computer. Here I’d like to share my installations.

1. Installation sequence

My installation sequence is Apache -> PHP -> MySQL -> phpMyAdmin. My friend recommended me to install PHP before Apache.  From my experience (I tried both), the sequence between them doesn’t matter.

2. Install Apache

Download Apache from http://httpd.apache.org/download.cgi. At first I installed Apache 2.2.8. But I downgraded to Apache 2.0.63 when I found PHP 5.2 couldn’t work on Apache 2.2.8.

2.1. Problems

1. Cannot stop or restart apache.
2. Cannot edit httpd.conf.
3. Cannot load php5apache2.dll.

2.2. Solution

1. Download apache_2.0.63-win32-x86-no_ssl.msi.
2. Turn off UAC (optional if you don’t want to restart computer and don’t think it’s annoying that you get continuous comfirm windows during the installation.).

1. start ->control panel
2. ->user accounts and family safety
3. ->user accounts
4. ->turn user account control on or off
5. uncheck “user account control”
6. click OK
7. restart computer

3.  Install Apache as administrator.

1. start ->accessories
2. right click command prompt -> run as administrator
3. go to the diretory where you save apache_2.0.63-win32-x86-no_ssl.msi
4. type “msiexec /i apache_2.0.63-win32-x86-no_ssl.msi”
5. follow the instruction to install Apache

4. Visit http://localhost/ in the browser to test Apache. If Apache is installed successfully, you will get:

It works!

5. Edit httpd.conf if you want to change config parameters.

1. start ->accessories
2. right click notepad -> run as administrator
3. edit and save httpd.conf in notepad
4. restart Apache to let config go into effect

3. Install PHP 5.2

1. Download PHP zip package from http://www.php.net/downloads.php.
2. Unzip the zip file into a dirctory of your choice.
3. Save php.ini-recommended as php.ini.
3. Add following script in httpd.conf.

LoadModule php5_module “c:/php/php5apache2.dll”
AddType application/x-httpd-php .php
PHPIniDir “C:/php”
(suppose you extract php package at C:\)

4. Install MySQL 5.0

1. Download MySQL 5.0 setup.exe from http://dev.mysql.com/downloads/mysql/5.0.html#win32.
2. Unzip the zip file and run setup.exe.
3. Follow the instructions to install MySQL.\

4.1. Problem

1. Fail to open “MySQL server instant config wizard”.

1. Download ResourceHacker from http://www.angusj.com/resourcehacker/.
2. Run ResourceHacker and open “C:\Program Files\MySQL\MySQL Server 5.0\bin\MySQLInstanceConfig.exe”
3. Edit last resource entry (24 -> 1 -> 1033), change level=”asAdministrator” to level=”requireAdministrator” .
4. Click “Compile script”.

2. Fail to connect MySQL in PHP.

1. Uncomment “extension=php_mysql.dll”.

2. Print phpinfo() to check Apache PATH. If php installation directory is not included in the path. You need copy libmysql.dll at php installation directory to any directory included in Apache PATH.

5. Install phpMyAdmin

1. Download phpMyAdmin from http://www.phpmyadmin.net/home_page/downloads.php.
2. Unzip the zip file in your web server’s document root.
3. Create config.inc.php file and edit as following:

<?php
$i=0;
$i++;
$cfg[’Servers’][$i][’user’]          = ‘root’;
$cfg[’Servers’][$i][’password’]      = ‘cbb74bc’; // use here your password
?>

Read document.html at phpMyAdmin directory for more information.

5.1. Problem

Get error message “cannot load mysql extension, please check your PHP configuration”. Refer to problem 2 in section 4.1 for solution.

Finally I got them all runing on Vista. Good luck!