2010/09/27

UNIX Programming

9/28 Present at Alpha networks.

Reference Books:
Advanced Programming in the UNIX Environment 2nd.
(W. Richard Stevens & Stephen A. Rago)


2010/09/06

Linux Man-Pages Release - 3.26

Linux Man-Pages 3.26 release.


Download from git :

git clone git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git

Downliad tarball


Release Notes:
http://www.kernel.org/doc/man-pages/changelog.html#release_3.26

2010/08/22

Vim plugin - Doxygen

# 1. DoxygenToolkit.vim

let g:doxygenToolkit_authorName="your name"

Usages:

:Dox
:DoxAuthor
:DoxBlock
:DoxUndoc(DEBUG)
:DoxLic


# 2. Doxygen.vim
cd ~/.vim/after/syntax;
ln -s doxygen.vim c.vim;
ln -s doxygen.vim cpp.vim;
ln -s doxygen.vim java.vim;

2010/08/10

vimgrep


:vimgrep /pattern/[g][j] file1 file2 ... fileN

vimgrep is using to search pattern from following filelist.

vimgrep accept to ignore case,
If want to using this feature, put /\c in the pattern to ignore case.
ex:  vimgrep /pattern\c/ filename

or put /\C in the pattern to match it.
ex:  vimgrep /PaTtErn\c/ filename

Without flag 'j', vim jumps to the first match.
With flag 'j', vim only quickfix list is updated.

You can using :clist to list all match location.
and using :cc N to jump to the match.

:cn can jump to the next match location.
:cN can jump back prior match.


more usage, please using :help vimgrep

2010/07/19

vim 一次註解多行


使用VIM時, 註解多行的方式如下:

1. 進入 command mode ,
2. 按ctrl-V, 然後圈選要註解的區塊
3. 按 I 進入 Insert mode
4. 鍵入註解符號或要輸入的內容
5. 按 ESC 兩次, 就可以看到輸入的註解已經套用在所選擇的那幾行

note: 步驟三的 I 可以替換成 A, 這樣就會變成在行尾註解


在C/C++ 註解多行其實可以透過下面的方式簡單完成,
但 VIM 的多行註解則適用於各式語言喔!

#if 0

... 要註解的部份

#endif

vim 加密功能

Command Line 底下執行 VIM 時, 加上 -X 即可開啟檔案加密模式.

# vim -X [檔名]

這樣 vim 在開啟檔案時會要求使用者輸入密碼, 若原本沒有密碼, 則會要求建立密碼.

若密碼輸入錯誤, 同樣可以開啟檔案, 不過內容會呈現亂碼.

加密功能亦可以在編輯檔案時, 透過 :x 指令來加密.

不過要注意檔案在編輯時, vim 自動產生的 swap 檔案是沒有加密的,

因此在編輯檔案時可以考慮將 swap 功能關閉.

使用方法如下:

#vim -X 檔名 -n

或是檔案編輯中使用 :set noswf即可.

2010/03/29

Apple release Mac OS X 10.6.3 with QuickTime X, OpenGL improvements

昨天蘋果釋出 Mac OS 10.6.3 更新雪豹作業系統,

主要改進了QuickTime X 和 OpenGL-base應用程式定址相容性問題.

蘋果建議使用Snow Leopard 的使用者 update 到 10.6.3 版,

這次的更新共佔 437.2 MB的空間.

概略更新的項目如下:

  • Improves the reliability and compatibility of QuickTime X
  • Addresses compatibility issues with OpenGL-based applications
  • Addresses an issue that causes background message colors to display incorrectly in Mail
  • Resolves an issue that prevented files with the # or & characters in their names from opening in Rosetta applications
  • Resolves an issue that prevented files from copying to Windows file servers
  • Improves performance of Logic Pro 9 and Main Stage 2 when running in 64-bit mode
  • Improves sleep and wake reliability when using Bonjour wake on demand
  • Addresses a color issue in iMovie with HD content
  • Improves printing reliability
  • Resolves issues with recurring events in iCal when connected to an Exchange server
  • Improves the reliability of 3rd party USB input devices
  • Fix glowing, stuck, or dark pixels when viewing video from the iMac (Late 2009) built-in iSight camera

Reference : http://www.appleinsider.com/articles/10/03/29/apple_releases_mac_os_x_10_6_3_with_quicktime_x_opengl_improvements.html