aniol 神話四核 與 kindle app 運行不良的問題

現時最新版的 kindle app 4.1.1.1, 在神話四核上不能運行, crash 退出.

可以在 N多市場(網上)下載舊版, 3.8.2.4, 放在 SD card 內 . . . → Read More: aniol 神話四核 與 kindle app 運行不良的問題

Debug a Android program when it running (ie, for service debugging)

First of all, compile you APK in debug mode true, you can done by

change the AndroidManifest.xml, add “android:debug=’true’”, at (somewhere ^.^) application.
[I use this] Use ant build, compile your APK use “ant debug”

Connect your device to PC, and try “adb devices” to find if your device connect normally.

Install your APK to device, and start the program.

Start . . . → Read More: Debug a Android program when it running (ie, for service debugging)

strange character add at jsp <%@include %>

Just do the very simple thing at a JRun server, and there are something like,

<%@ include file=”top.inc” %>

for including the header and footer.

But find that there are some strange “white space” add before the the included code, and broken the layout.

At last, find that there are the BOM of the UTF-8 file, and use Notepad++, change . . . → Read More: strange character add at jsp <%@include %>

Eclipse 中文亂碼的問題

問題
1/ 在 Eclipse 的 properties file 不能 save 有中文的 file.
2/ 顯示不正確 (亂碼).

一、设置代码的编码格式:
1/ Eclipse-->Window-->Preferences-->General-->Content Types然后在选择
右边的Text下边的Java Properties File,修改其编码(推荐UTF-8)。
之後restart Eclipse.

2/
有时候大家也许会看到这个错误:Save could not be completed. Reason: some characters cannot be mapped using “ISO-8859-1“ character encoding
这个错误是因为你的文件格式是ISO-8859-1,右键点击报错文件->选择Properties->Text
file enconding->把ISO-8859-1改为UTF-8或者GBK就解决这个问题了。
这是因为Eclipse默认的文件格式都是ISO-8859-1,那如果大量文件该怎么办呢?我们不会一个一个手动改吧?答案是NO。
方法如下:

(選用, 不是必要)
二、编辑器字体(全体,包括PyDev、cdt、jdt的编辑器)
Eclipse-->Window-->Preferences-->General-->Appearance--> Colors and Fonts -->Basic --> Text Font-->Change 喜欢哪个就选哪个字体。

3. 在 eclipse 的 directory, 修改 . . . → Read More: Eclipse 中文亂碼的問題

Putty + AppLocale to connect a server of LANG=zh_CN.GB18030 at win7

In one word, Applocale is still work at win7

(In another word, AppLocale is still need at win7)

But when install the AppLocale, first Right click the installer and at the “Compatibly”, change to Preview Version, then install as normal.

Use AppLocale to start the putty, connect with following setting,

Change setting -> Window -> Appearance -> Font: 細明體

Change setting . . . → Read More: Putty + AppLocale to connect a server of LANG=zh_CN.GB18030 at win7

spring mvc list all error without

<spring:bind path=”cc.*”>
    <div>
    <table>
  <c:forEach items=”${status.errors.allErrors}” var=”error”>
    <tr>
     <td>${error.field }</td>
     <td style=”color: #888;”>${error.code}</td>
    </tr>
  </c:forEach>
  </table>      
    </div>
</spring:bind>

where “cc” is the model attribute name.

Inside the <spring:bind> tag,

status – object of org.springframework.web.servlet.support.BindStatus
status.errors – object . . . → Read More: spring mvc list all error without

Merge icon into sprites by ImageMagick

montage 001*.png -alpha on -background “#ffffff00″ -tile 10x -
geometry 16×16+4+4 ../sprites16.png

Where
001*.png, icons image file
10x, 10 columns for each row (ie, x1 mean 1 row)
16×16+4+4, resize icon to 16×16, and the margin 4 pixel between each other
sprites16.png, the . . . → Read More: Merge icon into sprites by ImageMagick

How to enable SNI of Apache at CentOS 5.5

Since Openssl at CentOS 5.5 is 0.9.8e which not support SNI, in order to support Virtual Host SSL at Apache, update openssl and mod_ssl is needed to be compiled.

In order not to impact the RPM installed at CentOS, we need to compile the new openssl to a location which not the system path, ie /usr/local2, then . . . → Read More: How to enable SNI of Apache at CentOS 5.5

DD-WRT, Headless BT

For TP-link 1043

Since the iphg is obselete, first of all, install the opkg first.

Installation of opkg

http://g300nh.blogspot.com/2010/06/software-installation-on-dd-wrt-part-1.html

http://g300nh.blogspot.com/2010/06/software-installation-on-dd-wrt-part-2.html

Then install and config . . . → Read More: DD-WRT, Headless BT