By Unknown | Wednesday, February 27, 2013
Posted in: , | 0 comments

2013-02-27跑步紀錄

今天在清大操場跑30圈。第一段時間是從家裡到清大的暖身,距離約1.4km,看來今天速度很會飄,大部分時間都在2分5秒至2分10秒之間,第10-15還有21-25圈甚至還比前5圈慢。之後試試看能不能都把時間壓在2分5秒之內,然後再延長5圈到35圈,終極目標是平均每圈2分整。


  No  Elapsed Time  Lap Time      Record Time
 01:  00:08:12.535  00:08:12.535  2013-02-27 20:23:57.716
-------------------------warm up----------------------------
 02:  00:10:21.248  00:02:08.713  2013-02-27 20:26:06.429
 03:  00:12:29.173  00:02:07.925  2013-02-27 20:28:14.354
 04:  00:14:37.309  00:02:08.136  2013-02-27 20:30:22.490
 05:  00:16:44.920  00:02:07.611  2013-02-27 20:32:30.101
 06:  00:18:51.639  00:02:06.719  2013-02-27 20:34:36.820
-------------------------10:39:391---------------------------
 07:  00:20:59.259  00:02:07.620  2013-02-27 20:36:44.440
 08:  00:23:05.420  00:02:06.161  2013-02-27 20:38:50.601
 09:  00:25:09.850  00:02:04.430  2013-02-27 20:40:55.031
 10:  00:27:15.946  00:02:06.096  2013-02-27 20:43:01.127
 11:  00:29:22.871  00:02:06.925  2013-02-27 20:45:08.052
-------------------------10:31:232---------------------------
 12:  00:31:31.084  00:02:08.213  2013-02-27 20:47:16.265
 13:  00:33:39.837  00:02:08.753  2013-02-27 20:49:25.018
 14:  00:35:45.045  00:02:05.208  2013-02-27 20:51:30.226
 15:  00:37:50.365  00:02:05.320  2013-02-27 20:53:35.546
 16:  00:39:56.500  00:02:06.135  2013-02-27 20:55:41.681
-------------------------10:33:629---------------------------
 17:  00:42:01.817  00:02:05.317  2013-02-27 20:57:46.998
 18:  00:44:06.128  00:02:04.311  2013-02-27 20:59:51.309
 19:  00:46:12.541  00:02:06.413  2013-02-27 21:01:57.722
 20:  00:48:15.797  00:02:03.256  2013-02-27 21:04:00.978
 21:  00:50:21.260  00:02:05.463  2013-02-27 21:06:06.441
-------------------------10:24:760---------------------------
 22:  00:52:27.015  00:02:05.755  2013-02-27 21:08:12.196
 23:  00:54:33.968  00:02:06.953  2013-02-27 21:10:19.149
 24:  00:56:40.313  00:02:06.345  2013-02-27 21:12:25.494
 25:  00:58:45.649  00:02:05.336  2013-02-27 21:14:30.830
 26:  01:00:48.278  00:02:02.629  2013-02-27 21:16:33.459
-------------------------10:27:018---------------------------
 27:  01:02:51.608  00:02:03.330  2013-02-27 21:18:36.789
 28:  01:04:54.038  00:02:02.430  2013-02-27 21:20:39.219
 29:  01:06:55.905  00:02:01.867  2013-02-27 21:22:41.086
 30:  01:08:55.850  00:01:59.945  2013-02-27 21:24:41.032
 31:  01:10:47.737  00:01:51.887  2013-02-27 21:26:32.918
-------------------------09:59.459--------------------------- Pace 5
 32:  01:10:48.403  00:00:00.666  2013-02-27 21:26:44.337

Read more
By Unknown | Wednesday, February 13, 2013
Posted in: , | 0 comments

2013-02-13跑步記錄

今天的每圈計時,200m操場共50圈。前10圈時只想說要輕鬆跑完就好了(大過年的,幹嘛這麼逼呢),後來不知不覺得到了25圈絕的狀況也還不差,我爸媽也還在跑的狀況下,就繼續跑下去,跑到35圈時就決定要跑完10km了。

