RSS feed [root] /weblog



title search:


Tue Jan 17 22:34:04 HKT 2017


log down some useful resource

(google search) (amazon search)
download zip of files only

Fri Feb 16 10:05:31 HKT 2018 From /weblog/learning


In other words, both groups were stressed, but one group channeled the stress as a performance challenge; the other group as a performance threat. It wasn't the stress of a difficult test that caused distress--everyone felt that. It was how subjects interpreted their stress. -[..]mbracing-stress-minimizing-distress.html

Calming when conflict -[..]ks-in-the-human-body-to-make-or-break-us

A Stanford psychologist has a simple mental exercise for tackling student stress -[..]l-exercise-for-tackling-student-anxiety/

The 40% rule is simple: When your mind is telling you that you’re done, that you’re exhausted, that you cannot possibly go any further, you’re only actually 40% done. ( umm... not sure if it really useful all the time ) -[..]the-40-rule-the-simple-secret-to-success

“The ideal situation for improving learning and memory would be to experience no stress and to exercise,” Edwards said. -

(google search) (amazon search)

Sun Feb 11 23:34:31 HKT 2018 From /weblog/business


說一個好故事,讓 Pitch 更精彩 -

(google search) (amazon search)

Tue Feb 06 00:00:21 HKT 2018 From /weblog/database/performance

Note of SQL performance tuning

Note of this book -

1) Order of "and" and "or" is matter, if no cost-base optimizer

where column1 = 'a' and column2 = 'b' -> where column2 = 'b' and column1 = 'a' if column2 'b' is less likely

2) <> is more expensive than =

3) Can force to use index if SELECT * FROM table WHERE indexed_column > 0

4) UPPER(column) might lose information, use LOWER is better

5) WHERE column = 'WORD' or column = 'word' is always faster than WHERE LOWER(column) = 'word' , even faster version is test if database if case-insensitive: WHERE column = 'WORD' or ('WORD' <> 'word' AND column = 'word')

6) 32bit integer is the fastest datatype for 32bit OS

7) column in (?, ?) is faster than column =? or column = ? for some database, and don't slow in any database

8) For aggregate functions, prevent using having, try to use fewer columns in group by and use subquery if possible

9) In fact, count(1) is not faster than count(*)

10) CAST before aggregate function: SELECT CAST(SUM(column) AS INT) -> SELECT SUM(CAST(column as INT))

11) Use constant as much as possible, e.g.: select * from t1, t2 where t1.c1 = t2.c1 and t1.c1 = 1 -> select * from t1, t2 where t1.c1=1 andn t2.c1=1

12) Information of Join vs Subqueries

13) Information of optimum column type (VARCHAR, TIMESTAMP, WORD size INT and CHAR(1) usually better), shift effect for page

14) prevent NULL for porting issue

15) Low level table physical information

Some related links -[..]9/12/sql-optimization-tipsquestions.html

16) Prevent database level transaction, prevent joining, prevent locking ( like auto increment key ), pretty good suggestion -

17) Reduce dataset for aggregation -[..]-subqueries-to-count-distinct-50x-faster

Few good tips, like avoid cursors -[..]ent/21-rules-for-faster-sql-queries.html

(google search) (amazon search)

Mon Feb 05 18:14:08 HKT 2018 From /weblog/entertainment


Prince -[..]-the-artist-you-knew-as-prince/?view=all

elvis-presley -[..]ting-facts-about-elvis-presley/?view=all

george-michael -[..]-not-know-about-george-michael/?view=all

【傾聽音樂】中世紀音樂是宗教的奴僕,還是高貴的婢女 -[..]%98%E8%B2%B4%E7%9A%84%E5%A9%A2%E5%A5%B3/

不曾用西洋曲式寫流行曲的-創作歌手-朱頂鶴 -不曾用西洋曲式寫流行曲的-創作歌手-朱頂鶴/

(google search) (amazon search)

Fri Feb 02 10:19:00 HKT 2018 From /weblog/design/interview


(google search) (amazon search)

Sat Jan 27 23:43:42 HKT 2018 From /weblog/misc


(google search) (amazon search)

Sat Jan 27 10:29:51 HKT 2018 From /weblog/security


A list of diagrams to show how TLS work

