MS PowerPoint 2007 加入頁碼與自訂頁碼編號

在 Microsoft PowerPoint 2007 中,

可以加入頁碼, 方便與會人員在發問時,

明確告知哪一頁的投影片,

設定步驟, 如下 :

1) 選擇 "插入" 頁籤, 按一下 "投影片編號" :




2) 在設定作業中, 勾選 "投影片編號", 若不要標題顯示頁碼, 則也勾選 "標題投影片中不顯示" :


3) 若要設定 "頁碼的起始號碼", 則選擇 "設定" 頁籤, 按一下 "版面設定" :


4) 在設定作業中, 設定 "投影片編號起始值" 即可 :


Ubuntu Linux 安裝 font 字型

在 Ubuntu Linux 中, 安裝字型超簡單,

如下步驟 :

1) 先將字型複製到 "/usr/share/fonts/truetype" 目錄中 :


2) 執行 "sudo fc-cache -f -v", 重新刷新系統字型的 cache :


這樣, 以 OpenOffice 為例, 看得到標楷體了 :


更多資訊, 可以參考以下文章 :

. 字型的安裝 : http://blog.toomore.net/2008/11/ubuntu.html

. 免費字型的下載 (文泉驛字型) : http://wenq.org/index.cgi

. 免費字型的下載 (王漢宗自由字型) : http://cle.linux.org.tw/fonts/wangfonts/

. 免費字型的下載 (行政院主計處全字庫) : http://www.cns11643.gov.tw/web/download.jsp

Oracle DB 中, 建立 Temporary Table

在 Oracle Database 中,

可以建立暫存, 臨時性, 且快速存取的 Table : Temporary Table.

 語法
Create Global Temporary Table <Table_Name> (
<Col_Name1> <Data_Type1>
, <Col_Name2> <Data_Type2>
, ...
) on Commit [Delete / Preserve] Rows;

-- 其中,預設值為 on Commit Delete Rows.

 比較 on Commit Delete Rows 與 on Commit Preserver Rows
Delete :
1) Commit 後, 資料被刪除.
2) 不管有無 Commit, 都可以直接 Drop Table.

Preserve :
1) Commit 後, 資料仍保留著.
2) 不管有無 Commit, 若要 Drop Table 前, 一定要先 Truncate Table 才可以.

 檢查有哪些 Temp Table
select table_name
from all_tables
where temporary = 'Y';

 Temporary Table 優缺點
優點 : 
1) 存放在記憶體中, 而非 Data File, 所以 "存取較快".
2) SESSION 獨立, 也就是 "不同的 DB Session, 看不到另一個 DB Session 的資料".
3) Commit 後, 可以決定資料是否保留.

缺點 :
1) 不能使用 "%type", "%rowtype".
2) 在程式開發階段, 不易查找 Temporary Table 資料.

Android Touch 簡易觸控

在 Android 中可以藉由 onTouchEvent 事件,

來實現 Touch 觸控功能,

程式範例如下 :
 程式碼
public class helloWorld extends Activity {

private float touchX;
private float touchY;
private int tvWidth = LayoutParams.WRAP_CONTENT;
private int tvHeight = LayoutParams.WRAP_CONTENT;
private TextView tv = null;

/** Called when the activity is first created. */
@Override

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

// 取得 TextView 物件
tv = (TextView)findViewById(R.id.textWidget);
tv.setTextColor(0xffffff00);
}

@Override
// 利用 MotionEvent 處理觸控程序

public boolean onTouchEvent(MotionEvent event) {

touchX = event.getX(); // 觸控的 X 軸位置
touchY = event.getY() - 50; // 觸控的 Y 軸位置

// 判斷觸控動作
switch( event.getAction() ) {

case MotionEvent.ACTION_DOWN: // 按下

// 設定 TextView 內容, 大小, 位置
tv.setText("X: " + touchX + ", Y: " + touchY + ", 按下");
tv.setLayoutParams( new AbsoluteLayout.LayoutParams( tvWidth
, tvHeight
, (int)touchX
, (int)touchY
));
break;

case MotionEvent.ACTION_MOVE: // 拖曳移動

// 設定 TextView 內容, 大小, 位置
tv.setText("X: " + touchX + ", Y: " + touchY + ", 拖曳移動");
tv.setLayoutParams( new AbsoluteLayout.LayoutParams( tvWidth
, tvHeight
, (int)touchX
, (int)touchY
));
break;

case MotionEvent.ACTION_UP: // 放開

// 設定 TextView 內容
tv.setText("X: " + touchX + ", Y: " + touchY + ", 放開");
break;
}

// TODO Auto-generated method stub
return super.onTouchEvent(event);
}
}

