退伍軍人桿菌

“退伍军人症”是由“退伍军人杆菌”(Legionella spp)引发的急性肺炎及呼吸道感染。该病得名于1976年美国宾夕法尼亚州一次退伍军人聚会后的“浩劫”——与会的221位退伍军人中,有34人死于不明病原的肺炎。从死者肺部组织中分离出了一种相当特殊的细菌,后被命名为“退伍军人杆菌”。英国一项研究发现,司机患上该病的几率是普通人的5倍,罪魁祸首可能是车辆的雨刷。 Ref: http://www.hudong.com/wiki/%E9%80%80%E4%BC%8D%E5%86%9B%E4%BA%BA%E6%9D%86%E8%8F%8C Ref: http://en.wikipedia.org/wiki/Legionella_longbeachae

September 2, 2011 · 1 min · birdchan

storing blob into mysql through apache and php

This idea sounds easy and stuff. I agree. I assume you already got it working fine. But perhaps one day you may notice something is not working well, especially when you are dealing with bigger files. Below are a few things you want to look out for. Change your /etc/php.ini upload_max_filesize = 2M post_max_size = 8M memory_limit = 128M The default upload file size is 2M, which could be too small. If your upload file is larger than this, you will receive an empty upload file at your server side. So, increase this. While if you are using ajax to post-send, increase the post_max_size limit. Another thing to watch out for is memory_limit. If you somehow make copies of big blobs in your code, increasing PHP’s memory limit is also a good idea. ...

September 2, 2011 · 3 min · birdchan

Using ajax to do a file submit

I have read many online articles on this topic. However, they either just show how to do ajax form submission, or how to submit just files. In my case, well I bet in most real life situations, we need to submit both ordinary text/selection/radio values and files. Here is how to do it. HTML forms. Yea, whatever. Just set something up. Submit Notice I didn’t use the form tag. My philosophy here is that: since we will decide the data set during the ajax submission, there is really no need to declare a form here. ...

September 1, 2011 · 2 min · birdchan

PHP read from a mounted drive

Recently, I needed to read from a mounted drive on osx using Apache and PHP. I need to grab some file names in a certain directory using opendir or scandir, then dynamically populate a select dropdown box. The issue is, the default apache user is _www being in the _www group, while the mounted drive allows only the “staff” group to enter. In my case, I cannot change the mounted drive access permissions. ...

August 31, 2011 · 2 min · birdchan

Tech companies chinese names

Adobe 奧多比 Amazon 亞馬遜 AMD 超微 Apple 苹果电脑 Cisco 思科 Dell 戴尔 eBay 易贝 Facebook 臉書 Google 谷歌 Hewlett-Packard 惠普 IBM 國際商業機器 Intel 英特爾 Microsoft 微软 Oracle 甲骨文 Sony 索尼 Yahoo 雅虎

August 20, 2011 · 1 min · birdchan

dataTables editable plugin multiple select

If you are using the jQuery datatable with the editable extension, you probably know that you can only highlight one single row (tr). In my opinion, that’s really for the purpose of integrating the single row add/delete functions. If you need to implement multiple row operations, thus needing multiple row selection, here is how you can do it: Open up jquery.dataTables.editable.js Toward the end of the file, look for $(oTable.fnSettings().aoData).each(function () { $(this.nTr).removeClass(properties.sSelectedRowClass); }); ...

August 15, 2011 · 1 min · birdchan

Password strength

ref link: http://xkcd.com/936/

August 10, 2011 · 1 min · birdchan

25908723

[youtube &w=425&h=349] 萬寧No.1 - 靚仔哥哥與可愛小妹妹 Winky 王允祈 http://youtu.be/Sy6dZuhOOsM 萬寧BB妹好CUTE

July 27, 2011 · 1 min · birdchan

List of U.S. state names

Alabama 阿拉巴馬州 Alaska 阿拉斯加州 Arizona 亞利桑那州 Arkansas 阿肯色州 California 加利福尼亞州 Colorado 科羅拉多州 Connecticut 康涅狄格州 Delaware 特拉華州 District of Columbia 哥倫比亞特區 Florida 佛羅里達州 Georgia 佐治亞州 Hawaii 夏威夷州 Idaho 愛達荷州 Illinois 伊利諾州 Indiana 印弟安納州 Iowa 愛荷華州 Kansas 堪薩斯州 Kentucky 肯塔基州 Louisiana 路易斯安那州 Maine 緬因州 Maryland 馬里蘭州 Massachusetts 麻塞諸塞州 Michigan 密歇根州 Minnesota 明尼蘇達州 Mississippi 密西西比州 Missouri 密蘇里州 Montana 蒙大拿州 Nebraska 內布拉斯加州 Nevada 內華達州 New Hampshire 新罕布什爾州 New Jersey 新澤西州 New Mexico 新墨西哥州 New York 紐約州 North Carolina 北卡羅來納州 North Dakota 北達科他州 Ohio 俄亥俄州 Oklahoma 奧克拉荷馬州 Oregon 俄勒岡州 Pennsylvania 賓西法尼亞州 Rhode Island 羅德島州 South Carolina 南卡羅來納州 South Dakota 南達科他州 Tennessee 田納西州 Texas 德克薩斯州 Utah 猶他州 Vermont 佛蒙特州 Virginia 弗吉尼亞州 Washington 華盛頓州 West Virginia 西佛吉尼亞州 Wisconsin 威斯康辛州 Wyoming 懷俄明州 ...

July 27, 2011 · 1 min · birdchan

Cannot install Xcode on osx Lion

I clicked on the install button on the Mac App Store to install Xcode for Lion. But then after the download was done, nothing happened. If you are in the same boat, keep reading. It turns out that there is this new thing called Launchpad on your dock. The “Install Xcode” icon is sitting there for you to click on. But before that, do the following to save you trouble. ...

July 24, 2011 · 1 min · birdchan