Understanding TLS protocol -- handshaking kickoff -
Understanding TLS protocol -- connection states -[..]rstanding_tls_protocol_connection_states
Understanding TLS protocol -- handshaking renew -[..]rstanding_tls_protocol_handshaking_renew
Understanding TLS protocol -- handshaking resume -[..]standing_tls_protocol_handshaking_resume

Another reading, about the handshaking for HTTP protocol -[..]/06/first-few-milliseconds-of-https.html

How to get HTTPs working -[..]nt-environment-in-5-minutes-7af615770eec

(google search) (amazon search)

Thu Jan 25 23:51:57 HKT 2018 From /weblog/java/fundamental


Pitfall and solution of implementing finalize(), if you really need it[..]ns_Boehm/misc_slides/java_finalizers.pdf

Optimization-robust finalization -[..]C1/SC22/WG21/docs/papers/2007/n2261.html

An example showing that memory leak caused by finalize() -[..]

Beware the Finalizer queue, and java.lang.ref.Finalizer object -

(google search) (amazon search)

Thu Jan 25 23:41:52 HKT 2018 From /weblog/finance


sources for equity quantitative research -[..]sources-for-equity-quantitative-research[..]com/2011/03/06/people-of-quant-research/[..]ive-strategy-development-process/150#150

Homepage of a guy using Haskell for Quant -[..]/2014/07/quantitative-resources-for.html

(google search) (amazon search)

Thu Jan 25 23:36:20 HKT 2018 From /weblog/science


(google search) (amazon search)

Thu Jan 25 00:36:20 HKT 2018 From /weblog/science/animal


about-search-and-rescue-dogs -[..]arch-and-rescue-dogs-youll-want-to-know/

(google search) (amazon search)

Tue Jan 23 00:14:32 HKT 2018 From /weblog/trip


尋訪香港最好的茶餐廳 -

《米芝蓮港澳2013》 -[..]in2013/index.html?src=edm-ufood-20121219

寫在沙中線通車前幾年,我最喜愛的土瓜灣十間食肆 -[..]

速報:2018米芝蓮星級食店名單 -

(google search) (amazon search)

Tue Jan 23 00:10:23 HKT 2018 From /weblog/entertainment


讓我狠狠想你——王家衛電影的思念與愛情 -[..]%9D%E5%BF%B5%E8%88%87%E6%84%9B%E6%83%85/

十大最浪漫電影 -[..]A3%E5%B9%B4%E8%8F%AF-%E4%B8%8A%E6%A6%9C/

不按牌理出牌!影史10大即興演出 -[..]02/top-10-deadliest-horror-villains.html

歎為觀止的一鏡到底!影史著名12顆長鏡頭畫面 -

你是動作科幻迷嗎?影史40把知名槍械大集合! -

「我要打十個!」 回顧甄子丹7場精彩武打場面 -

喜劇之外:班史堤勒 -

中土世界的魔法師:彼得傑克森 -

Famous robots -

Robin Williams -[..]-actor-and-comedy-genius-robin-williams/[..]ilarious-stand-up-comedy-jokes-from.html

鈕承澤 -

Matrix -[..]hings-you-probably-didnt-know-about.html[..]/what-does-an-engineer-see-in-the-matrix

[專題] 從黑澤明的《七武士》淺談剪接在電影發展裡的奧祕 -

About Pulp Fiction -

Johnny Deep -

Inception -

Evolution of sound in movie -

聽到聲就知影!8 首知名角色登場配樂! -

[專題] 跟著老師動疵動!十部你不能錯過的歌舞電影 -

[專題] 最熟悉的陌生人:六位你一定要認識的電影片頭設計大師 -

傑克葛倫霍, Jake Gyllenhaal -

About "Back to the future" -[..]facts-you-probably-never-knew-about.html

Star war fact -[..]s-to-bring-out-your-inner-jedi/?view=all

Alan Rickman -[..]should-know-about-alan-rickman/?view=all

10 個不露骨卻讓人臉紅心跳的床戲-

[新聞] 亞洲電影大師之作!釜山國際影展評選出影史最佳亞洲電影前十名 -

(google search) (amazon search)

Tue Jan 16 14:50:43 HKT 2018 From /weblog/hardware


Memory Ordering in Modern Microprocessors -[..]ors/25-microchips-that-shook-the-world/0

