November 11, 2007

Change Auotplay for DV Camera

The autoplay on my computer always run Windows Movie Maker when I plugin the firewire of my Sony DV. I had no choice of turning it off or change it to another program. Here is a way how I finally changed it.

use regedit, goto HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers,
you will see an entry: VideoCameraArrival, with a key "MSVideoCameraArrival" with no value. This handler is defined in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers.
So all I needed to do is to add a key "MyVideoHandler" to the key VideoCameraArrival, next to MSVideoCameraArrival, then define MyVideoHandler in 'Handlers', with the contents of:
ProgID: Shell.HWEventHandlerShellExecute

That did the trick. Now when I plug in my DV, windows asks me which handler to use. I can pick either.

September 18, 2007

Convert Flash to ScreenSaver
seems to be a good free tool at this time.

September 1, 2007

My Cat JiaoJiao Died Today


A day to grieve.

Little JiaoJiao died today. She lied still in the street of our neighborhood. It looks like she was run over by a car during the night.

She has been a very sweet cat. Never scratched people. Never bitted people. She has very software hairs. She was as sweet as a cat can be. My wife used to cut her nails and bathe her without any complaints from her.

When we moved from Maryland to California, we had to leave one of our two cats behind. The other cat, Mimi, was adopted by a colleague of mine. We took JiaoJiao with us on the plane.

She is an indoor-converted-outdoor cat. She is very curious and likes to roam around, but she never jumped fence or anything like that. She simply walks around, lies down on sidewalk or under the bush.

Recently she became a little bold and not afraid of cars, which eventually killed her. For several times we had to take her away from the driveway so that we can park our cars.

We buried little JiaoJiao in the garden of our side yard.

She has been a happy member of our family for the past 5 years. She will live in our memories.

Go in peace, little JiaoJiao!

-- The family

August 23, 2007

Isaac Milestone: Turns

Isaac was able to turn himself on 8/21/2007, about 5 and half month old. Very cool!

Live Support Chat for your website

The only open source one I can find is Crafty Syntax Live Chat at

This guy also wrote some test code but it does not seem to function

August 13, 2007

Find best childcare in your area

use this excellent service
Their toll free number is 1-800-424-2246

August 8, 2007

How to copy table from Firefox to Excel

To paste the whole table:

Step 1: Hold down the CTRL key and click just outside the boarder of your grid. Either just above the grid, or on one of the sides. The entire grid should become highlighted.

Step 2: CTRL+C

Step 3: Open Excel and hit CTRL+V. You should get the entire grid pasted and formatted the same way you see it in Firefox.

Here is a good URL to practice with

To Paste a subset of a table, you will need to paste one column at a time:

Step 1: Ctrl+drag over the column you want in Firefox (yes, 1 column at a time).

Step 2: Paste into Excel. It will paste as a row, not a column. Don't worry - we'll get back to this. Repeat Steps 1 & 2 for as many cols of data that you need.

Step 3: After you have all the data you need into Excel (in rows), select them all and copy. Now move a few cells down and choose "Paste Special" - you'll see a few new options now. Choose "Transpose" in that dialog. This will turn the rows into columns.

July 19, 2007

Eating Place

Curry House: Katella & Knott
Z-Pizza: Los Alamitos & 405
macaroni grill: Los Alamitos & 405
美食林: Alondra, 牛肉饼,木须肉
大肚鱼:South & Pinoeer

July 17, 2007

vim multiple repeat command

Or simpler:
or even more simpler
can be used to delete all lines that match PATTERN

See help :g for more

Another post from VIM TIP #227

I'll break down this incredible collapse-multiple-blank-lines command for everyone, now that I finally figured out how it works.

First, however, I'll rewrite it this way to illustrate that some of those slashes have totally different meaning than others:


Note that to delimit expressions like these, just about any symbol can be used in place of the typical slashes... in this case, I used underscores. What we have is an inverse search (:v, same as :g!) for a dot ('.') which means anything except a newline. So this will match empty lines and proceed to execute [command] on each of them.


The remaining [command] is this, which is a fancy join command, abbreviated earlier as just 'j'.


The comma tells it to work with a range of lines:

:help :,

With nothing before the comma, the range begins at the cursor, which is where that first blank line was. The end of the range is specified by a search, which to my knowledge actually does require slashes. The slash and dot mean to search for anything (again), which matches the nearest non-empty line and offsets by {offset} lines.


The {offset} here is -1, meaning one line above. In the original command we just saw a minus sign, to which vim assumes a count of 1 by default, so it did the same thing as how I've rewritten it, but simply with one character fewer to type.


There is a caveat about join that makes this trick possible. If you specify a range of only one line to "join", it will do nothing. For example, this command tells vim to join into one line all lines from 5 to 5, which does nothing:


