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:
Action: "YOUR PROGRAM PATH"
initCmdLine: "YOUR PROGRAM PATH"
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

http://www.instantstorm.com/
seems to be a good free tool at this time.

September 1, 2007

My Cat JiaoJiao Died Today

Sadly.

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 http://www.craftysyntax.com/

This guy also wrote some test code but it does not seem to function
http://www.boutell.com/newfaq/creating/support.html

August 13, 2007

Find best childcare in your area

use this excellent service http://www.childcareaware.org/en/
Their toll free number is 1-800-424-2246

VCD authoring tools and related

1. Free virtual CD ROM for Windows XP 2.1 (http://www.softwarepatch.com/windows/xpvirtualcd.html)

2.
ISO Recorder (http://isorecorder.alexfeinman.com/isorecorder.htm)

3. GNU vcdimager

4. VCDGear (convert mpeg1/2 to bin/cue file and back) at (http://www.vcdgear.com/download.html)

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 http://www.w3schools.com/browsers/browsers_stats.asp


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 26, 2007

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

:g/PATTERN/,/$/-1d
Or simpler:
:g/PATTERN/-1d
or even more simpler
:g/PATTERN/d
can be used to delete all lines that match PATTERN

See help :g for more

Another post from VIM TIP #227
:v/./,/./-j

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:

:v_._,/./-1join

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.

:v_._[command]

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

,/./-1join

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.

/./{offset}

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.

/./-1

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:

:5,5join

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
866-783-1688

Bravo travel1-626-280-9988

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

美国亚洲旅行社626-350-6376

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



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

加州阳光626-5882818

丽来1-909-594-6899

JNC626-573-8888


polo tours800-822-7656


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


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

来来213-626-6118


蓝天800-644-3615

Software

Resource Hacker: http://angusj.com/resourcehacker/
PDFTK: free PDF tools
PDFTK GUI: http://angusj.com/pdftkb/
PDF Viewer with comment capability: http://www.docu-track.com/home/prod_user/pdfx_viewer/

May 15, 2007

snmptrap command

snmptrap -v 1 -c public 192.168.100.40 1.2.3.4 192.168.254.60 3 0 ''

syntax:

-v 1: version 1
-c public: use community string "public"
192.168.100.40: trap manager's IP address (trap destination)
1.2.3.4: enterprise (i.e. type of device/object generating trap, default to system ID in mib II, can be empty)
192.168.254.50: 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 192.168.100.40 "" 1.2.3.4.0

"": system Uptime (when given as empty "", the system finds itself)
1.2.3.4.0: 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" 192.168.100.1 "" 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

#!/bin/sh
echo -e "\033]0;$1\007"

March 11, 2007

怎么吃才能不胀气

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

  何谓腹部胀气

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

  胀气的临床表现

  当怀孕妇女觉得腹部胀气时,会增加肠子的蠕动而有腹胀、腹痛、腹泻、大量排气、甚至恶心、呕吐、食欲不振等,有些甚至还会影响到睡眠品质。

  胀气产生的原因

  胀气产生的原因有两个,一是吞下的气体太多,另一个是大肠制造的气体太多。

  1.吞下气体过多

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

  2.大肠制造气体太多

  肠子会制造气体是因肠蠕动障碍,造成细菌对食物过度发酵,而产生大量的气体;或因为肠道中某种消化酵素有问题,而导致某种食物的消化不良,最常见的就是「乳糖不耐症」,也就是说,肠胃道无法消化乳糖所引起,这时只要不吃含乳糖的食物自然就不会有症状产生。

  胃酸过多也会引起胀气,胃中过多的胃酸和胰液中和后会产生二氧化碳,而造成胀气、打隔。另外,肛门太紧排气较困难,和慢性便秘也会逐渐形成腹部胀气的现象。我们可经由直接分析体内气体含量比例,进而分析腹部胀气的原因。如果吞下太多气体,则肠中氮气与氧气的浓度会较高,如果是肠内细菌发酵所造成的胀气,则肠中氢气与氧气的浓度会较高。

  易造成产气的食物

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

  产气食物表

  食物类别      产气食物

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

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

  扁豆、酸泡白菜、青葱

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

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

  乳类 牛奶、乳制品

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

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

  营养师的叮咛

  对于吃下产气食物,是否真会产生胀气?其实是以个人体质而有所差异。怀孕期间准妈妈可经由个人经验观察出哪些食物容易引起胀气,并避免食用这些食物。一般来说,除了尽量避免食用上述产气食物外,因肠胃胀气也可能是外界压力过大、情绪不佳所引起,因此,准妈妈们也要适当减轻生活上的压力,切勿紧张焦虑,并保持心情轻松愉快。

  tips:改善准妈妈肠胃胀气

  1.避免暴饮暴食。

  2.吃东西要细嚼慢咽,不要狼吞虎咽。

  3.吃饭时要闭着口,以减少吞入过多的空气。

  4.减少嚼口香糖、不要边吃东西边说话。

  5.避免喝汽水、可乐等碳酸性饮料。

  6.喝饮料时用吸管小口饮用。

  7.避免摄取高油脂、高糖类的食物,如油炸类、甜食、巧克力等。

  8.养成定期排便的好习惯。

  9.尽量避免食用易产气食物。

  10.适度运动,也可减少腹部胀气的产生。

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饮用。

在口服番泻叶或其制剂,约于6h左右出现泻下作用,临床应用时要注意避免让病人夜里出现泻下排便的情况。

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

综上所述,使用番泻叶应严格控制剂量,对习惯性便秘者,注意不可长期服用;对气血虚、阴阳虚以及晚期肠癌的便秘者,不宜使用;对完全性肠梗阻、节段性回肠炎、溃疡性结肠炎、阑尾炎、原因不明的腹痛、水和电解质丢失引起的脱水、10a以下儿童、孕妇及哺乳期妇女均应慎用或禁用[18]。故笔者认为临床应用上,单味番泻叶以90~95的沸水泡服为好,配伍其它药物入煎剂宜后下。饮用方法上应注意泡时先少量饮用,达效即停服,效果不理想再逐渐加服,切忌泡后一次服完,以免发生不良反应。

参考文献

[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'
flag:

$ 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