FPGA CPUs, how to turn a FPGA to a working CPU? -[..]com_myblog&show=FPGA-CPUs.html&Itemid=29

If according this article, GPU easier to have more cores is required code to be very regular fashion with no branches and inter-thread communication -

CPU DB: Recording Microprocessor History -

Difference CPU comparing -[..]12/03/28/fractal-and-crypto-performance/

Detail about how CPU caching work -[..]/2013/02/cpu-cache-flushing-fallacy.html

CPU design on paper -[..]0_h&elq=891e5022435b400e89040e1342c10b72[..]rdware-transactional-memory-in-java.html

Interview about TSX -[..]views/tene-hardware-transactional-memory

quantum -[..]ience/flip-flop-quantum-computer-043242/

meltdown -[..]15/spectre-and-meltdown-how-cache-works/

(google search) (amazon search)

Fri Jan 12 10:21:11 HKT 2018 From /weblog/java/features


Good : dynamic, generic
Bad: slow, don't work with Obfuscators and most searching and refactoring tools

A very nice tool to get parameter name - (e.g.: user of getUser(User user))

How to improve the performance -[..]-reflection-as-fast-as-direct-calls.html

The problem of using reflection to modify final field -[..]7-writing-to-final-fields-via-reflection

Using reflection for using test -[..]f-hacking-enums-and-modifying-final.html

Sharing about using invokedynamic -[..]ticles/Invokedynamic-Javas-secret-weapon

LamdbaMetafactory is pretty fast. (*) -[..]8/01/09/JavaReflectionButMuchFaster.html

(google search) (amazon search)

Mon Jan 08 23:19:43 HKT 2018 From /weblog/photographic/collections


一戰士兵鏡頭下的戰場生活 -[..]/category/travel/usa/nevada/burning-man/

(google search) (amazon search)

Mon Jan 08 00:22:04 HKT 2018 From /weblog/health/food

Health Meal[..]/science/top-diets-year-ranked-explained

Fix muscle with good food -[..]life/food/fix-your-muscle-with-food.html

要動不要痛—調整飲食,擊退運動傷害! -[..]eat-when-you-get-hurt-from-exercise.html

【動畫●每日健康】新超級食物苔麩代替麵粉 多吃腸胃更暢通 -[..]om/realtime/supplement/20161012/55761307[..]at-makes-eating-healthier-easy/?view=all

豐富健康食譜 -

Eating for health, not weight -[..]y/the-optimal-diet.html?_r=2&ref=opinion

健康飲食還需多吃“苦” -


1.【 想要膽固醇聽話? 每天三杯柳橙汁OK!! < >】

2.【 要長壽別忘蕃茄 < >】

3.【 喝杯水再睡_喝適量的水有益健康! < >】

4.【 喝下重覆煮沸的開水會致癌 < >】

5.【 喜歡吃冷凍水餃的人請小心 < >】

6.【 小心衛生筷子 < >】

7.【 豆漿, 請多告訴你身旁的女性朋友 < >】

8.【 操作電腦時要多喝茶 < >】

9.【 老醫之家:一個不錯的中文醫療資訊網站 < >】

10.【 建議大家最近別吃生魚片及去海邊玩! < >】

11.【 養肺的季節--養肺食譜 < >】

12.【 聽過喝咖啡減肥? < >】

13.【 幫助皮膚健康的維生素 < >】

14.【 造成身材浮腫的殺手食物報告出爐 < >】

15.【 喝雞湯 細菌黏液最快排出 < >】

16.【 15種吃了腿會變瘦、變美的食物 < >】

17.【 早餐吃熱食,才能保護胃氣 < >】

18.【 五種食物,讓你百毒不侵 < >】

19.【 不要太常吃冰 < >】

20.【 喝太多鋁箔包飲料容易導致老年癡呆症 < >】

21.【 黑糖薑茶(女人一定要看) < >】


1.【 午餐後趴睡是健康的殺手 <午睡是健康的殺手.htm >】

2.【 失眠、生物電和橡皮鞋底! < >】

3.【 有午睡習慣的人比較不會老 < >】

4.【 睡眠不足 小心變笨 < >】

5.【 深夜開燈睡易致癌 < >】

6.【 用微波爐加熱水請小心 < >】

7.【 杜絕感冒的六大法則 < >】

8.【 每天更健康 < >】