不過每次都40圈時,就會想要休息,所以那時每一圈大概都是00:01:05 ,到了最後一公里時才開始加速度跑完剩下的距離。以這樣的狀況下跑完10km時間是53:27:078,不知道在第二個10km時身體的狀況會是如何,估計已比較輕鬆的狀況下,第二個10km應該會花費58分鐘,然後再衝刺個1km,半馬應該是落在一小時56分鐘上下,差不多就是現在的極限。如果可以維持兩個10km速度在54分鐘的話,不知道會不會比較容易進步,以後可以再找機會試試。

  No  Elapsed Time  Lap Time      Record Time
   1:  00:01:11.187  00:01:11.187  2013-02-13 09:33:05.106
   2:  00:02:21.618  00:01:10.431  2013-02-13 09:34:15.536
   3:  00:03:29.452  00:01:07.834  2013-02-13 09:35:23.371
   4:  00:04:36.696  00:01:07.244  2013-02-13 09:36:30.615
   5:  00:05:43.010  00:01:06.314  2013-02-13 09:37:36.928
   6:  00:06:48.477  00:01:05.467  2013-02-13 09:38:42.395
   7:  00:07:53.486  00:01:05.009  2013-02-13 09:39:47.404
   8:  00:08:58.113  00:01:04.627  2013-02-13 09:40:52.031
   9:  00:10:02.090  00:01:03.977  2013-02-13 09:41:56.008
 10:  00:11:04.521  00:01:02.431  2013-02-13 09:42:58.439
 11:  00:12:08.373  00:01:03.852  2013-02-13 09:44:02.291
 12:  00:13:11.974  00:01:03.601  2013-02-13 09:45:05.893
 13:  00:14:14.931  00:01:02.957  2013-02-13 09:46:08.849
 14:  00:15:18.242  00:01:03.311  2013-02-13 09:47:12.160
 15:  00:16:21.570  00:01:03.328  2013-02-13 09:48:15.488
 16:  00:17:24.457  00:01:02.887  2013-02-13 09:49:18.375
 17:  00:18:27.478  00:01:03.021  2013-02-13 09:50:21.397
 18:  00:19:30.920  00:01:03.442  2013-02-13 09:51:24.839
 19:  00:20:34.618  00:01:03.698  2013-02-13 09:52:28.536
 20:  00:21:39.958  00:01:05.340  2013-02-13 09:53:33.876
 21:  00:22:43.600  00:01:03.642  2013-02-13 09:54:37.519
 22:  00:23:47.341  00:01:03.741  2013-02-13 09:55:41.259

 23:  00:24:51.714  00:01:04.373  2013-02-13 09:56:45.632
 24:  00:25:56.432  00:01:04.718  2013-02-13 09:57:50.350
 25:  00:27:00.731  00:01:04.299  2013-02-13 09:58:54.649
 26:  00:28:05.150  00:01:04.419  2013-02-13 09:59:59.068
 27:  00:29:07.337  00:01:02.187  2013-02-13 10:01:01.256
 28:  00:30:10.925  00:01:03.588  2013-02-13 10:02:04.843
 29:  00:31:15.209  00:01:04.284  2013-02-13 10:03:09.127
 30:  00:32:19.266  00:01:04.057  2013-02-13 10:04:13.184
 31:  00:33:23.870  00:01:04.604  2013-02-13 10:05:17.788
 32:  00:34:27.449  00:01:03.579  2013-02-13 10:06:21.368
 33:  00:35:32.323  00:01:04.874  2013-02-13 10:07:26.241
 34:  00:36:35.846  00:01:03.523  2013-02-13 10:08:29.764
 35:  00:37:40.192  00:01:04.346  2013-02-13 10:09:34.795
 36:  00:38:43.864  00:01:03.672  2013-02-13 10:10:38.467
 37:  00:39:48.351  00:01:04.487  2013-02-13 10:11:42.955
 38:  00:40:53.038  00:01:04.687  2013-02-13 10:12:47.642
 39:  00:41:57.279  00:01:04.241  2013-02-13 10:13:51.882

 40:  00:43:02.961  00:01:05.682  2013-02-13 10:14:57.565
 41:  00:44:08.151  00:01:05.190  2013-02-13 10:16:02.755
 42:  00:45:13.779  00:01:05.628  2013-02-13 10:17:08.382
 43:  00:46:16.793  00:01:03.014  2013-02-13 10:18:11.396
 44:  00:47:19.172  00:01:02.379  2013-02-13 10:19:13.775
 45:  00:48:21.016  00:01:01.844  2013-02-13 10:20:15.620
 46:  00:49:22.437  00:01:01.421  2013-02-13 10:21:17.040
 47:  00:50:24.309  00:01:01.872  2013-02-13 10:22:18.912
 48:  00:51:25.921  00:01:01.612  2013-02-13 10:23:20.524

 49:  00:52:30.670  00:01:04.749  2013-02-13 10:24:25.274
 50:  00:53:27.078  00:00:56.408  2013-02-13 10:25:22.679

