Friday, March 30, 2007
Friday, March 23, 2007
Wednesday, March 21, 2007
Monday, March 19, 2007
Friday, March 16, 2007
Thursday, March 15, 2007
What is second grade fluid?
Tuesday, March 13, 2007
Friday, March 09, 2007
Using Tabs in vim 7+
- With the option -p in the command line, you can open the files in tabs style.
- When you are already in vim, the following command will show all tabs.
- If you want to open a new tab when vim already on, use tabnew command
- In order to rearrange the tab, use the command tabm n to put the the current to nth position, keep in mind that all tabs position are start from 0 rather than 1. the following command will set the current tab to the 4th. tabm without argument will move current tab to the last.
Wednesday, March 07, 2007
Convert between different encoding file.
But there is a problem that Mobipocket reader can only support Unicode for other character sets like Chinese, I must convert the Chinese text file into Unicode.
For Windows system, just open the text file with Notepad, Save the file as a new file, where select the encoding as Unicode. This works fine.
For Linux syste, it is a litlle bit confusing, first you should know the encoding type of your files. A Linux command file, with option --mime, you will get more information about the file. For example
> file --mime mytext.txt
After that, you can convert the file to Unicode from its original encoding using iconv. You can get lots of information of how to use iconv, here I open give a short example.
>iconv -f GB18030 -t Unicode -c ming01.txt -o ming01uni.txt
〖原创〗童言无忌之聋哑人
有的人很可怜,
眼睛看不东西,
有的人可怜,
听不到东西,
还有的人是哑吧,
不会说话。
然后苗苗说,还有的人很可怜,鼻子不通气,
注:她这两天有点流鼻子,鼻子不通气 .
English version;
My wife always tell my daughter a story before she goes to sleep. It is the same yesterday. There is a blind man in the story.
After the the story. My wife said,
it is misfortunate that some people in the world are blind,
it is also misfortunate that some people are deaf,
it is misfortunate that some people are dumb.
Showing miserable face, my daughter added,
it is even misfortunate that some people have a stuffy nose.
(My daughter already have a stuffy nose for two days).
Tuesday, March 06, 2007
Fail to config Gtalk in Gaim under Suse
First, I direct download the source code of gaim 1.5, configure, make, make install. Then I can start gaim. It looks very nice with may protocols like MSN, Yahoo messenger, and so on. After I follow the instruction of using gtalk in Gaim ,
it show the error message "server doesn't use any supported authentication method". With some google works, I found the tips to solve this error. It is from comment by Freddy on Chris Shiflett's google talk instruction. The idea is recomplie the source code the gnutls enabled.
./configure --enable-gnutls=yes
At that time, I realize I still have no gnutls lib installed. This lead me to the gaim office project pages about gnutls. Download the related libs and install all of it, I find there is a error in this FAQ section about lib installation, that is
LD_LIBRARY_PATH=$HOME/lib ./configure --prefix=$HOME --with-libgcrypt=$HOME
This can not pass the configuration, after I check the help of configure, I find the currect options should be
--prefix=$HOME --with-libgcrypt-prefix=$HOME
After all this effort, I can use MSN and Yahoo Messenger but when I use gtalk, gaim crashed. I have tried all I can do, but still no good solution. Maybe use the browser based gtalk is my only way, or there are other tips to solve the problem.
Monday, March 05, 2007
Chinese cartoon in classical paint style.
Thursday, March 01, 2007
Firefox about pages
about: A simple prompt without any parameter will display the Mozilla “about” information. Since it’s accessible from the top menus as well, it’s not quite a hidden feature.
about:buildconfig Obviously, it will show the build platform configuration and parameters
about:cache Will display info and statistics regarding your disk’s cache, including the name of your cache’s directory and a list of the entries you can find there. By default, Firefox doesn’t allow you to view the cached webpages, so this can be an useful option.
about:config Oh look, many many info. Indeed, it’s the most complex and meaningful of them all. Careful on what you plan to change here, your browser won’t run properly after if you play with the wrong things.
about:plugins Of course, what is Firefox without it’s powerful extensions? This option will display detailed information about all the plugins installed for Mozilla Firefox.
about:credits It’s time to give the credit to whoever deserves it. There’s an alphabetically sorted list of all the people that gave their contribution to the development of Firefox.
about:Mozilla This is a weird thing. It will display the so-called “Book of Mozilla”. Something similar was present in Netscape too. There’s actually no real book although the quotations might give you that impression.
Have fun browsing through your browser’s internal features.