5 月
04
2012
0

string compare strcmp implementation

bool mystrcmp(const char *a, const char *b) {
    while (*a == *b) {
        if (*a++ == '\0') return true;
        b++;
    }

    return *a == *b;
}
Written by in: Uncategorized |
1 月
02
2012
0

LZW compression & decompression pseudocode

期末考記錄用
參考自此但我覺得需要修改

LZW compression

string = NULL;
while character = next input character{
    if string+character is in table {
        string = string + character
    } else {
        output code of string
        add string+character to table
        string = character
    }
}

LZW decompression

while code = next input code {
    if code is new code {
        string = translated code
        output string
        // string(0) is the first character of string
        add prevString+string(0) to table
    } else {
        add to table for known code sequence
        string = translated code
        output string
    }
    prevString = string
}
3 月
08
2010
7

日月潭纜車

纜車遊客中心湖畔寬景,點圖放大

今天花了250搭乘日月潭纜車~

心得是很不值得…光是來回等排隊就近兩小時,實際上坐纜車的時間不過10分鐘= =

隨便用手機拍了一些照片,白平衡索性就直接放棄XD當作Fu好了

(more…)

Written by in: Uncategorized | 標籤: ,

Powered by WordPress | Theme: Aeros 2.0 by TheBuckmaker.com