Monday, June 14, 2010
fwd: Ten Commands Every Linux Developer Should Know
some quite useful commands you should use, Ten Commands Every Linux Developer Should Know
Sunday, June 13, 2010
Yale trip
June 12th-14th, Yale Medical School Campus. Sadly, I am an experiment sample for a physical muscle research. We arrived at New Haven at 9pm, 12th, spent some time on surfing Internet before going to bed. What a tragedy, I lost my sleep in the first night, this is a common case for me when traveling to a new place... Getting up so early at 6am in the second morning, and then I stayed in the MRI hole for another 2 hours. Fortunately, this time I slept well. Followed by another MRI scan for 1 hour, I am done for the first half day, in the afternoon, a training session waiting for me.
1:00pm-2:45pm, I was supposed to be preparing for the later training session. But I asked to Ryan to let me get out and walk around during this time. Oh, year, I was on the way to Yale main campus. The followings are the photos what I took on campus...
This video was taken when I was in the square. I like this place, very peaceful, very quite...
I am on that square. Take a notice the building behind me, it is the symbol building of Yale.
I don't even know this building's name...anyway, just take it, never regret.
It should be auditorium or something...um..probably..
Library, I know this. You may notice that the windows are made by marble instead of glass. it is said that, the sunshine can filtered through marble, which make Yale University's library quite special...
In Memory of the Men of Yale who true to Her Traditions gave their Lives that Freedom might not perish from the Earth. 1914 Anno Domini 1918. ...
I like this style...


It feels like Tsinghua University's lawn square, isn't it?
Famous Yale's water table...
1:00pm-2:45pm, I was supposed to be preparing for the later training session. But I asked to Ryan to let me get out and walk around during this time. Oh, year, I was on the way to Yale main campus. The followings are the photos what I took on campus...
New Haven hotel is just in front of my accommodation.
I don't know what it is, it seems famous...
I am on a large square, this man's status looks very popular...
This video was taken when I was in the square. I like this place, very peaceful, very quite...