In this case, any time you have more than one empty line (the case of interest), the join will see a range greater than one and join them together. For all single empty lines, join will leave it alone.

There's no good way use a delete command with :v/./ because you have to delete one line for every empty line you find. Join turned out to be the answer.

This command only merges truly "empty" lines... if any lines contain spaces and/or tabs, they will not be collapsed. To make sure you kill those lines, try this:

:v/^[^ \t]\+$/,/^[^ \t]\+$/-j

Or, to just clean such lines up first,

:%s/^[ \t]\+$//g

July 3, 2007

Air Ticket Agent

纳美旅行社 (Oriental Tour & Travel)800-951-3391

Bravo travel1-626-280-9988

中旅国际洛杉矶 (China Travel Service LA Office)888-664-5678


泉威旅行Champion Travel Service (626)854-1808

一帆国际旅游 ( Vanguard Int'l Travel)866-882-6888




polo tours800-822-7656

J&C Travel, Inc.626-573-8888

捷胜国际旅游 ( Sunlight International Travel)866-838-6898




Resource Hacker:
PDFTK: free PDF tools
PDF Viewer with comment capability:

May 15, 2007

snmptrap command

snmptrap -v 1 -c public 3 0 ''


-v 1: version 1
-c public: use community string "public" trap manager's IP address (trap destination) enterprise (i.e. type of device/object generating trap, default to system ID in mib II, can be empty) trap source IP address (device's IP address)
3: generic trap ID, they are:
  • coldStart(0),
  • warmStart(1),
  • linkDown(2),
  • linkUp(3),
  • authenticationFailure(4),
  • egpNeighborLoss(5),
  • enterpriseSpecific(6)

0: specific trap ID, 0 when generic trap ID is not 6
'': system up time (timestamp)

You can also add "mib type value" to the end of the command to send them along with the trap

v2 trap:
snmptrap -v 2c -c public ""

"": system Uptime (when given as empty "", the system finds itself) trap OID

again, add "mib type value" to the end if you want.

v3 trap:

snmptrap -v 3 -a SHA -A 1234567890 -x DES -X 1234567890 -l authPriv -u myuser -e "123abc" "" linkUp.0

Update (09/10/2013)

When running snmptrap command, and seeing warning message like:

    read_config_store open failure on /var/lib/net-snmp/snmpapp.conf

is okay. The trap is still being sent.

To run a debug catch-all snmptrapd:

     snmptrapd -Le -On -f -n

with the following just-one-line in /etc/snmp/snmptrapd.conf
    disableAuthorization yes

-n: no DNS lookup
-f:  no fork
-On: print numeric OID
-Le: log to standard error

April 6, 2007

Bash Script to Set Terminal Title

echo -e "\033]0;$1\007"

March 11, 2007


从怀孕的那一刻起,我想所有的准妈妈都会开始很注意生活周遭的小细节,包括:怀孕身体产生的细微变化、情绪的稳定度、注意均衡饮食的摄取等等。这些准妈妈 身体所产生的细微变化,是从怀孕初期就开始,例如恶心、呕吐、食欲不振、体重减轻等害喜现象。除了上述一些害喜所产生的症状外,有些准妈妈还会有腹部胀气的现象,引起身体的不适。


  腹部胀气是 指肠子中有大量的气体,即所谓的「肠气」。一般来说正常人的肠子每天约有7~10公升的气体产生,这些肠气大部分会被人体重新吸收,只有一些气体会由身体 排出,如打嗝、放屁等。肠气所包含的气体有氮气、氧气、二氧化碳、氢气、甲烷等。通常肠气是无味的,只有不到1%的稀有气体(硫化氢、氨气)具有臭味。






   肠子的气体约有90%经口吞入,正常人每天所吞下的空气大约有500~1000西西左右,空气中的主要成分为氧和氮,人体吞下空气到小肠时,氧气会被吸 收,而氮气则跑到大肠成为大肠气的主要成分。很多情况下,人体会不知不觉吞下空气,例如:嚼口香糖时、吃东西时狼吞虎咽、边吃东西边说话、喝汽水、可乐、 啤酒等碳酸性饮料时、或吃一些容易产气的食物等。另外,还有一些人紧张时会不自主的作出吞口水的动作,这些因素都会导致肠内气体的增加。





   人体内因为缺乏消化寡糖类及多醣类等碳水化合物的酵素,所以在摄取这类食物后,在小肠中不被消化,到大肠中被肠内细菌分解利用,然后产生大量气体(二氧 化碳、氢气、甲烷)。这些可能导致腹胀的「产气食物」,包括:豆类、洋葱、茄子、地瓜、马铃薯、玉米、柑橘类水果、添加甜味剂(山梨糖醇)的饮料和甜点 等。


  食物类别      产气食物

  五谷类 玉米、洋芋、芋头、蕃薯、马铃薯、糯米类、糙米、杂粮

  蔬菜类 洋葱、花椰菜、韭菜、包心菜、胡瓜、萝卜、茄子、甘蓝菜、大头菜、


  水果类 苹果、西瓜、香瓜、哈蜜瓜、苹果汁

  豆类 豆干、豆腐、红豆、绿豆、黄豆、花生、豌豆

  乳类 牛奶、乳制品

  饮料类 汽水、养乐多、豆浆、可乐

  其它 咖啡、浓茶、巧克力、油炸类、高糖类的甜点、胡椒粉、香料














