November 11, 2007
Change Auotplay for DV Camera
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
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
Live Support Chat for your website
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
Their toll free number is 1-800-424-2246
August 11, 2007
Free and Legal Music
2. http://www.goingware.com/tips/legal-downloads.html#websites
3. Search Engine http://search.creativecommons.org/#
4. http://www.piano-midi.de/chopin.htm
Cheap OKI C5150n Cartridge
Not tried it yet. Looks good.
Cheap ML 1710 Laser Toner at
http://www.tonerkits.com/ml1710-3.html#
VCD authoring tools and related
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
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
Z-Pizza: Los Alamitos & 405
macaroni grill: Los Alamitos & 405
美食林: Alondra, 牛肉饼,木须肉
大肚鱼:South & Pinoeer
July 17, 2007
vim multiple repeat command
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 travel | 1-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 |
JNC | 626-573-8888 |
polo tours | 800-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
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
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 27, 2007
Some Useful Links for Linux
http://www.debian.org/distrib/packages
SSH X11 forwarding details
http://www.hackinglinuxexposed.com/articles/20040705.html
April 6, 2007
March 20, 2007
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
番泻叶临床应用及其不良反应分析
|
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