星期六, 4月 18, 2015

Raspberry Pi serial port 設定

為了在Raspberry Pi上寫程式聽serial port
必須將os預設開啟此連接阜請轉到os主控台功能關閉
我只關了login, 沒有關啟動資訊

參考url
Raspberry Pi and the Serial Port

1.關閉serial port login
修改/etc/inittab
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
註解掉
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

2.關閉啟動資訊 Bootup Info
修改/boot/cmdline.txt
拿掉
console=ttyAMA0,115200 kgdboc=ttyAMA0,115200


Debian 停用桌面環境

參考網頁
http://reader.roodo.com/fox/archives/10667689.html

修改/etc/X11/default-display-manager
將內容整個清空
就算將/usr/sbin/gdm3註解掉也沒用

Debian 版本 7.8 32bit

星期三, 7月 22, 2009

eclipse裡開發GWT spring Log4j 無作用

最近用GWT開發專案
有用到Spring
可是log4j的設定一直有問題

原來是tomcat[5.0.28] 裡的logging要特別設定
加上WEB-INF/classes/commons-logging.properties
裡面 org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
告訴 tomcat 要用log4j

星期三, 4月 02, 2008

jsp中文亂碼

jsp檔案裡已經request.setCheracterSet("UTF-8")
卻還是一直出現亂碼

後來找到資料
原來資料傳過來時,get與post不同
若為POST
則request.setCharacterEncoding("UTF-8")
若為GET
則new String((request.getParameter("field")).getBytes("ISO-8859-1","UTF-8")

星期三, 1月 16, 2008

星期一, 12月 17, 2007

db2 連結 jdbc driver

底下為Type4
Class.forName("com.ibm.db2.jcc.DB2Driver");
Connection con = DriverManager.getConnection("jdbc:db2://localhost:50000/treasury","db2admin","db2admin");
確定可行,要注意防火牆有沒有50000給擋了
記的將db2java.zip、db2jcc.jar放到classpath

星期三, 11月 14, 2007

WSAD 的JCE過期

WSAD 的JCE會過期
相關的加解密套件會出問題

去網路上找到IBM的FIX PK23458
解壓縮
會有PK23458\components\prereq.jce\java\jre\lib\ext
將裡面的所有的jar複製到
C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1\runtimes\base_v5\java\jre\lib\ext
即可