9.【 小心!看不見的「波」可能讓你致癌 < >】

蒜頭飯 - 閱後傳知他人,添福添壽

一位朋友每天吃蒜頭蒸飯,晚餐用一把蒜頭切碎煮飯, 半年之後高血壓消失了,痛風症消失了,坐骨神經痛亦消失了。 對於目前流行的非典型肺炎,他認為吃蒜頭是增強免疫力的方法, 因為蒜頭是「窮人靈芝」,通血管及清除毒素,以前美軍 亦用作隨身解毒劑。

蒜頭越多越香,拍碎,用油鍋炒香蒜頭放入鹽及煮好的飯,加葫 椒鹽拌炒起鍋。 ( 菲律賓人的早餐都是這道主食 )


另一位朋友提醒要多食維他命 C,以增強抵抗力,並切忌吃煎炸熱氣食物,免引致喉嚨發

1. 約十公克的薑磨成糊狀。
2. 把薑糊放入玻璃杯裡。
3. 注入滾燙的熱開水。
4. 加入一匙蜂蜜,拌勻後飲用。

老薑切片或拍碎煮黑糖功效一樣 , 連續喝兩個月(每天早晚各喝一次 )據書本 記載的見證:
1. 身體變溫暖,手腳冰冷的『怕冷症』體質明顯改善。
2. 體重可減輕約十公斤。
3. 皮膚變得細嫩。
4. 去掉多餘贅肉,腰圍變細。


熱門瘦身食譜排行榜Top5 -

冬天多吃莓果養顏排毒又減肥 (strawberry) -

長期食素加速衰老 -

Food good for slim and skin -

10 good food... -

Food to help hair -

地中海膳食模式——一种富于水果、蔬菜、坚果、全谷物和富含不饱和脂肪酸的鱼类的膳食, 食用三文鱼, 水果,击退中风, 放下苏打,端起咖啡, 酒精:始终都要节制, 巧克力——更多时候依然视为氧化剂, 什么不能吃:限制碳水化合物, 红肉 -

日日食花生 更健康更長命 -[..]%A5%E5%BA%B7%E6%9B%B4%E9%95%B7%E5%91%BD/

busy-students-eat-healthier -[..]lp-busy-students-eat-healthier/?view=all

(google search) (amazon search)

Sun Jan 07 00:48:34 HKT 2018 From /weblog/science


颱風啓示錄(2017年8月的天鴿/帕卡) -

雲圖 -

(google search) (amazon search)

Sun Jan 07 00:45:10 HKT 2018 From /weblog/trip/travelling


(google search) (amazon search)

Thu Jan 04 15:09:26 HKT 2018 From /weblog/trip/travelling


【泰國新興島嶼】被國家地理評為最值得去的處女島! -

考索國家森林公園 -[..]style/realtime/article/20180104/57660597

【正Trip精︳布吉】闖熱帶雨林 不畏水蛭上山睇珊瑚洞 -[..]style/realtime/article/20180104/57660599

(google search) (amazon search)

Thu Jan 04 14:44:30 HKT 2018 From /weblog/languages


How go utilizing-multi-core

package main

import "runtime"

func calc()
sum := 0;
for i := 0; ; i++ {
sum += i;

func main()
go calc();
go calc();
go calc();
go calc();
go calc();
go calc();
go calc();

A presentation -

Some good thing about go -[..]3/12/16/studying-go-language-golang.html

About memory management and thread -

Several good tools -[..]ous-integration-like-a-boss-941a3a9ad0b6

A few practical comments of using go in production -

(google search) (amazon search)

Fri Dec 29 17:51:28 HKT 2017 From /weblog/java/tools


Compare between pulsar and Kafka -[..]ar-distributed-pub-sub-messaging-system/

(google search) (amazon search)

Mon Dec 18 23:43:55 HKT 2017 From /weblog/love


how-nobel-winning-economic-theories-can-help-your-online-dating -[..]-help-your-online-dating/?mod=marketbeat

“The truth about the timing being wrong is that it’s nothing more than the world’s flimsiest reason not to try. It’s the simplest excuse to pack it in. It’s a pre-designed reason to bow out. Saying that the timing is wrong is saying nothing more than ‘You aren’t worth any inconvenience.’” -[..]-no-right-person-wrong-time-ac38f05dd0e6

(google search) (amazon search)