-
Convert character set to utf8 in MySQL
Update: If you are interested in automating this task with a simple Perl script, I created one here. Say, you had a MySQL database that stores texts in languages such as Chinese, Japanese, Korean, Hebrew, Arabic, and so on, and recently there was a server move or upgrade, and all of sudden text in the…
-
Use NAnt to replace values in other xml config files
NAnt looks like a nice deployment and configuration tool. You can put important parameters in the build file and/or pass values via command line to overwrite values inside the build file, do file copy, compile code, log progress, and all kinds of stuff. This gives you great flexibility in your build and config process. But…
-
Brief discussion on The Man On Mao’s Right
Before The Man On Mao’s Right, I just finished Barbara Tuchman’s excellent Stilwell and the American Experience in China, 1911-45, based on great recommendation from Prince Roy, first published in 1971. Toward the end of Tuchman’s book, she wrote about the Dixie Mission from US Army to Yan’an between July 1944 to March 1947. If…
-
调整、巩固、充实、提高
刚结束一个客户的业务,修整了两个星期,就开始了另一个客户的工作。 总结这一年多来的自由职业者路程,随便写写。 1. 做得越多越感到自己的无知。感觉打好基本功最重要,要用一些时间把基本东西重温一下。不光是读书,更要动手。先从数据库方面的东西做起; 2. 一开始到华盛顿、纽约、波士顿和其它城市搞培训,会有新鲜感,可飞多了也就那么回事儿。可能在五六十岁时做培训会好一些,现在孩子小,经常飞来飞去不是办法。如果没其它生意那当然要另当别论:独立职业者,不干就没钱。不像打工者,时不早晚地可以混天聊日偷懒一下。不过时间安排允许的话,倒挺想到泛华语区做培训,开会演讲,或其它项目,因为那样会有机会到我眷恋的故国看看,慰籍一下思乡之情; 4. 有本地的、本人感兴趣的、稳定的中长期项目是目前看来最好的选择。和本地的业界人士及本地的咨询公司甚至猎头公司拉好关系很重要; 5. 做生产数据库管理员真得很辛苦,对生活的影响还是很大的。呼机、大哥大不离手会很烦,当然钱可能会比做研发好一些。生产数据库出问题时,优化,函数调试和比较,索引和统计的分析,数据的分化,并行处理,等等等等,有那么多的方方面面要考虑和协调,大家都会很紧张。墨菲定律,出问题都是晚上、周末,搞得人精疲力竭。遇上通情达理的客户和经理还好说,遇到脑残的很可能会有麻烦。话又说回来,要吃饭,想买房子,照顾家人,不工作挣钱怎么行?什么事情,都是利弊的权衡; 6. 现在帮客户做研发挺好的,因为有一段时间没鼓捣过了,兴致盎然。本身就有兴趣,再加上.Net开发和Sql Server的关联又大,岂不是一箭双雕?Linux,MySQL,Oracle等还是要搞一搞的,那玩意儿也有意思呀! 7. 看来有买无线游动上网服务的必要。大部分的客户把网上电邮封掉,但现在的手机合约到明年四月左右才到期:要自由,不交一些钱是不行地。有点儿舍不得,和老婆商量商量再说; 8. 要给家人写信和寄照片。
-
Tab completion in Vim while in insert mode
I like tab completion in Linux shell, and I have occasionally used Ctrl-n while in insert mode in Vim. However, Ctrl-n requires 2 fingers, which makes it clumsy. Today I stumbled a script, inside Vim’s help file, that enables Tab completion while in insert mode. It is pretty smart in that it will insert a…