February 27, 2007


作者:翁舜章(汕头 )

番泻叶为豆科草本植物狭叶番泻Cassia angustifolia Vahl和尖叶番泻Cassia acutifolia Delile的干燥小叶。其近于成熟的果荚(番泻荚senna pod)功用与叶相同,服后腹痛的副作用较小。中医认为本品性寒,味甘苦,归大肠经,具有泻热行滞,通便,利水的功效。中国药典名Folium Sennae,国外一般称Senna。公元9世纪时阿拉伯已作药用。我国有关本品药用的记载始于近代王一仁著《饮片新参》,仅数十年历史。现代研究发现番泻叶具有泻下、抗菌、止血、解痉等药理作用[1]。近年来,其被国内外主要用作腹部及肠道各种影象检查前或手术前肠道清洁准备,主治各种便秘,特别是老年性及顽固性便秘;对腹部术后肠功能恢复也有促进作用[2]。也可用于上消化道出血、胆囊炎、急性胰腺炎。是全球应用最广泛的导泻剂。但其不良反应也日趋增多。据资料报道和本人观察,现将其临床应用及常见不良反应与防治方法报告如下。

1 临床应用

1.1 便秘 每次6~9g,水煎服或开水泡后服[3]。亦用于抗精神病药物引起的便秘[4]。小剂量(3g)治疗老年男性便秘,总有效率96%[5]。对于产褥期便秘者,每次7~8g,开水泡后服,治疗100例,多数一次即可见效,不减少乳汁分泌,通便后恶露减少。但平素脾胃虚弱者不宜服用[1]

1.2 回乳 4g番泻叶,水200ml浸泡20min11剂,分2~3次口服,56例哺乳妇女在3~7天出现断乳[6]

1.3 腹部及肠道各种影象检查前或手术前肠道清洁准备 仇氏报道50例泌尿系造影前泡服番泻叶清除气体和粪便,总满意率92%[1]。方氏[1]用番泻叶10~20g清洁肠道,30例钡餐检查满意率100%30例腹平片检查满意率93%。沈氏[7]应用番泻叶在妇科手术前肠道清洁以及王氏[8]在腹部手术后胃管内注入番泻叶浸剂促进肠蠕动的研究中,均有显著的疗效。

1.4 急性胰腺炎 番泻叶15g,水泡服;重症者除口服外,配以每次10~15g保留灌肠[9]

1.5 十二指肠及胃溃疡性出血 有效率100%[10]。药理实验表明10%的番泻叶煎剂可明作者简介: 翁舜章,男,副主任药师 电话:0754-8550450-8837

显减轻由0.6mol.L -1盐酸和皮下注射吲哚美辛所引起的胃粘膜损伤。

1.6 急性细菌性痢疾 对热结型便秘的实证,有迅速退热和使大便培养转阴等作用[11]

1.7 泌尿道结石 温氏[12]报道,番泻叶50g水煎30min,日顿服,共服2d,结石排出率76.5%26/34)。

2 不良反应

据报道[1314], 番泻叶主要或严重的不良反应有腹痛、过敏、上消化道大出血、恶性血压变化、癫痫样发作、中毒、急性尿潴留、成瘾性等。对番泻叶的不良反应较轻者,可以口服 绿豆汤或甘草汤予以解毒,严重者则需要对症处理。有报道用生白芍或甘草炮制番泻叶、或用番泻叶及通幽草(又名鸡矢藤)按12比例泡服清洁肠道,基本上克服了腹痛、恶心等副作用。

3 不良反应分析

3.1 剂量过大 《中国药典》1990年版一部312页番泻叶用法用量项规定:3~9g,而在1995年后各版药典将其修改为:2~6g,说明国家药典委员会的专家们已注意到大剂量使用番泻叶的毒副作用。而在临床报道的不良反应中大多用量超出规定,超剂量或长期饮用的不良反应:①剧烈呕吐及消化道出血的用量为多数15~30g。②呼吸急促,癫痫样发作,其用量为18g;有用40g通便致尿潴留。③顿服30g引起血压恶性变化。④沈氏[8]15g的剂量,病人服后在3~5h后出现腹痛不适,不少病人腹痛腹泻明显,甚至难以接受后不愿接受,减量后副作用小效佳。长期、大剂量应用番泻叶,泻下作用随时间的延长而降低,还会损伤肠肌丛神经元,引起难治性的便秘;低剂量的番泻叶有助于肠道功能的恢复[15]。因此要掌握好剂量及疗程。

