http://www.javaworld.com.tw/jute/post/view?bid=6&id=212188&sty=3&age=0&tpg=1&ppg=1#212188
首先 web.xml里的配置为:
pcwiki 發表在 痞客邦 留言(0) 人氣(150)
http://jashliao.pixnet.net/blog/post/171596748
Android中抓取與使用Sessions
pcwiki 發表在 痞客邦 留言(0) 人氣(45)
http://fatkun.com/2011/05/mysql-alter-charset.html
修改数据库字符集:
ALTER DATABASE db_name DEFAULT CHARACTER SET character_name [COLLATE ...];
|
pcwiki 發表在 痞客邦 留言(0) 人氣(224)
readUTF() 是專門用來讀取用 writeUTF() 寫出的字串, 不能用來讀取一般的文字資料..
你可以考慮這麼做:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
final InputStreamReader reader = new InputStreamReader(
connection.openInputStream(),
"Big5");
try {
int i;
while ((i = reader.read()) != -1) {
char c = (char)i;
}
}
finally {
reader.close();
}
|
pcwiki 發表在 痞客邦 留言(0) 人氣(33)
http://lp43.blogspot.tw/2012/04/surfaceview-onsurfacedestroy.html
SurfaceView 的onSurfaceDestroy()的系統呼叫時機
一開始以為surfaceDestroy()這個SurfaceView.callback實作函式一定會在Activity onPause()呼叫後被執行,結果發現不然。
基本上SurfaceView的callback函式與Activity5大進程之間的運行過程為︰
onCreate()-->onStart()-->onResume()-->surfaceCreated()-->onPause()-->surfaceDestroy()-->onStop-->onDestroy()
如果不能掌握surfaceDestroy()被呼叫的時間點,
就很難確保下次該Activity有沒有重新執行surfaceCreate(),
這會造成程式執行上很重大的問題…
查了一下倒底surfaceDestroy()的呼叫時間點為何?
後來在Android Developer看到了一段話︰
The way SurfaceView works is that its Surface is created when the view
is attached to a window, and destroyed when it is detached. There is
no provision for you to do destroy it at other points, nor is that a
good idea because if the system ever needs to show that part of your
window you will end up with a big hole in the window (where the
SurfaceView exists, but without a Surface to display).
原來SurfaceView的運作時機是建構在Activity的View是否有"黏(attached)"到window上判定。
我們知道,
window是Android最底層的視窗管理元件(看一下我之前PO的這篇),
view是後來才黏上去的產物,
當系統判定當下的Activity的view"擺脫(detached)"了window後,
SurfaceView的surfaceDestroy()函式才會被呼叫。
想半天為什麼Intent另一個Activity出來時,
畫SurfaceView的這個Activity為什麼onPause()後沒有呼叫surfaceDestroy(),
原來是這個原因=.=||
pcwiki 發表在 痞客邦 留言(0) 人氣(44)
http://blog.roodo.com/brysonbo/archives/9559597.html
[程式] html button 製作回上一頁按鈕、超連結按鈕
利用javascript的幫助,我們可以用html的button來輕鬆製作出,
回上一頁的按鈕、超連結按鈕
主要的語法如下
回上一頁的按鈕
<input name="Submit" type="button" id="Submit" onClick="javascript:history.back(1)" value="回一上頁" />
超連結按鈕
<input type="button" value="首頁" onclick="self.location.href='main.html'"/>
以下我做了兩支html的網頁,作為範例...
pcwiki 發表在 痞客邦 留言(0) 人氣(7,734)
<a href="連結網址">說明文字</a> |
連結網址就像http://betray.idv.tw/這種的,而說明文字當然是讓人知道這連結是做連到什麼的。 |
<a href="http://www.pcnet.idv.tw/">PCNET</a> PCNET <a href="http://www.pcnet.idv.tw/images/pcnet.jpg">連到pcnet logo</a> 連到pcnet logo |
pcwiki 發表在 痞客邦 留言(0) 人氣(11)
http://jacobtsai.wordpress.com/2010/07/15/android-%E5%88%A4%E6%96%B7%E6%89%8B%E6%A9%9F%E6%98%AF%E5%90%A6%E9%80%A3%E4%B8%8A%E7%B6%B2%E8%B7%AF-connectivitymanager/
通常手機在開發網路的應用程式時, 常會定時的去取資料回來
但…倘若目前手機無法對外連線, 則這段動作就會造成手機效能無謂的耗損、與電力的浪費
所以在開發網路型的應用程式時, 首先要做的第一個功課, 便是 “判斷手機目前是否已連線"
pcwiki 發表在 痞客邦 留言(0) 人氣(24)

http://www.cnblogs.com/zjjne/p/3350382.html
Android 6种 常用对话框Dialog封装
pcwiki 發表在 痞客邦 留言(0) 人氣(124)
http://blog.csdn.net/andypan1314/article/details/6718298
Inflate()作用就是将xml定义的一个布局找出来,但仅仅是找出来而且隐藏的,没有找到的同时并显示功能。最近做的一个项目就是这一点让我迷茫了好几天。
android上还有一个与Inflate()类似功能的方法叫findViewById(),二者有时均可使用,但也有区别
pcwiki 發表在 痞客邦 留言(0) 人氣(125)