2011年12月23日

C Language - FILE

#include
FILE *fopen(const char *文件陀螺, 表示打开方式的字符串);

表示打开方式的字符串有几个需要注意一下:

"w"与"w+" :
这两个方式打开文件时,蕤文件不存在会创建文件,
"w"只能写文件,"w+"能够读写文件.

"r"与"r+"
若文件不存在,则打开失败(不会创建新文件)
"r"只能读文件,"r+"能够读写文件.


"w+"与"r+"都能读写文件,它们的区别是,"w+"在文件不存在时会创建文件,而"r+"在文件不存在时,不会创建文件.
――――― 分隔线 ―――――

fseek()
移动读和写文件时的文件指向位置,注意:第一个位置号是0而不是1

2011年12月2日

WDS - Bridge and Repeater

WDS的目的是延伸無線網路,它有分bridge和repeater二種,首需要二台相同品牌,相同機種的AP(建議)
brideg是指LAN1-->AP1-->Wireless-->AP2-->LAN2,AP1與AP2分別接到區域網路(有線)中,AP1/AP2中間是用無線接起來的,此時無線網路只有AP1到AP2中,其他NB不能利用無線連線
repeater是指LAN-->AP1-->Wireless-->AP2-->Wireless,AP1/路AP2利用無線連起來外,AP1/AP2也提供無線網給NB用,只是在AP2提供的無線網路速度會減半

2011年4月11日

SVN

Changelog Between Two Tags in Subversion
#svn log -v -r42:79 file:///dev/svn/trunk


Merge branch test
#svn merge --dry-run -r OLD_REV:NEW_REV {branch path}
Merge branch
#svn merge -r OLD_REV:NEW_REV {branch path}
#svn commit -m "LOG"

Ref:http://svnbook.red-bean.com/en/1.1/ch04s04.html


new revision: 888
old revision: 777
#svn merge -r 888:777
==> rollback from 888 revision to 777 revision
Ref: http://stwei.blogspot.com/2010/06/howto-svn-rollback.html

2011年2月14日

Makefile

$?: 代表已被更新的 dependencies 的值。也就是 dependencies 中,比 targets 還新的值。
$@: 代表 targets 的值。
$<: 代表第一個 dependencies 的值。
$*: 代表 targets 所指定的檔案,但不包含副檔名。


* make -k: 會讓make在遇到錯誤的時候仍然運行,而不會停在第一個問題
* make -n: 只印出將會進行的工作,而不會真的去執行
* make -f makefile_name: 告訴make需要用那個makefile檔案。當你的make檔不是叫makefile的時候,需要自行透過-f加上你檔案名字,make才找的到你的makefile



Ref:
http://tetralet.luna.com.tw/index.php?op=ViewArticle&articleId=185&blogId=1
http://kevincrazy.pixnet.net/blog/post/29780477
http://hsian-studio.blogspot.com/2008/09/makefile_08.html