RSS feed [root] /




login:

password:

title search:




 


Sun Mar 16 19:10:24 HKT 2014



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

Thu Feb 11 15:53:45 HKT 2016 From /weblog/java/concurrency

Interrupt


Just know that interrupt() call is just setting a flag, it have to be doing IO work (like database call), or in wait() status, before the thread can really be interrupted.

http://blogs.sun.com[..]winger?entry=swingworker_stop_that_train

Another nice explanation about interrupt, in summary:

What should we do when we call code that may cause an InterruptedException? Don't immediately yank out the batteries! Typically there are two answers to that question:
1) Rethrow the InterruptedException from your method. This is usually the easiest and best approach. It is used by the new java.util.concurrent.* package [ http://java.sun.com[..]util/concurrent/Semaphore.html#acquire() ], which explains why we are now constantly coming into contact with this exception.
2) Catch it, set interrupted status, return. If you are running in a loop that calls code which may cause the exception, you should set the status back to being interrupted. For example:
while (!Thread.currentThread().isInterrupted()) {
// do something
try {
TimeUnit.SECONDS.sleep(1000);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
break;
}
}
Remember the Law of the Sabotaged Doorbell - don't just ignore interruptions, manage them properly!

- http://www.javaspecialists.eu/archive/Issue146.html

Another blog explain about InterruptedException - http://www.nurkiewicz.com[..]terruptedexception-and-interrupting.html

http://ocpsoft.org[..]running-infinite-java-regular-expression

http://praveer09.github.io[..]derstanding-thread-interruption-in-java/

(google search) (amazon search)


Wed Feb 10 23:54:57 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000385.jpg



(google search) (amazon search)


Wed Feb 10 23:00:38 HKT 2016 From /weblog/%E6%97%A5%E5%B8%B8%E7%94%9F%E6%B4%BB

hack


life-hacks-that-could-save-your-life-in-a-catastrophe - http://list25.com[..]ave-your-life-in-a-catastrophe/?view=all

survival-myths-that-could-actually-hurt-you - http://list25.com/25-survival-myths-that-could-actually-hurt-you/

http://list25.com/25-home-uses-for-cheap-vodka-besides-drinking/

http://list25.com/25-things-that-they-dont-want-you-to-know

(google search) (amazon search)


Wed Feb 10 22:59:15 HKT 2016 From /weblog/science

radiation


Radiation fact - http://list25.com[..]s-about-radiation-and-its-crazy-effects/

關于輻射的真相 - http://cn.wsj.com/big5/20140424/opn104031.asp?source=rss

Chernobyl - http://list25.com[..]ar-meltdown-on-the-environment/?view=all



(google search) (amazon search)


Wed Feb 10 22:59:09 HKT 2016 From /weblog/science

Energy


Now the richest man of China is the scientist who research on solar cell
http://hk.news.yahoo.com/060112/12/1kcl1.html

Biodiesel -
http://www.google.com/search?q=Biodiesel
http://www.google.com/search?q=glycerol+methanol+caustic+soda

菠菜發電 - http://www.google.com[..]h?q=%E8%8F%A0%E8%8F%9C%E7%99%BC%E9%9B%BB

Nuclear battery - http://www.techbabu.com/2009/10/nuclear-batteries-now-a-reailty/

如何開采頁岩油 - http://cn.wsj.com/big5/20131016/inn071427.asp?source=rss

關于可再生能源的六個謬誤 - http://cn.wsj.com/big5/20131010/inn073331.asp?source=rss

Solar plant - http://cn.wsj.com/big5/20131022/inn071828.asp?source=rss http://www.solarimpulse.com/

香港工廠如何將地溝油變廢為寶 - http://cn.wsj.com/big5/20131004/ren162826.asp?source=rss

Energy facts - http://list25.com[..]-energy-that-will-surprise-you/?view=all

(google search) (amazon search)


Tue Feb 09 18:48:35 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000384



(google search) (amazon search)


Tue Feb 09 18:48:25 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000383



(google search) (amazon search)


Tue Feb 09 18:48:15 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000381



(google search) (amazon search)


Tue Feb 09 18:48:04 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000380



(google search) (amazon search)


Tue Feb 09 18:47:57 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000379



(google search) (amazon search)


Tue Feb 09 18:47:51 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000378



(google search) (amazon search)


Tue Feb 09 18:47:42 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000377



(google search) (amazon search)


Tue Feb 09 18:47:35 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000375



(google search) (amazon search)


Tue Feb 09 18:47:25 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000374



(google search) (amazon search)


Tue Feb 09 18:47:15 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000372



(google search) (amazon search)


Tue Feb 09 18:47:04 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000370



(google search) (amazon search)


Tue Feb 09 18:46:54 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000369



(google search) (amazon search)


Tue Feb 09 18:46:47 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000368



(google search) (amazon search)


Tue Feb 09 18:46:36 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000367



(google search) (amazon search)


Tue Feb 09 18:46:27 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000364



(google search) (amazon search)


Tue Feb 09 18:46:17 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000362



(google search) (amazon search)


Tue Feb 09 18:46:07 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000361



(google search) (amazon search)


Tue Feb 09 18:45:58 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000360



(google search) (amazon search)


Tue Feb 09 18:45:47 HKT 2016 From /gallery/City+Snapshot/Yau+Ma+Tei/kingparkhill

P1000359



(google search) (amazon search)


Mon Feb 08 18:44:26 HKT 2016 From /gallery/Home/YimKan/PanaVideo

P1000354



(google search) (amazon search)