The Impossible Dream
To dream the impossible dream
To fight the unbeatable foe
To bear with unbearable sorrow
To run where the brave dare not go.
To right the unrightable wrong
To be better far than you are
To try when your arms are too weary
To reach the unreachable star
This is my quest, to follow that star,
No matter how hopeless, no matter how far
To be willing to give when there’’s no more to give
To be willing to die so that honor and justice may live
And I know if I”ll only be true to this glorious quest
That my heart will lie peaceful and calm when I”m laid to my rest
And the world will be better for this
That one man scorned and covered with scars
Still strove with his last ounce of courage
To reach the unreachable star.
Hide Vim menu bar and tool bar
" Hide the menu bar
:set guioptions-=m
" Hide the tool bar
:set guioptions-=T
Configure javac to report messages in English
On my Chinese version Windows XP, the javac always shows Simple Chinese messages. But I'd rather see the English ones.
The traditional way is to change the default system Local setting, then the JVM local is changed as well. But this solution is too inconvenient and painful.
Fortunately, we do not have to do that. We can pass the '-J-Duser.language' option to the javac to change its JVM Local setting.
e.g.
javac '-J-Duser.language=en -J-Duser.country=GB' -help
The javac will show the help messages in English instead of the Simple Chinese.
Those two options can also be passed in the ant script by adding the <compilerarg> in the <javac>
e.g.
<target name="compile" description="compile hello world">
<mkdir dir="${classes}"/>
<javac srcdir="${src}" destdir="${classes}" fork="true" >
<compilerarg value="-J-Duser.language=en"/>
<compilerarg value="-J-Duser.country=GB"/>
</javac>
</target>
The attribute fork="true" is mandatory. The two options can only effect the forked compiler.
Finding of this weekend
Why China is not a great cultural nation?
www.bullock.cn/blogs/lihuafang/archives/94319.aspx
Quoted from Han Han's speech at XiaMen University.
Fix the Jython console on my Windows XP
The Jython console didn't work properly on my Chinese version Windows XP. It can not interprete the strings properly.
e.g.
>>> print "hello world"
....
Looks like it's looking for a futher input. After I input a '\n', ther console crashed and complains
LookupError: unknown encoding 'gb18030'.
This error never happens on the English version Windows XP. So, this problem definitely caused by the system default encoding.
With a few hours study for the JVM & the Jython encoding setting, I found 2 solutions.
1) Change the JVM default character encoding
Start up the jython with option -Dfile.encoding=UTF8,then the Jython console's encoding will be UTF8 as well.
e.g.
jython -Dfile.encoding=UTF8
For change the JVM encoding automatically, you can also create one environment variable
JAVA_TOOL_OPTIONS to -Dfile.encoding=UTF8.
e.g.
set JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8"
2) Change the Jython console character encoding
Start up the jython with option -Dpython.console.encoding=UTF8
e.g.
jython -Dpython.console.encoding=UTF8
Or add this setting in the Jython registry file. On my laptop, the file is C:\jython25\registry
Now, you enjoy.
My Firefox was fucked by the "www.114.com.cn"
The story begins with I want to try the Powershell this weekend. But somehow the windows updater can not get the Powershell patch from microsoft official webpage. So I decide to download the Powershell by myself from some software sharing website.
Anyway, I managed to install myself powershell. Everything looks good until I lunch my firefox. The Firefox always connects to that garbage website I mentioned in the title. Well, obviously that powershell installation package is not as clean as I wish. Somthing changed my Firefox configuration! I guess my system is not be infected any virus or worm. Since the anti-virus firewall didn't rise any alarm during the powershell installation.
The guys on the internet point out this kind of jerk website usally change the starup command of your appliction shortcut. So when you start the IE/Firefox, the application will open that webpage.
So, after a quick check, I found my Firefox shortcut starup command has been changed to "Firefox.exe www.that-stupid-jerk-website.com.cn". The same to the IE, even though I seldom use it.
After recover the startup command, my Firefox finally get rid of that stupid website.
Fuck them again. All the thing they can produce is garbage.
The differences of df and du
- df:
- df gets most of its information from the filesystem's primary superblock.
- df calulates the space used by the open files and the inodes.
- Check the open file size with "lsof -s <filesystem name> ".
- Check the used inode with "df -i".
- du:
- du calculates the exatly size reported by the files on the filesystem.
- du does not count the inodes and the open files.
- The block size setting does not effect du's calculation.
df is preciser for the logical used amount of filesystem. As well as du is good at reflecting the use of filesystem from the physical point of view.
We just get married!
Yes! This is true!!! 
I like "The Big Bang Theory"
I just like them saying "Because we can!"
這就是來歷嗎
歲久松肪成琥珀,夜深丹氣出芙蓉
-- 元代貢師泰《贈天台李煉師》