標籤

C++ (12) Linux (6) MacOSX (4) Makefile (3) Matlab (3) Ubuntu (3) Android (2) C (1) Refactoring (1)

2012年1月24日 星期二

[Ubuntu] openoffice 選單無法顯示中文

原因是灌了Macbuntu後
"應用程式字型"被設為Lucida Grande了

解決辦法:
在桌面按下右鍵
選擇更改桌面背景
接著在上方的頁籤中選擇字型
把應用程式字型改成"文泉驛微米黑"
就OK囉~~

[Linux] rpm/yum/dpkg 指令集

[轉自] http://www.xspace.idv.tw/bo_blog/read.php?16


列出系統中已安裝的所有套件
dkpg -l
rpm -qa
yum list installed

查詢套件的狀況(已安裝)
dpkg -l [套件名稱]

移除套件dpkg -r [套件名稱] (刪除套件但不刪除設定檔)dpkg -P [套件名稱] (刪除套件也刪除設定檔)
rpm -e [套件名稱]
apt-get remove [套件名稱] (刪除套件但不刪除設定檔)apt-get remove --purge [套件名稱] (刪除套件也刪除設定檔)
yum remove [套件名稱]


列出套件所安裝的路徑
dpkg -L [套件名稱] (已經安裝的套件)dpkg -c [套件名稱].deb (未安裝的套件)
rpm -qpl [套件名稱].rpm (未安裝的套件)

查詢檔案是由哪一個套件的
dpkg -S 檔案完整路徑
rpm -qf 檔案完整路徑


查詢已安裝套件的詳細資訊
dpkg -s [套件名稱]
rpm -qi [套件名稱]


查詢套件檔的詳細資訊(還未安裝的套件檔)
dpkg -I [檔案名稱].deb
rpm -qpi [檔案名稱].rpm


安裝套件
dpkg -i [套件名稱].debrpm -ivh [套件名稱].rpm (全新安裝)
rpm -Uvh [套件名稱].rpm (升級)apt-get install [套件名稱]
yum install [套件名稱]


查詢可用的套件
apt-cache search [套件名稱]
yum search [套件名稱]


列出套件詳細的資訊與介紹
apt-cache show [套件名稱]
yum info (列出所有套件的資訊)yum info [套件名稱] (列出所指定的套件資訊)


顯示套件相依產等相關資訊
apt-cache showpkg [套件名稱]
apt-cache depends [套件名稱]


顯示套件反向相依性等相關資訊
apt-cache rdepends [套件名稱]
套件庫中有多少可以使用的套件apt-cache stats

更新套件庫
apt-get update
yum update


升級已經安裝的套件apt-get upgrade
apt-get dist-upfrade
yum upgrade ( yum 3.X 版 以上才支援)


清除已經下載的套件檔
apt-get clean (移除所有的套件暫存檔)apt-get autoclean (移除舊版的所有套件暫存檔)yum clean all (移除所有的套件暫存檔)

RPM 特殊參數使用--nodeps
一般用於相依性時無法移除或安裝套件時,但安裝的話建議不要使用

--force
同--replacepkgs,--replacefiles,--oldpackage一樣,當安裝的軟件版本已經安裝在系統上,
或者是系統 上現有的版本比要安裝的版本高,系統就會發出警告。這時,用戶如果堅持安裝的話,
可以用此參數


--allmatches 
刪除所指定套件名稱的所有版本,如果有多個版本存在的話,會出現
error: "xxx" specifies multip 錯碼訊息時使用

2012年1月14日 星期六

[MacOSX] readline lib -dynamic -dynamiclib

在macbook air上灌cgdb遇到的問題
因為cgdb需要gnu 的 readline lib
載了readline-6.2.tar.gz解完壓縮開始灌後
馬上遇到Error
i686-apple-darwin11-llvm-gcc-4.2: -compatibility_version only allowed with -dynamiclib

請到shlib下的Makefile
把-dynamic改成-dynamiclib
(應該只有一個)

然後重新make就搞定了
(如果先前失敗過要先make clean)

資料來源自:http://bhou.wordpress.com/2011/09/13/how-to-install-gnuplot-in-mac-os-x-lion/

2011年12月28日 星期三

[Android] Intent, result, callback

廢話就不多說了
直接提供網址:
http://www.kfsoft.info/article-43-11--%E8%99%95%E7%90%86Activity-Result.html

寫得滿好的
希望因為我多加了一個inlink
可以讓他的blog被更多人看到XDD

[Android] thread, join

join的解釋如下:

final voidjoin()
Blocks the current Thread (Thread.currentThread()) until the receiver finishes
its execution and dies.
final voidjoin(long millis, int nanos)
Blocks the current Thread (Thread.currentThread()) until the receiver finishes
its execution and dies or the specified timeout expires, whatever happens first.
final voidjoin(long millis)
Blocks the current Thread (Thread.currentThread()) until the receiver finishes
its execution and dies or the specified timeout expires, whatever happens first.
來源資料:http://developer.android.com/reference/java/lang/Thread.html