2012年2月15日星期三

Soluation: Wireshark cannot see traffic from a VirtualBox(Linux)

Step1 : Install Wireshark in VirtualBox OS (Linux).

Step2 : Excute command "sudo chmod u+s /usr/bin/dumpcap"

(refer:http://softsmith.blogspot.com/2008/10/non-root-wireshark.html)

Step3 : Change VirtualBox network Promiscuous mode to "Allow All".  Done!

2012年1月26日星期四

nds 陸行鳥與魔法繪本 當機

進入 冰與火 這個遊戲的單人模式

會黑屏..我試了6次-7次都這樣(而且還去格式化)

我的解決辦法(我試3次都可以解決)

先按閱讀故事 然後跳出 在選單人模式就OK

NoteBook 快捷鍵

藍芽: Fn + F3

2012年1月19日星期四

Generate random number in a loop and call srand one time when function be called

In stdlib.c, the random seed "holdrand= 1L".

If you don't change random seed,
random sequence will be same when you execute program.

To change seed can use srand().

In some situation, function will be called repeatedly.
You want to call srand() just one time, how to do??

There is a soluation.
Because the first rand() value will be 1804289383.

We can design the code:
=======================================
int GetRandomNum() {

    int tempnum = rand();
    if ( 1804289383 == tempnum ) {
        srand( time(NULL) );
    }

    for ( int i = 0 ; i < ( maxnum - minnum ) ; i++ ) {
        outValue = minnum + tempnum%( maxnum - minnum + 1 );

        if ( outValue != xx ) {
            return outValue;
        }
        tempnum = rand();
    }

}
=======================================

It will guarantee "srand()" will be executed once.
Have fun!!

2011年12月13日星期二

Install Pagavcs and Pagavcs-bigmem

WARNING!!!!!

There is a bug that right-click menu does not display when using new version pagavcs (1.4.56).

The solution is under below, install old version Pagavcs and Pagavcs-bigmem.

==========================================
1. Download Pagavcs 1.4.41 and Pagavcs-bigmem 1.0.0.

2. Do not add software path: deb http://pagavcs.googlecode.com/svn/repo karmic main, nor you will install new version Pagavcs automatically.

3. Install Pagavcs first, then Pagavcs-bigmem.

4. If there is no affect, log out then log in, and type $nautilus -q.

5. Have fun!

P.S. pagavcs-bigmem is used to fix that svn's total file size is too big. For example, up to 2GB.

2011年10月31日星期一

Outlook 保留信件

想要保留信件在網路上,需要以下設定。
1.工具->帳戶設定->選擇你的帳戶->變更
2.其他設定->進階->"在伺服器上保留一份郵件複本"打勾

SVN tag

1.在checkout的資料夾右鍵選擇branch/tag.

2.填入tag位址

P.S. 要注意checkout是哪層資料夾,是否包含子目錄。
message填與上一版本間有修改的所有revision敘述。
(可判斷每個revision是否要填入)