人生第一次測字,感覺還頗神準的...而且是給教授測的...這就更有趣了...
從測的字之中竟然有這麼多的線索,並且一針見血的說中了我的問題點(缺點)。
我都快忘記自己的缺點了說...因為有些人格特質自己不容易看見,倒是和你相處的人看得見...
不過測字和算命一樣,都是提供一個現況的參考,隨著外在條件的改變,未來的命運也會所不同。
剛剛也到智邦公益館以教授的名義捐了小錢,希望也能替教授添點功德。
不過想到論文和投影片...又是一整個頭痛...
2010年3月29日 星期一
2010年3月27日 星期六
SSH Tunneling with Java
For my project, I need a SSH Tunneling for database connection.
After google a bit. I found JSch. Maybe I can try to use this.
But I don't know why I can't connect to http://www.jcraft.com/jsch/ now.
By the way, we can just use plink in windows.
JSch is a pure Java implementation of SSH2.
JSch allows you to connect to an sshd server and use port forwarding, X11 forwarding, file transfer, etc., and you can integrate its functionality into your own Java programs. JSch is licensed under BSD style license.
After google a bit. I found JSch. Maybe I can try to use this.
But I don't know why I can't connect to http://www.jcraft.com/jsch/ now.
By the way, we can just use plink in windows.
JSch is a pure Java implementation of SSH2.
JSch allows you to connect to an sshd server and use port forwarding, X11 forwarding, file transfer, etc., and you can integrate its functionality into your own Java programs. JSch is licensed under BSD style license.
2010年3月24日 星期三
從小鬼的屁股看危機管理
昨天幫小鬼換尿布時,發現尿布裡有大便...蠻佩服我家小鬼大便後都不會覺得不舒服,還能繼續玩。
於是索性直接讓小孩光屁股,準備洗澡~
不過在放洗澡水的時候,小鬼已經開始在房間裡跑來跑去,並且用他的小屁屁摩擦地板...
Okay,在Entrepreneurship 的課程中有談到風險管理的部份,套用這個個案可以寫成這樣。
風險回應計劃
1.事前處理
(1)避免: 直接把某風險避開,例如訓練小鬼要乖乖在廁所大便,然後要把屁屁擦乾淨。
(2)預防: 防止或減少損失發生的原因,例如小屁屁帶賽的時候,要把尿布先包回去,在抓進浴室洗澡前,不要讓他光著屁股到處跑。
(3)移轉: 把風險導致的損失間接轉嫁給他人負擔,例如叫老婆來處理。
2.事中處理-抑制
事故已經發生,盡量減輕損失(抑制損失)。 例如吸引小鬼注意,他就會停止用他的小屁屁繼續摩擦地板。
3.事後處理-風險自留
除了透過其他方法彌補損失(如保險)外,自行承擔風險。
所以在沒有一定的把握之下,處理危機要十分謹慎。事前處理的部份可以降低風險發生的機率,不過一旦發生了還是要明快的處理,以免傷害擴大。
2010年3月13日 星期六
2009年8月23日 星期日
安裝Tomcat6 在 Ubuntu 9.04
網路上有相關的資料,我參考了 http://hi.baidu.com/mwinvent/blog/item/535d2f12da3a2a58f819b832.html 之後發現有些問題,我做了些修改。
1 sudo apt-get install tomcat6 tomcat6-docs tomcat6-admin tomcat6-examples
2 cd /usr/share/tomcat6
3 sudo mkdir logs conf
4 cd /etc/tomcat6
5 sudo cp -R Catalina policy.d /usr/share/tomcat6/conf
6 sudo cp context.xml tomcat-users.xml catalina.properties logging.properties server.xml web.xml /usr/share/tomcat6/conf
7 cd /usr/share/tomcat6
8 sudo chmod -R 777 conf
9 export JRE_HOME='usr/lib/jvm/java-6-sun-1.6.0.14/jre'
10. sudo service tomcat6 start or sudo service tomcat6 stop
start your firefox,tap 'localhost:8080' in the URL window.You will see
It works !
If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations!
This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat6/webapps/ROOT/index.html
Tomcat6 veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat6 and CATALINA_BASE in /var/lib/tomcat6, following the rules from /usr/share/doc/tomcat6-common/RUNNING.txt.gz.
You might consider installing the following packages, if you haven't already done so:
tomcat6-docs: This package installs a web application that allows to browse the Tomcat 6 documentation locally. Once installed, you can access it by clicking here.
tomcat6-examples: This package installs a web application that allows to access the Tomcat 6 Servlet and JSP examples. Once installed, you can access it by clicking here.
tomcat6-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the manager webapp and the host-manager webapp.
NOTE: For security reasons, using the manager webapp is restricted to users with role "manager". The host-manager webapp is restricted to users with role "admin". Users are defined in /etc/tomcat6/tomcat-users.xml.
You cannot login as mannager or host mannager before you edit tomcat-users.xml located in /usr/share/tomcat6/conf
sudo gedit /usr/share/tomcat6/conf
改完之後要 restart Tomcat
sudo service tomcat6 restart
* Stopping Tomcat servlet engine tomcat6 [ OK ]
* Starting Tomcat servlet engine tomcat6 [ OK ]
Moreinfo at https://help.ubuntu.com/8.10/serverguide/C/tomcat.html
sudo gedit /usr/share/tomcat6/conf/server.xml
在裡面找到<connector port="80">的元素
在中間加上URIEncoding="utf-8"的屬性就可以了:
<connector port="80" protocol="HTTP/1.1" uriencoding="utf-8">
1 sudo apt-get install tomcat6 tomcat6-docs tomcat6-admin tomcat6-examples
2 cd /usr/share/tomcat6
3 sudo mkdir logs conf
4 cd /etc/tomcat6
5 sudo cp -R Catalina policy.d /usr/share/tomcat6/conf
6 sudo cp context.xml tomcat-users.xml catalina.properties logging.properties server.xml web.xml /usr/share/tomcat6/conf
7 cd /usr/share/tomcat6
8 sudo chmod -R 777 conf
9 export JRE_HOME='usr/lib/jvm/java-6-sun-1.6.0.14/jre'
10. sudo service tomcat6 start or sudo service tomcat6 stop
start your firefox,tap 'localhost:8080' in the URL window.You will see
It works !
If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations!
This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat6/webapps/ROOT/index.html
Tomcat6 veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat6 and CATALINA_BASE in /var/lib/tomcat6, following the rules from /usr/share/doc/tomcat6-common/RUNNING.txt.gz.
You might consider installing the following packages, if you haven't already done so:
tomcat6-docs: This package installs a web application that allows to browse the Tomcat 6 documentation locally. Once installed, you can access it by clicking here.
tomcat6-examples: This package installs a web application that allows to access the Tomcat 6 Servlet and JSP examples. Once installed, you can access it by clicking here.
tomcat6-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the manager webapp and the host-manager webapp.
NOTE: For security reasons, using the manager webapp is restricted to users with role "manager". The host-manager webapp is restricted to users with role "admin". Users are defined in /etc/tomcat6/tomcat-users.xml.
You cannot login as mannager or host mannager before you edit tomcat-users.xml located in /usr/share/tomcat6/conf
sudo gedit /usr/share/tomcat6/conf
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="manager"/>
<role rolename="tomcat"/>
<role rolename="admin"/>
<role rolename="role1"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="admin" password="admin" roles="manager,admin"/>
<user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>
改完之後要 restart Tomcat
sudo service tomcat6 restart
* Stopping Tomcat servlet engine tomcat6 [ OK ]
* Starting Tomcat servlet engine tomcat6 [ OK ]
Moreinfo at https://help.ubuntu.com/8.10/serverguide/C/tomcat.html
sudo gedit /usr/share/tomcat6/conf/server.xml
在裡面找到<connector port="80">的元素
在中間加上URIEncoding="utf-8"的屬性就可以了:
<connector port="80" protocol="HTTP/1.1" uriencoding="utf-8">
訂閱:
文章 (Atom)
