1/31/2010

some ways to recover loss packet

o. FEC (forward error correction)
o. Interleaving
o. Packet Repetition
o. Interpolation

1/28/2010

memset 問題

Function: void * memset ( void * ptr, int value, size_t num );

Today, when I use memset function to initialize a buffer to "0" , I found that the number of byte must to the actually byte of the buffer+1..

However, The third variable of memset is Number of bytes to be set to the value.

Still don't know the reason of this

1/17/2010

如何在codeblocks設定連結winsock library

exec codeblocks

Settings > Compiler and Debugger > Linker Settings > Add >

Go to CodeBlocks Folder (normally C:\Program Files\CodeBlocks)

then MingW then libs and find libws2_32.a and add it.

1/10/2010

what is analysis exactly?

Analysis is the process of breaking a complex topic or substance into smaller parts to gain a better understanding of it.
(from wikipedia)

1/08/2010

製作強制關機捷徑 on windows

1. 在桌面按右鍵->新增->捷徑
2. 在輸入項目的位置處 輸入 shutdown -s -t 50 -c "shutdown message"意思是系統會在50秒內強制關機
3. 按下一步完成
4. 點選剛剛新增好的捷徑測試

warning: 請先存檔尚未儲存的檔案

1/07/2010

very humorous R example code

fun <- function() {
ANSWER <- readline("Are you a satisfied R user? ")
if (substr(ANSWER, 1, 1) == "n")
cat("This is impossible. YOU LIED!\n")
else
cat("I knew it.\n")
}
fun()

1/06/2010

[LOOP] loop problem

問題:
mac address 衝突 產生 loop message - loop(1) xx.xx.xx.xx.xx.xx to ex1 from ex0. (active)

解決過程:
先看到錯誤訊息, 把訊息中ip mac 傳送的source and destination 畫出來.

發現從不同網卡傳送的封包具有相同的mac address. 結果發現ap 與我的電腦的mac address竟然一樣.

就發現當初在設定ap的時候有個功能是複製你的PC的mac address. 這個功能可能是為了方便填寫mac.

然後你自己要在修改mac address. 不知道為什麼ap 沒有自己預設的mac address而要自己設置.