2009年12月31日 星期四

Eclipse 啟動 Tomcat 超過 45秒會出現 timtout 訊息

編輯
/workspace/.metadata/.plugins/org.eclipse.wst.server.core/servers.xml

修改
start-timeout="45"

Flash Builder 4 中文快速入門 (簡中)

需用 Adobe Reader 9 開啟
http://www.airia.cn/flashbuilder/fb4Qbook/source/

Tutorial: DisplayShelf Component in Flex

類似 itune 的找 CD 功能
http://www.quietlyscheming.com/blog/components/tutorial-displayshelf-component/

2009年12月29日 星期二

使用 a2enmod 指令啟用 Apache 模組

a2enmod ssl
a2enmod userdir
a2enmod rewrite
a2enmod suexec
a2enmod include

http://philipatswarchy.wordpress.com/category/technical/ssl/

隱藏 Apache, PHP 的版本

php.ini
expose_php = off

httpd.conf
ServerSignature Off
ServerTokens Prod

http://www.backup.idv.tw/viewtopic.php?t=821

2009年12月28日 星期一

骨折不宜多補鈣?!

http://hospital.kingnet.com.tw/essay/essay.html?category=%B9D%C5%A5%A4%A3%B6%EE%BB%A1&pid=5218

初生兒可吃益生菌嗎?

小孩從出生就都會吐奶,又常常打膈、脹氣,是不是腸胃比較不好?親友建議可以讓孩子食用益生菌,對他會不會比較ok?謝謝。

http://hospital.kingnet.com.tw/essay/essay.html?pid=21539&category=%B9D%C5%A5%A4%A3%B6%EE%BB%A1

XHProf: A Hierarchical Profiler for PHP

應該類似於 xdebug,不支援 windows
http://pecl.php.net/package/xhprof/

2009年12月11日 星期五

Java Exception: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionfactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]

簡而言之,就是缺少 javassist.jar
http://jboss.org/javassist/downloads/

設定 Tomcat Hot Deploy

編輯 %CATALINA_HOME%\conf\context.xml
加入下面兩項 attributes,不然無法 hot deploy
<Context>
<Context antijarlocking="true" antiresourcelocking="true"></context>
直接用 Ant 部署,只要更新 webapps 下面的 *.war 之前,先刪除 war 即可。

<property name="warfile" value="foo"/>    
<property name="deploydir"  value="c:\tomcat\webapps"/>

<delete file="${deploydir}\${warfile}.war"/>
<delete file="${deploydir}\${warfile}.war"/>
        <copy todir="${deploydir}" overwrite="true">
        <fileset dir=".">
            <include name="*.war"/>
        </fileset>
</copy>

測試環境是 Tomcat 5.5, win32

2009年12月8日 星期二

Eclipse 裝 Hibernate Tool

http://download.jboss.org/jbosstools/updates/stable/

MySQL Workbench for ER Modeling

發現 mysql 官方多了一項工具,裡面含有 DBDesigner4

MySQL Workbench

http://dev.mysql.com/downloads/select.php?id=8

2009年12月7日 星期一

2009年12月4日 星期五

MacBook Pro 安裝 OpenSolaris 2008.05

http://weblogs.java.net/blog/bleonard/archive/2008/05/_opensolaris_20.html

在 console 下寄送 email (Linux/Win32)

mailsend
http://www.muquit.com/muquit/software/mailsend/mailsend.html

Linux Kernel 之 Intel CC patch

聽說有的情況可以快 40%,平均也有 8~9%
http://www.linuxdna.com/
http://www.linuxjournal.com/content/linuxdna-supercharges-linux-intel-cc-compiler

如果 Linux 死機 : SysRq Key

To recover from a frozen linux system
Press and hold down ALT + SysRq (PrintScn) button and type phrase R E I S U B with 1 second interval between each letter.
Your system will magically recover from the crash and reboot itself.

http://alejandrocuervo.com/reisub/
http://linuxtoy.org/archives/what-to-do-if-linux-crash.html

在 Linux 下查詢 process 開了哪些檔案

lsof
http://ph7spot.com/musings/leveraging-lsof

2009年12月2日 星期三

Barcode in Java/PHP

PHP
php-barcode (Win32, Unix-Like 都可用)
http://www.ashberg.de/php-barcode/
設定 genbarcode 的位置,若與 php code 放同目錄的話
$genbarcode_loc="genbarcode.exe";

Java
barbecue 
http://barbecue.sourceforge.net/
整包 war 放到 ap server 即可使用其 servlet
經測試,在 jboss-402 下面運作正常

以上都是從 web 生成 image,若是在 Linux Desktop 使用,據說有 kbarcode
http://www.kbarcode.net/

2009年12月1日 星期二

Virtual Private Server (VPS) 的性能比較

VPS 性能比較
http://blog.gslin.org/archives/2009/11/30/2173/
http://journal.uggedal.com/vps-performance-comparison

http://www.linode.com/
記憶體較少,但速度較快

其他不在比較之內,但看似不錯的方案

可用 Ubuntu 9.04, 使用 RAID-10
http://www.slicehost.com/