範例結果 :




Eclipse 自動產生 Java 物件或其父物件提供的 Method 方法

在 Eclipse 中, 可以很快速地建構某物件可用的 Method 方法, 如下 :

1) 在 Java Class 程式碼裡面, 按右鍵 :


2) 選擇 "Source --> Override/Implement Methods" :


3) 在 Method 選擇對話框中, 勾選你所需要的 Method 方法 :


4) Eclipse 根據你選擇的, 自動產生 Method 方法 :


不錯吧, 省卻了背記 Method 方法名稱與其參數, 且又快速建構.

MS Windows 的 Firefox 中, 執行 Oracle ERP

若在 Firefox 開啟 Oracle ERP 網址, 出現以下畫面之後, 就沒有任何反應 :


請按照以下步驟, 進行處理 :

1) 點選 "click here" 下載 oajinit.exe 檔案.

2) 執行 oajinit.exe 來安裝 Oracle JInitiator.

3) 到 "C:\Program Files\Oracle\JInitiator 版本\bin" 目錄中, Copy "NPJinit-版本.dll" 到 "<Firefox_Home> / plugins" 目錄中 :



4) 重新開啟 Firefox, 查看附加元件有沒有 Oracle JInitiator 元件 :


5) 重新執行 Oracle ERP 網頁, 就可以正常開啟了.

Oracle ERP 的 Periodic Alert 為何一直無法觸發

在 Oracle ERP 中,

若 Periodic Alert 一直沒有觸發或收不到 Mail,

可以按照下面步驟檢查 :

1) Alert 中的 Application 欄位資料, 需有設定在 Alert Manager / System / Installations 中.

其實, Alert 的 Application LOV 就是抓取 Installations 中的資料.


2) 檢查右下角 Action SetsMembers Page 中, 是否有指定 Action; 若無, 請設定之.


3) 若 Alert Manager / History 中查看有 Alert 執行的紀錄, 但卻沒有 Exception 筆數, 則表示 Select 沒有資料.




4) 若 Alert Manager / History 中查看無 Alert 執行的紀錄, 則看 Alert Manager / Request / SchedulePeriodic Alert Scheduler 是否有啟動; 若無, 則 Activate.


5) 若上述已有啟動, 則看 System Admin / Concurrent / Manager / AdministerAlert Periodic Manager 是否有啟動; 若無, 則 Activate.


6) 若上述檢查都 OK, 也確定有 Alert 有觸發執行, 卻收不到 Mail, 則看 Alert Manager / System / Options 是否有設定 Mail 程式; 若無, 則設定之 (以 Unix 為例).


取得某段時間執行的 Oracle ERP Alert 有哪些

在 Oracle ERP Alert 中,

若想要知道在某段時間內, 有哪些 Alert 會執行,

可以參考下面的語法 :
 語法
-- 如 AM 6:00 ~ AM 8:00 執行的 Alert
select ALERT_NAME
, ALERT_CONDITION_TYPE "TYPE"
, round( CHECK_START_TIME / 3600, 2 ) "START_TIME (H)"
, round( SECONDS_BETWEEN_CHECKS / 60, 2 ) "BETWEEN (M)"
, round( CHECK_END_TIME / 3600, 2 ) "END_TIME (H)"
from ALR_ALERTS
where ENABLED_FLAG = 'Y'
and (CHECK_START_TIME / 3600) >= 6
and (CHECK_START_TIME / 3600) <= 8
;

Apache Tomcat 的記憶體配置 (效能調整)

Tomcat Server 預設可使用的記憶體為 128M,

若有大量網頁需求時, 會因記憶體太少, 而導致 Tomcat 當掉無法運作,

所以, 若要應付大量網頁的需求,

可自行編輯 <Tomcat_Home> / bin / catalina.bat 檔案,

增加下面這一行 (以 Windows 平台為例) :
 程式碼
