Fishpond 604x90

Tuesday, November 21, 2006

Input chinese in firefox is solved!!!

Now firefox and other gtk applications' input method is controlled by an environment variable GTK_IM_MODULE, after setting it to scim, and export XMODIFIERS='@im=SCIM', I can use scim directly in firefox, without the hassle of starting firefox under Chinese environment, which causes ugly fonts.

Sunday, November 19, 2006

Bee


This picture is taken this morning. The silhouette of the bee looks quite interesting to me.

Tuesday, October 24, 2006

A visit to bird park




Last sunday, I went to the bird park with my roommate. The park is not quite large, but there are lots of birds in it. With my S3 IS, I took a lot of pictures of the birds. Here are some that I like most.

Friday, October 06, 2006

How to change cursor theme under FreeBSD

modifiy the file /usr/X11R6/lib/X11/icons/default/index.theme from

[Icon Theme]
Inherits=core

to

[Icon Theme]
Inherits=your_desired_cursor_theme_name

which should be installed in the same directory as default.

Monday, October 02, 2006

Sending SMS over irda with my new Nokia 6070

After some struggle, with the help of google, I finally found out how to send sms from my computer over infrared connection with my new mobile phone Nokia 6070. To do this under FreeBSD, I have installed birda. Then connect the phone to my computer with

$ ircomm -d /dev/cuad1 -y /dev/ptypv -v 2

This is my second serial port, which is visible after infrared is enabled in the bios. Now the phone should be detected and connected successfully. The screen shows

query completed
discovered Nokia 6070, address=d2250000, hints=PnP, Modem, Fax, Telephony, IrCOMM, IrOBEX
query completed
115200 baud
LAP connected
comm connected

I use minicom to communicate with the phone

$ minicom -p /dev/ttypv
Welcome to minicom 2.1

OPTIONS: History Buffer, F-key Macros, Search History Buffer, I18n
Compiled on Sep 29 2006, 19:56:44.

Press CTRL-A Z for help on special keys

AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0
OK

The last line shows that it connects correctly. With the following command, I'm able to send an sms

at+cmgf=1
OK
at+cmgs="your phone number here"
> hello, a new test
> hope it works
>
(Type Ctrl-Z here to send the message)
+CMGS: 12

OK
Done, I got the message instantly. Good luck for your exploring with your mobile phone.

Tuesday, September 19, 2006

largest static array size in UNIX

After puzzled by this question for several times, I finally decided to find out the answer. After writing some trial programs, I discovered that the size is related to the system stack limit. Under FreeBSD, the limits can be gotten by limits command. Under other OS, you can use getrlimit function to get various limits of the system.

Wednesday, September 13, 2006

Line wrap problem for emacs with ecb

It has hassled me for a long time that when using emacs, some times after some action, the line can't wrap around as usual, and I can't reverse back. Today, I finally decided to solve it. After some tedious commenting out and removing comments in the .emacs file, I noticed that it is ecb which causes the problem. Thus I went to ecb's homepage and read the FAQ. The solution is right there, which says "Check the variable truncate-partial-width-windows and set it to nil". What a relieve it is.

Monday, September 11, 2006

A night at Singapore river side


Last Saturday, I spent some time at Singapore river, taking some photos, just to try out my new camera. This picture I love most. As I just begin to learn photography, the photo may be not that great, but I will improve, definitely.

Wednesday, September 06, 2006

Control multi computers with single keyboard and mouse

I just discovered that there is a program called synergy. With this program, you are able to control multi computers with single keyboard and mouse. How it achieves this is by making a server and many clients. The server's mouse and keyboard is the control one, and other clients will receive signals from the server to do the proper task. What you need to do is simply move your mouse out of the boundary of your display, thus it will enter another one. This program is really cool. More information can be found on the website http://synergy2.sourceforge.net

Tuesday, August 01, 2006

Canon Powershot S3 IS