3.2 使用方法不科学 在服法应用上,由于番泻叶有效成分为番泻苷,属结合性蒽苷,这些苷类成分对热不稳定,长时间煎煮易分解为几乎无泻下作用的游离蒽醌,使泻下效果降低。有些病人服后效果不好,次日不能作检查,可能与服法不当有关。而马爱华等[16]考察了不同条件下番泻叶中番泻苷的总浸出率。结果为:煎煮5min时,番泻苷含量较高,煎煮时间愈长,番泻苷煎出率愈低,这是番泻苷被破坏的缘故。煎煮5min时,番泻苷含量低于10090浸泡;90浸出率最高;浸泡时间以30min为最佳。就浸泡次数来看,浸泡四次总苷浸出率为37.86%(第1234次的浸出率分别为12.20%9.06%8.74%7.86%),叶中还有相当一部分苷类未浸出,这也证实在服用时让病人多泡几次是正确的。因此,病人服用番泻叶时不能煎煮,最好用90左右的水浸泡四次以上,浸泡时间每次以30min为宜。也可根据番泻苷类易溶于碳酸氢钠的水溶液,取保温杯加2g碳酸氢钠,再放入4~5g番泻叶,用90~95开水500ml浸泡10min饮用。


3.3 辨证应用,严格掌握适应症 中医认为番泻叶苦寒伤胃,久服可败伤胃气,适用于热结便秘、气滞的实证,对气血虚、阴阳虚的便秘者,不宜使用。同时要注意抗生素是影响番泻叶泻下作用的因素之一。有报道[17],使用抗生素治疗原发病的便秘病人,通便效果不理想。可能的原因是抗生素抑制了使番泻苷水解为大黄酸蒽醌的酶,影响了番泻叶的泻下作用。



[1] 王浴生,邓文龙,薛春生主编. 中药药理与应用[M]. 第二版. 北京:人民卫生出版社,19981164-1167

[2] 圣,陈礼明,田 莉等. 番泻叶及其制剂的临床应用及安全性评价[J]. 中国药房,2001125):302

[3] 刘沈林等. 江苏中医,19921312):31

[4] 范慧光等. 实用医学杂志,1994106):552

[5] 林梅芬等. 福建中医药,1992233):60

[6] . 番泻叶的回乳有效[J]. 新中医,19892128

[7] 沈波. 番泻叶在妇科手术前肠道清洁准备中的应用效果观察[J]. 总装备部医学学报,20035 3164-165

[8] 王志莲,崔玉珍,王云展等. 腹部手术后胃管内注入番泻叶浸剂促进肠蠕动效果观察[J]. 山东医药,2004448):6-7

[9] 朱筱芳,钟伏生. 番泻叶的临床新用与副作用[J]. 江西中医杂志,1995266):44

[10] 满维新,红军. 番泻叶的临床应用情况[J]. 1993,(6):24

[11] 金亚城,杨建华. 番泻叶的实验研究和临床应用[J]. 浙江中医杂志,1988,(7):334-335

[12] 温诚荣. 番泻叶治疗[J]. 新中医,19942611):18-20

[13] 杨玉福. 21例长期服用番泻叶致依赖性报告[J]. 中国中药杂志,1992173):184

[14] 袁令双,陈发荣. 番泻叶不良反应及其防护[]. 时珍国医国药,199910(2): 138

[15] Leng Peschlow E. Senna and habituation[J]. Pharmacology199244suppl 1):30

[16] 马爱华,张俊慧,张兴辉. 番泻叶服法研究[].基层中药杂志,1996101):51-52

[17] 莉,林昶. 抗生素对番泻叶致泻作用影响的临床观察[J]. 中国中医药科技,200072):114-115

[18] 箫惠来.德国限制使用含蒽醌类化合物的植物泻药[J]. 中药新药与临床药理,199893):188

February 23, 2007

CVS Binary Mode

   Here is an example of how you can create a new file using the `-kb'

$ echo '$Id$' > kotest
$ cvs add -kb -m"A test file" kotest
$ cvs ci -m"First checkin; contains a keyword" kotest

If a file accidentally gets added without `-kb', one can use the
`cvs admin' command to recover. For example:

$ echo '$Id$' > kotest
$ cvs add -m"A test file" kotest
$ cvs ci -m"First checkin; contains a keyword" kotest
$ cvs admin -kb kotest
$ cvs update -A kotest
$ cvs commit -m "make it binary" kotest # For non-unix systems