It feels like Tsinghua University's lawn square, isn't it?
nice gallery...
Friday, June 11, 2010
This is Brothers -- Celtics has a brilliant game over Lakers
OH MY GOD, what a great victory!!!
When substitute Celtics rout luxurious Lakers, I saw "this is BASKETBALL". It is five, it is passion, it is combatant spirit, they are fighters. At that time, I think they are the best symbol of basketball, they give us a best explanation of basketball.
From the beginning of fourth quarter to the last 2 minutes, most time of the last quarter, Celtics substitute players (except for Ray Allen), had a brilliant performance, totally over Lakers, over Kobe. Big baby is so passionate that everybody had to love him. Robinson's great job out-played his faults. Tony Allen's impenetrable defense makes Kobe dark. Wallace's passion is no weaker than big baby, and he gave Lakers a unbelievable 3 points shoot. Ray Allen is a calm stone, his experience and coolness was done to a turn.
Beginning with this game, I love Celtics to be a fan of them.
When substitute Celtics rout luxurious Lakers, I saw "this is BASKETBALL". It is five, it is passion, it is combatant spirit, they are fighters. At that time, I think they are the best symbol of basketball, they give us a best explanation of basketball.
From the beginning of fourth quarter to the last 2 minutes, most time of the last quarter, Celtics substitute players (except for Ray Allen), had a brilliant performance, totally over Lakers, over Kobe. Big baby is so passionate that everybody had to love him. Robinson's great job out-played his faults. Tony Allen's impenetrable defense makes Kobe dark. Wallace's passion is no weaker than big baby, and he gave Lakers a unbelievable 3 points shoot. Ray Allen is a calm stone, his experience and coolness was done to a turn.
Beginning with this game, I love Celtics to be a fan of them.
Thursday, June 3, 2010
Finding Memory Leaks in Java Apps
Here is a small HOWTO on how to find memory leaks with Java SE.
I’ve written it while trying to find memory leaks in our testing tools: JTHarness and ME Framework, and then wanted to share the HOWTO with the world, but I didn’t have my blog at that time, so I posted this info as a comment to a relevant entry in the excellent Adam Bien’s blog.
Note: Use the latest JDK 6, because it has the latest tools, with lots of bug fixes and improvements. All the later examples assume that JDK6’s bin directory is in the PATH.
For example, if you open some documents in your app, the memory graph could rapidly go up. If closing the docs and invocation of full garbage collection did not bring the memory back to normal level, there is probably a leak somewhere.You might use
Alternatively, if you started java with hprof agent, you could just use Ctrl-\ on Solaris/Linux or Ctrl-Break on Windows to dump heap into the file, specified in hprof agent arguments.
Jhat allows you to see what objects are present in the heap, who has references to those objects, etc.
Here are some tips:
I’ve written it while trying to find memory leaks in our testing tools: JTHarness and ME Framework, and then wanted to share the HOWTO with the world, but I didn’t have my blog at that time, so I posted this info as a comment to a relevant entry in the excellent Adam Bien’s blog.
Note: Use the latest JDK 6, because it has the latest tools, with lots of bug fixes and improvements. All the later examples assume that JDK6’s bin directory is in the PATH.
Step 1. Start the application.
Start the application as you usually do:java -jar java_app.jarAlternatively, you could start java with hprof agent. Java will run slower, but the huge benefit of this approach is that the stack traces for created objects will be available which improves memory leak analysis greatly:
java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9000 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -agentlib:hprof=heap=dump,file=/tmp/hprof.bin, format=b,depth=10 -jar java_app.jarWhen the application is up, perform various actions that you think might lead to memory leaks.
For example, if you open some documents in your app, the memory graph could rapidly go up. If closing the docs and invocation of full garbage collection did not bring the memory back to normal level, there is probably a leak somewhere.You might use
jconsole from JDK 6 to see the memory consumption graph to have a clue whether memory leak is present or not:jconsoleIt will pop up a dialog with a list of Java applications to connect to. Find the one with java_app.jar and connect. Also, jconsole allows to invoke full GC providing nice button just for that.
Step 2. Find the application pid.
Find out the application’s process id via:jpsIt will print something like:
15976 java_app.jarIn our case the pid is 15976.
7586 startup.jar
22476 Jps
12248 Main
5437 Bootstrap
Step 3. Dump the heap into file.
Dump heap into the file:jmap -dump:format=b,file=/tmp/java_app-heap.bin 15976We just told jmap to dump the heap into /tmp/java_app-heap.bin file, in binary from (which is optimized to work with large heaps). The third parameter is the pid we found in Step 2.
Alternatively, if you started java with hprof agent, you could just use Ctrl-\ on Solaris/Linux or Ctrl-Break on Windows to dump heap into the file, specified in hprof agent arguments.
Step 4. Visualize the heap.
Use jhat tool to visualize the heap:jhat -J-Xmx326m /tmp/java_app-heap.binJhat will parse the heap dump and start a web server at port 7000. Connect to Jhat server by pointing your browser to:
http://localhost:7000And start investigating.
Jhat allows you to see what objects are present in the heap, who has references to those objects, etc.
Here are some tips:
- Investigate _instances_, not _classes_.
- Use the following URL to see the instances: http://localhost:7000/showInstanceCounts/
- Use “Reference Chains from Rootset” (Exclude weak refs!!!) to see who’s holding the instance.
This entry was posted on Monday, April 2nd, 2007 at 1:56 am and is filed under Java. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Wednesday, May 26, 2010
Taken on UMass Commencement day
It was ten days ago...
Umass commencement day...since Amherst is a university town, when commencement day comes, it seems more people than ever...This video clip is taken when we was passing Mullins center..a lot of students and their parents outside...
The other video clip is taken on the way to waltmart, it is very common American scene, just because it is common, I took it...maybe several years later when I am back China, I will be really like this scene...
Wednesday, May 12, 2010
Seasons - almost a year in Amherst
Since last August, I have been Amherst for almost a full year. These photos were taken during the last months. From summer, to autumn, to winter, to current spring, if I never take these photos, I even don't notice how time flies. If I never take these photos, I even can not remember these changing weathers, and beautiful memories. Anyway, wish the following days of the first year at Amherst, I can have a research harvest. Hope my research result would turn to a paper published... So I can enjoy American summer happily.
Saturday, May 1, 2010
about beef titi
1.选 2.腌 3.火侯,三道工序,都会影响炒肉片的嫩老。
1.牛肉选购是第一关键,挑选牛肉大有文章,
嫩质牛肉适合炒肉片,火锅. 如用于炖,烧.则嚼如木屑.
老质牛肉适合炖,烧. 如用于炒肉片,火锅 .则嚼如皮筋.
牛肉品种繁多,适合炒肉片的嫩质牛肉只占供肉总量25%,价格又贵.不得不多下功夫.中
餐馆炒牛肉片大多选用: 里脊 Tenderloin,Porterhouse,T Bone, 外脊 Rib eye, 米龙
Top Sirloin,($12-5/lb)。
我曾试用过Round(后腿肉$2.49),结果口感嫩老和风味相差甚远。也试用过 Chuck(前腿
肉$1.49/lb)结果难以容忍(齿).牛肉各部位简解见文末附表.
2。腌制吸汁工序是第二关键,腌制吸汁保证肉片成品汁饱嫩滑,至关重要,肉片吸汁越多
,口感越水嫩(餐馆诀窍).
具体做法:牛肉切片时 看清肌肉纹理,横截纤维,下刀切片。按照菜谱把调味料伴入牛肉
片,可酝量多加些盐(50-80%),同时伴入挂浆水淀粉。冰箱冷置约30分钟后加水20-30%,
分批伴入(约20分钟),肉片越咸越能吸水.腌制完毕放冰箱备用.
笔者不赞成放苏打粉Baking Soda破坏风味.可酌情加些嫩肉粉 Meat Tenderizer,其主
要成份(按量)依次是盐,糖,木瓜蛋白酶.
3. 火侯:中火热油,下牛肉片(主料)划散,至变色立即出锅。
洗锅,按菜谱炒制配料(如青椒,青花菜等)炒至九分熟,倒入牛肉片,伴炒入味,数十秒钟
即可出锅装盘。(炒制配料时可少放些盐)
以下是牛肉各部位和质地简解.由上到下,由嫩到老排列。
========== 腰 腹 部 分(质嫩) === 适合炒肉片,火锅 ==================
Tenderloin (Short loin) $8-12/lb.里脊 ............. (脊骨内侧(腹侧)条肉)
Porterhouse(Short loin) $5-12/lb.里脊,外脊 ........ (臀腰部脊骨背侧肉)
T Bone ... (Short loin) $5-10/lb.里脊,外脊 ........ (胸腰部脊骨背侧肉)
Strip loin (Short loin) $5-10/lb.嫩腰(诈称里脊) ... (二侧腰肉)
Rib eye ......... (Rib) $5-10/lb.上脑,外脊(诈称里脊)(胸部背脊肉,略肥)
Top Sirloin . (Sirloin) $4-8/lb. 米龙(诈称里脊) ... (盆骨后肌,近腰臀肉)
Tir-tip ..... (Sirloin) $4-8/lb. 三岔肉 ........... (盆骨前肌,近腹腿肉)
Hanger ........ (Flank) $2-6/lb. 牛腩 ............. (胸腹隔肌)
Flank, Skirt .. (Flank) $2-6/lb. 牛腩,腰窝 ........ (下腹肌)
========= 后 腿 部 分(较老,瘦)=== 适合:烤,酱,卤 ==================
Rump ......... (Round) $2-5/lb. 后腿,仔盖,臀尖 ... (近腿臀肉)
Sirloin tip .. (Round) $2-5/lb. 后腿,粗和尚头 .... (大腿前伸肌)
Eye round .... (Round) $2-4/lb. 后腿,榔头肉 ...... (大腿肚内芯)
Top Round .... (Round) $2-4/lb. 后腿,仔盖,底板肉 . (大腿肚)
Bottom Round . (Round) $2-3/lb. 后腿,黄瓜肉,腱子肉 (大腿肚近膝)
======== 肩 胸 (前腿) 部分 (质老,略肥) === 适合:炖,红烧,酱,卤 ==========
Blade .... (Chuck eye) $2-5/lb. 上脑,前烧 . (近頸脊背肉,质较嫩)
7 Bone ....... (Chuck) $1-3/lb. 前烧,牛肩肉 (肩背肉)
Shouder ...... (Chuck) $1-3/lb. 前烧,牛肩肉 (肩臂肉)
========== 肘子, 胸口 (质极老) === 适合:炖,红烧,酱,卤 =================
Shank ... $2-3/lb. 肘子,蹄胖,牛腱子 . (前后小腿,瘦)
Plate ... $2-3/lb. 弓扣,牛筋肉,牛腩 . (上腹肌,瘦)
Brisket . $1-2/lb. 胸口,奶脯,牛筋肉 . (胸脯肉,肥)
1.牛肉选购是第一关键,挑选牛肉大有文章,
嫩质牛肉适合炒肉片,火锅. 如用于炖,烧.则嚼如木屑.
老质牛肉适合炖,烧. 如用于炒肉片,火锅 .则嚼如皮筋.
牛肉品种繁多,适合炒肉片的嫩质牛肉只占供肉总量25%,价格又贵.不得不多下功夫.中
餐馆炒牛肉片大多选用: 里脊 Tenderloin,Porterhouse,T Bone, 外脊 Rib eye, 米龙
Top Sirloin,($12-5/lb)。
我曾试用过Round(后腿肉$2.49),结果口感嫩老和风味相差甚远。也试用过 Chuck(前腿
肉$1.49/lb)结果难以容忍(齿).牛肉各部位简解见文末附表.
2。腌制吸汁工序是第二关键,腌制吸汁保证肉片成品汁饱嫩滑,至关重要,肉片吸汁越多
,口感越水嫩(餐馆诀窍).
具体做法:牛肉切片时 看清肌肉纹理,横截纤维,下刀切片。按照菜谱把调味料伴入牛肉
片,可酝量多加些盐(50-80%),同时伴入挂浆水淀粉。冰箱冷置约30分钟后加水20-30%,
分批伴入(约20分钟),肉片越咸越能吸水.腌制完毕放冰箱备用.
笔者不赞成放苏打粉Baking Soda破坏风味.可酌情加些嫩肉粉 Meat Tenderizer,其主
要成份(按量)依次是盐,糖,木瓜蛋白酶.
3. 火侯:中火热油,下牛肉片(主料)划散,至变色立即出锅。
洗锅,按菜谱炒制配料(如青椒,青花菜等)炒至九分熟,倒入牛肉片,伴炒入味,数十秒钟
即可出锅装盘。(炒制配料时可少放些盐)
以下是牛肉各部位和质地简解.由上到下,由嫩到老排列。
========== 腰 腹 部 分(质嫩) === 适合炒肉片,火锅 ==================
Tenderloin (Short loin) $8-12/lb.里脊 ............. (脊骨内侧(腹侧)条肉)
Porterhouse(Short loin) $5-12/lb.里脊,外脊 ........ (臀腰部脊骨背侧肉)
T Bone ... (Short loin) $5-10/lb.里脊,外脊 ........ (胸腰部脊骨背侧肉)
Strip loin (Short loin) $5-10/lb.嫩腰(诈称里脊) ... (二侧腰肉)
Rib eye ......... (Rib) $5-10/lb.上脑,外脊(诈称里脊)(胸部背脊肉,略肥)
Top Sirloin . (Sirloin) $4-8/lb. 米龙(诈称里脊) ... (盆骨后肌,近腰臀肉)
Tir-tip ..... (Sirloin) $4-8/lb. 三岔肉 ........... (盆骨前肌,近腹腿肉)
Hanger ........ (Flank) $2-6/lb. 牛腩 ............. (胸腹隔肌)
Flank, Skirt .. (Flank) $2-6/lb. 牛腩,腰窝 ........ (下腹肌)
========= 后 腿 部 分(较老,瘦)=== 适合:烤,酱,卤 ==================
Rump ......... (Round) $2-5/lb. 后腿,仔盖,臀尖 ... (近腿臀肉)
Sirloin tip .. (Round) $2-5/lb. 后腿,粗和尚头 .... (大腿前伸肌)
Eye round .... (Round) $2-4/lb. 后腿,榔头肉 ...... (大腿肚内芯)
Top Round .... (Round) $2-4/lb. 后腿,仔盖,底板肉 . (大腿肚)
Bottom Round . (Round) $2-3/lb. 后腿,黄瓜肉,腱子肉 (大腿肚近膝)
======== 肩 胸 (前腿) 部分 (质老,略肥) === 适合:炖,红烧,酱,卤 ==========
Blade .... (Chuck eye) $2-5/lb. 上脑,前烧 . (近頸脊背肉,质较嫩)
7 Bone ....... (Chuck) $1-3/lb. 前烧,牛肩肉 (肩背肉)
Shouder ...... (Chuck) $1-3/lb. 前烧,牛肩肉 (肩臂肉)
========== 肘子, 胸口 (质极老) === 适合:炖,红烧,酱,卤 =================
Shank ... $2-3/lb. 肘子,蹄胖,牛腱子 . (前后小腿,瘦)
Plate ... $2-3/lb. 弓扣,牛筋肉,牛腩 . (上腹肌,瘦)
Brisket . $1-2/lb. 胸口,奶脯,牛筋肉 . (胸脯肉,肥)
Subscribe to:
Posts (Atom)