SET JAVA_OPTS=-Xms512m -Xmx1024m

另外提供, 網路上的一些參考 :

網址 1 : http://blog.udn.com/LupinBlog/1987728.

網址 2:http://svjr.blogspot.com/2006/12/tomcat.html.

網址 3:http://big5.ce.cn/gate/big5/blog.ce.cn/html/25/106825-19997.html.

網址 4:http://www.oreilly.com.tw/column_editor.php?id=e137.

網址 5:http://tomcat.apache.org/tomcat-5.5-doc/printer/windows-service-howto.html.

Ubuntu IBus 加入 boshiamy 嘸蝦米輸入法

在 Ubuntu Linux 中, 安裝嘸蝦米到 IBus 中, 可以參考以下步驟 :

1) 透過 Google 搜尋, 來找到 "嘸蝦米字碼檔 boshiamy.txt", "嘸蝦米符號檔 boshiamy.png" :


2) 輸入 "ibus-table-createdb -s boshiamy.txt -n boshiamy.db" 將 "嘸蝦米字碼檔 boshiamy.txt" 轉換成 "IBus 可辨識的 db 檔" :


3) 將 "IBus 可辨識的 db 檔" 與 "嘸蝦米符號檔 boshiamy.png" 複製到 IBus 目錄中, 如下指令 :


4) 重新啟動 IBus 輸入引擎 :


5) 在 IBus 設定中, 可在 "漢語" 選項中, 找到 "嘸蝦米" 輸入法 :


6) 測試一下嘸蝦米輸入法 :

Windows XP 仿 Windows 7

對於 Widnows XP 的使用者,

看到 Windows Seven (Win 7) 雖然很想要其外觀,

但又礙於可能有軟體相容性的問題,

或金錢上的考量,

而沒有購買的行動,

沒關係, 有一套免費的模擬軟體 "Seven Transformation Pack" 可以幫我們完成.

其中, ViGlance 模擬 Windows 7 的任務列, 如下圖 (圖來源於 www.lee-soft.com 網) :


其中, ViStart 模擬 Windows 7 的開始功能表, 如下圖 (圖來源於 www.lee-soft.com 網) :


Seven Transformation Pack 網址 : http://www.lee-soft.com/.

Seven Transformation Pack 下載網址 : http://www.softroof.com/7tp/.

若不想整套的 Seven Transformation Pack, 只要 ViGlance, 下載網址 : http://www.lee-soft.com/viglance/.

若不想整套的 Seven Transformation Pack, 只要 ViStart, 下載網址 : http://www.lee-soft.com/vistart/.

Java 如何正確地取得中文字的長度與擷取字元

在 Java 中遇到中文字,

若用 length() 取資料長度, 中文字會當作 1 碼,

而用 substring 擷取子字串, 中文字也會當作 1 碼,

要如何正確取得中文字的長度與擷取子字串,

參考以下範例 :
 程式碼
public class aaa
{
public static void main( String args[] )
{
String vData = "歡迎光臨, Hello World"; // 資料
byte[] vResult = new byte[100];
int getSubstringLen = 8; // 擷取長度

// 長度
System.out.println( "length : " + vData.length() );
System.out.println( "Actual length : " + vData.getBytes().length );

// 擷取前幾碼
System.out.println( "前 " + getSubstringLen + " 碼 : "
+ vData.substring( 0, getSubstringLen )
);

System.arraycopy( vData.getBytes(), 0, vResult, 0, getSubstringLen );
System.out.println( "Actual 前 " + getSubstringLen + " 碼 : "
+ new String(vResult)
);
}
}

//執行結果
length : 17
Actual length : 21
前 8 碼 : 歡迎光臨, He
Actual 前 8 碼 : 歡迎光臨

直接在 Windows 中安裝 Ubuntu Linux

前陣子幫同事安裝 Ubuntu Linux 時,

因為他沒有事先切割一個磁區做為 Ubuntu Linux 安裝用的,

所以, 想說在 Ubuntu 安裝過程中, 看看有無從現有磁區中切割,

結果, 在設定好 "語系" / "鍵盤",

到了切割磁區時, 覺得怕怕不妥, 而中斷結束 Linux 安裝,

沒想到, 重新啟動後, Windows 已無法開機了, 不會吧,

