2009年9月16日 星期三

Ubuntu更新到9.10

按下"ALT+F2",出現command box,然後輸入"update-manager -d"。
之後,update manager 就會出現9.10 upgrade,按下upgrade即開始更新。

launchpad

網址:
https://launchpad.net/
原本是讓使用者回報ubuntu的bug,及參加ubuntu相關的freeware project。
現在也可以把自己的project放在launchpad上,但前提是你的project是freeware。
如果要以非freeware放在launchpad上,則要收取每年每個project$250的費用。

git

git: 分散式的subversion

下載git:
windows version:
http://code.google.com/p/msysgit/downloads/list
linux version:
http://git-scm.com/download

安裝git:
在windows,首先需安裝Cygwin,再安裝git。

新增git repository:
首先在程式集點選Git Bash,假設以C:/GitStuff/當repository,先進入C:/GitStuff/,然後下指令git init。此時資料夾內會出現.git的隱藏資料夾。

新增檔案:
首先新增一個檔案,指令為:touch test.txt。先add 此檔案,指令為:git add test.txt。再commit上去,指令:git commit -m "Commit Test"。

看log檔案:
若要看所有的log,可下指令:git log -a。

2009年9月3日 星期四

取得目前的作業系統

使用System::OperatringSystem類別。
可參考(http://msdn.microsoft.com/zh-tw/library/system.operatingsystem.aspx)
例子如下:
System::OperatingSystem^ osver = System::Environment::OSVersion;

32bit OS(XP, Vista, 7):
osver->Platform == System::PlatformID::Win32NT
XP:
osver->Version->Major == 5 && osver->Version->Minor == 1 (Major = 5, Minor = 1)
Vista:
osver->Version->Major == 6 && osver->Version->Minor == 0 (Major = 6, Minor = 0)
7:
osver->Version->Major == 6 && osver->Version->Minor == 1 (Major = 6, Minor = 1)