My old Canon IXUS II was broken, and was sent to repair. I decided to buy a more powerful digital camera. I find this model -- Canon Powershot S3 IS is just the type of camera I'm looking for. The price is acceptable compared with a dSLR one. It has ultrazoom, which is 12X optical zoom, and the articulate LCD is wonderful.
I bought it last Sunday, and I am very excited about it. There are a lot to learn to catch a beautiful picture, and I'm already on my way to the art of photography.

Friday, July 21, 2006

Flash problem on FreeBSD

I just found this link http://altbit.org/pseudorandom/unixlike_translation.txt gives a detailed solution of how to solve the problem of viewing flash with firefox on FreeBSD. I haven't tested whether it works or not, as my browser has enabled flash with the help of the posts on FreeBSD's mailing list.

Friday, June 30, 2006

Install maple10 on FreeBSD

This version of maple can not be installed directly without effort. The java run time environment doesn't function properly. I have to patch the kernel as pointed out at http://www.freebsd.org/cgi/query-pr.cgi?pr=92671 and recompile ther kernel. I don't know whether it will work or not yet. But it seems that it has improved a lot after playing with it a while on another Linux machine.

Wednesday, April 26, 2006

pam_ssh and kdm

For users of ssh, we can use an ssh-agent to manage our keys and connect to other ssh servers without typing password explicitly. However, you will need to type the password twice each time you login to the system, then start an agent and use ssh-add to get the passphrase. This is inconvenient if your password for login and the key file are the same. We can change this behavior by editing pam files. Here is how I made it with a kdm login manager under FreeBSD.

Edit /etc/pam.d/kde, add lines :

auth sufficient pam_ssh.so no_warn use_first_pass
session optional pam_ssh.so
below

auth required pam_unix.so no_warn try_first_pass

Note that the order of the two auth line is important. For more details, read the manual pam_ssh.

Saturday, April 15, 2006

Best download accelerator under UNIX -- prozilla

This software really works. It can automatically search mirrors for a particular software and download it from the fastest of them. It will separate the file to several parts so the download speed can get to the maximum.
I use it to download Knoppix CD which only costs me about 15 minutes. The speed is about 600Kb/s. So try it if you want to download any large open source software from the internet.

Friday, April 14, 2006

Hard disk upgraded

My hard disk has been almost full for sometime, and I have to copy data in and out from another external hard disk frequently. Yesterday, I finally decided to buy a new 80G one for my notebook. It is a Hitachi Travelstar with 5400 rpm and 8Mb cache. I spent 3 hours to setup everything, including back up my system, install the new hard disk and restore the system. The performance of the new hard disk seems quite good. I also reformatted my old hard disk and made an encrypted filesystem on it. I used freebsd 6's new method geli and wrote 2 scripts to mount and umount that filesystem. Now I'm quite happy with the result. I won't need to worry about the security of the data on my external hard disk any more.

Tuesday, April 11, 2006

Possible research direction

After playing with Green functions for some time, we found that the perturbation method using Feynman diagrams is quite difficult to calculate, especially for high order terms. It seems that one can use mean field theory to get some qualitative results. However, if the fluctuations locally are important, mean filed theory will fail to work. I'm not sure how it works on our problem. But my supervisor noticed that the calculation can not converge properly. Another way to solve this problem may be renormalization group method, which is claimed quite powerful. However, I have no experience on this subject, so I'm reading some papers on that which date back to 1970s.

Wednesday, January 04, 2006

The Da Vinci Code

I just finished a best selling novel The Da Vinci Code. I didn't read through it, but listened the audiobook version. I had spent several days on it. The story is fantastic, and I learned more about Christianity. As I had said before, I'm an atheist. But I always feel that religion is an interesting topic. There are some truths lie in the documentary of the gods, and to find out the real story of a deified human is interesting. Jesus is just one example. He is a human being for sure, a great political or religious leader. However, because he was treated as a god, worshiped by many people, his real life story was forgotten. The Da Vinci Code gives some explanation for that. I'm not sure how much is true in the novel, but it is a good, fascinating novel. I have some trouble to interpret the final secret, maybe I should read it again sometime later.