Read more
By Unknown | Friday, February 08, 2013
Posted in: , | 0 comments

JSON in Java


用法

假設我有一個Hashtable stor,要把它用JSON格式輸出,可以利用JSON in Java這個套件解決。首先要製作jar檔,這部分已經有網站說明了,完成之後可以這樣用:
Loading from Gist ....

參考

http://werdna1222coldcodes.blogspot.tw/2008/10/jsonjar.html
http://werdna1222coldcodes.blogspot.tw/2009/01/json-in-java.html
https://github.com/douglascrockford/JSON-java
http://www.json.org/java/index.html

Read more
By Unknown | Thursday, February 07, 2013
Posted in: | 0 comments

Some thoughts before chinese new year

Useful Tool

TheSharwartz: a job queue management system written in perl.
DBIx::Class: an object mapper of relational database.
Neo4j: a graph database.
Neo4p: a perl wrapper for noe4j rest api.
Mojolicious: a perl web framework, great.

My own project

ck-job-management: first release.
plack: a clone from ruby octopress but have not updated for a long time.
gfm-markdown: an simple perl module to use guthub api as a render engine for markdown.
no-name: a simple website used in my work as a host of job controller for variety perl programs we used every day. It utilized the useful tool like TheSchwartz, DBIx::Class, Mojolicious and ck-job-managerment.

Some thoughts

  1. To develop a worker to control primer3 program and cross-react program (written in java).
  2. A tool to parse kegg and nci pathway and transfer into our own database (neo4j). I also planed to write some website to provide convenient way to query pathway data. (first priority)
  3. Migration of no-name system to ec2 and develop a series process to deploy our program where we want.
  4. Studying more about Mojolicious.

Future 

  1. Developing a valuable product or service not only useful in our jobs but also can create some profits along.

Read more
By Unknown | Tuesday, February 05, 2013
Posted in: , | 0 comments

Parse html entities into perl string

原文在此

昨天遇到一個頁面,他把部分內容用javascript顯示,大概是這樣
addy7788 = addy7788 + 'ucxray' + '.' + 'berkeley' + '.' + 'edu';
很明顯的除了特殊符號之外,一般文字也在裏頭,但是HTML::Entities只能處理掉特殊符號,必須要再用Text::Unidecode把文字轉出來(你要把它手動轉成\x{101}這樣也是可以拉,不過有寫好的套件不用白不用),用法大概就是這樣:
unidecode(decode_entities($str));
 搞定

Read more
By Unknown | Sunday, February 03, 2013
Posted in: | 0 comments

Perl中文字比對

剛剛有一段code,把Excel讀出來之後要確認裡面的內容。但判斷的內容是中文,使的條件無法通過
if ($str eq "二抗"){
...
}
這一段一直出問題,後來就用了治標不治本方法。用原本的code比對...
echo '二抗' | hexdump -C 
然後條件寫成
if ($str eq "\xe4\xba\x8c\xe6\x8a\x97"){
...
}
還是我把它decode在比對好了,不然每次看到這段碼都不知道他是啥...

來源

Read more