還好, 最後有救回來,

而在 Google 搜尋之中, 得知 "在 Windows 中就可直接安裝 Ubuntu Linux",

參考網址 : http://yblog.org/archive/index.php/install_ubuntu_linux_in_windows_with_wubi.

Ubuntu Linux 的 IBus, 加入其他內定但無預設的輸入法

Ubuntu 9.04 之前, 輸入法引擎是採用 SCIM,

但在 Ubuntu 9.10, 輸入法引擎卻改用 IBus,

以下介紹如何增加其他內定, 但 Ubuntu 沒有預設的輸入法.

1) Ubuntu Linux 的輸入法管理, 可以透過 IBus 設定作業 :


2) 在設定作業中, 選擇下拉式選單, 選擇要的語系, 就會有該語系相關的輸入法 :


3) 選好要的輸入法, 然後按 "加入" 鈕即可 :

Ubuntu Linux 中文化介面

安裝完 Ubuntu Linux 之後, 預設介面為英文,

可以根據以下步驟, 更改為中文介面 :

1) 點選 "System / Administration / Language Support" 作業 :


2) 點選 "Update" 鈕 :


3) 下載相關套件中 :


4) 點選 "Install" 鈕進行套件安裝 :


5) 安裝完畢後, 重新開機, 就會看到中文介面的 Ubuntu Linux 了.

Ubuntu Linux 軟體套件的安裝與移除

對於 Ubuntu 軟體套件,

以下分 "安裝" / "移除" 兩個部分說明 :


軟體的安裝

1) 到 "Ubuntu 軟體中心" 中, 搜尋 "想要安裝軟體的相關字", 如 wine, 然後選擇軟體, 按一下右邊的箭頭, 準備進行安裝 :


2) 按一下 "安裝", 即可進行軟體安裝 :



軟體的移除

1) 到 "Ubuntu 軟體中心" 中, 切換到 "已安裝軟體", 選擇要移除的軟體, 按一下右邊的箭頭, 準備進行移除 :


2) 按一下 "移除", 即可進行軟體移除 :

台南赤崁樓黃昏一遊 (2009.12.12)

2009.12.12 這一天,

陪伴老婆大人到台南找她妹妹,

到了快黃昏, 臨時決定到赤崁樓走走吃小吃,

也讓我第一次看到赤崁樓的夜景,

以下, 是我這次到台南赤嵌樓遊玩的圖片 :
台南赤崁樓

Ubuntu Linux 安裝 Mozilla ThunderBird

在 Ubuntu Linux 中, 安裝 Thunderbird 有以下兩種方式 :

第一種) 透過 "Ubuntu 軟體中心".

第二種) 透過 "下載 Thunderbird 檔案".

以下分別說明這兩種方式 :


透過 Ubuntu 軟體中心 安裝

步驟如下 :

1) 到 Ubuntu 軟體中心, 搜尋 "Thunderbird", 選擇 "Mozilla Thunderbird Mail/News" 進行安裝 :


2) 執行路徑, 在 "應用程式 / 網際網路 / Mozilla Thunderbird Mail/News" :


3) 此時, 是英文介面 :


4) 到 "系統 / 管理 / 語言支援" 作業中, 再一次安裝中文套件 (系統會自動判斷, 只安裝尚未中文化的) :


5) 此時, 就會是中文介面 :



透過 下載 Thunderbird 檔案 安裝

步驟如下 :

1) 到 Google 搜尋下面的關鍵字, 然後鏈結到 "Mozilla Thunderbird Early Release" 網頁 :


2) 點選 Chinese (Trasitional) 正體中文 for Linux, 下載 Thunderbird 檔案 :


3) 雙擊 thunderbird.bz2 檔案, 進行解壓縮之後, 即可執行 thunderbird 目錄中的 ./thunderbird 檔案 :




4) 為了方便開啟 Thunderbird, 在 "系統 / 偏好設定 / 主選單" 作業中, 將 Thunderbird 應用程式加入到網際網路 Menu 中 :


若 Icon 圖示不是 Thunderbird, 則可以按一下 Icon 進行選擇 :


5) 點選 Thunderbird, 就可以執行了 :


Thunderbird 最新版 :
Related Posts Plugin for WordPress, Blogger...