ProfilLlogFotosBlogListen Extras Hilfe

Blog


    20 April

    excel tips

    reference all row:

    EX: COUNTA(hits!12:12)
    參照hits sheet 的第12列, COUNTA記算非空白的儲存格數
     
    reference multi sheets:
    COUNTA('[abc.xls]hit1:hit3'!2:2)
    參照到abc.xls檔中的hit1到hit3 sheets的第二列的資料
     
    萬用字元
    ? (問號) 任何單一字元
    例如,sm?th 找到 "smith" 和 "smyth"
    * (星號) 任何數量的字元
    例如,*east 找到 "Northeast" 和 "Southeast"
    ~ (波狀浮號) 後面跟著 ?、* 或 ~ 問號、星號或波狀浮號
    例如 fy91~? 會尋找 fy91?
     
    16 September

    [轉載]我的老notebook利用計劃

    過年前從台南老家帶回一台多年的的老舊notebook
    PIII 300MHz的就機型, 128MB的RAM
    看起來似乎已經可以拆開來當作廢鐵出售
    不......我決定廢物利用

    首先, 這台notebook受到我老妹的可樂攻擊(整罐直接從keyboard灌頂)
    再加上被我老家的臭貓咪把鍵盤每一個鍵都抓濫了
    因此原本的keyboard已經算是毀了
    還好這台舊notebook還有一個PS/2 port讓我接上一個老舊的keyboard
    (還有PS/2的keyboard....神奇吧)
    但是其實重點是因為它遭受這些寧虐
    他的ethernet chip似乎瘋了......mac address永遠是00:00:00:00:00:00
    所以當我把gentoo linux在他上面安裝完成後
    每次都要用ifconfig給他mac address很令人困擾
    還好看到macchanger這個project
    在gentoo的網路設定裏面可以利用它指定MAC address
    因此就不用每次手動改了(感謝Open Source)

    這個系統有何用處呢?
    我有一堆的CD, 每次要找一首歌都很麻煩
    因此我習慣將他轉成電腦檔案
    但是當這些mp3越來越多後
    我自己的notebook硬碟空間就有點吃緊
    而且......還是很難找歌

    因此我將這台老notebook變成一台music server
    我使用mt-daapd這個很棒的project
    把它變成一個local iTune server
    因為這台舊notebook我設定是用dhcp取得ip位置
    這構成一個問題.......我不希望要上傳歌曲時候還要去那邊login
    (IP雖然大多時候router都給一樣, 但是不保證....ㄏㄏ)
    因此我在他上面裝了avahi daemon
    這樣我可以透過zeroconf這個協定知道music server的位置
    (應該說他有提供的服務)
    因此我在avahi上面啟動了2個service: ssh與daap
    (因為mt-daapd本身就有實做zeroconf的部份, 但是啟動時可以利用"-m"的參數停止)

    這樣一來, 我的舊notebook就變成我們家一台music server啦
    windows平台只要有安裝iTune軟體就可以直接播放它的音樂
    linux當然也可以啦, 我使用TunesBrowser來播放
    一台老舊的notebook就此找到他的新生命
    Open Source真是太屌啦 sam
    http://samlinux.blogspot.com/feeds/posts/default/113966730903258010
    11 September

    mpalyer ubuntu7.04 字幕亂碼

    mplayer裝好後手動改一下這兩個檔案的內容,會讓你使用的更順利
    .mplayer/config
    # Write your default config options here!
    font=/usr/share/fonts/truetype/arphic/uming.ttf
    sub-fuzziness=1
    subcp=utf8 (or cp950.....)
    unicode=yes
    subfont-autoscale=2
    subfont-text-scale=3
    vo=xv

    http://www.ubuntu.org.tw/modules/newbb/viewtopic.php?post_id=9028#forumpost9028
    10 September

    [轉載]Google手機 未演先轟動

    美國搜尋網站龍頭Google計劃以Linux開發Google手機、並交由台灣宏達電代工;宏達電執行長周永明日前面對媒體詢問時,刻意避而不答,並低調以對,但外界傳聞上市時間是今年年底或明年春天,引發各界注目。

    手機零組件業者透露,Google手機傳出採用高通3G晶片組,也可能為台積電帶來增加投片的利益。但手機零組件業者認為,用Linux開發手機頗具難度,以往iPhone也是傳了兩、三年才成真,GPhone估計至少要到明年中以後才可能上市。

    宏達電是全球運用微軟Windows Mobile作業系統開發產品、產量最大的製造商,微軟去年賣出1,200萬套Windows Mobile產品,其中超過800萬支具有手機功能。微軟移動通訊事業部資深副總裁克努克(Pieter Knook)日前也承認由宏達電生產的比率確實很高。

    目前智慧型手機作業系統可分為Symbian、微軟和Linux三大陣營。諾基亞、索尼愛立信均以Symbian為主;微軟陣營最大製造商是宏達電,惠普、Palm品牌也支持微軟系統;Linux受到摩托羅拉青睞後產量也大幅提升,三星、LG也加入Linux陣營。

     source:http://tw.news.yahoo.com/article/url/d/a/070910/2/k94k.html
    15 Mai

    use tr (translate or delete characters)

    tr   "\n" "," < stopword_nb.txt  | tr -d "\r" > nb
    translate or delete characters
    http://www.issociate.de/board/post/235976/sed_and_newline_(x0a).html
    In Unix, how can I replace a single string in a large number of files?  http://kb.iu.edu/data/afrk.html
    09 April

    global search and replace in vi

    http://kb.iu.edu/data/acoj.html
    http://kb.iu.edu/data/acux.html
    http://kb.iu.edu/data/afrk.html
    Invoke vi's edit mode by pressing the Esc key, then a colon ( : ), and enter:
    1,$s/oldstring/newstring/g

    This will change oldstring into newstring wherever it occurs throughout the entire text. The 1 (the number one) in the above command means "start the search on the first line". The $ means "end the search on the last line". The g at the end executes the change globally on each line. If you omit the g , the search will stop after finding the first occurrence of oldstring.
    http://www.issociate.de/board/post/235976/sed_and_newline_(x0a).html
    11 November

    MPlayer-1.0rc1

    before ./configure --with-codecsdir="dir"  --enable-gui

    i need install the gtk-devel xorg-devel package for compile
    and download the codecs extract to the codecsdir

    21 Mai

    chmod tips

    #ls -R | grep "./" | awk -F: '{print $1}'
    will list all "directories" (only directory, no files)

    #chmod 755 `ls -R | grep "./" | awk -F: '{print $1}'`
    will chmod 755 to all the sub directories

    17 Mai

    ptt instruction

    SHIFT
    Q:開啟文章價格列表模式
    A:搜尋價格高於多少的文章
    S:進入文摘模式
    F:轉寄信件
    G:m的文章
    Z:搜尋推文數高於多少的文章
    X:push

    CTRL
    Q:query
    W:我在哪
    O:公開招標



    【 基本命令 】
       (p/↑)/(n/↓) 上移/下移一篇文章         (數字鍵) 跳到指定號碼的文章
    (P/PgUp)(N/PgDn) 下移/下移一頁       (Home)/(End/$) 跳到首篇/末篇文章
             (r)(→) 閱讀此篇文章            (=[]<>-+S) 主題式閱讀
        (^P)/(y)/(X) 發表/回覆/推薦文章       (F/U)/(x) 轉寄至信箱/轉錄至其它看板

    【 進階命令 】
      (/)(?)/(a)/(Z) 搜尋 關鍵字/作者/推文數   (^H)/(!) 只列主要標題/不列關鍵字
         (G)/(A)/(S) 搜尋 保留標記/稿酬/標題   (^Q)/(w) 作者資料/丟作者水球
       (z)/(TAB)/(b) 閱讀精華區/文摘/進板畫面  (Q)/(^W) 查詢價格或匿名/我在哪裡
        (^O)/(X)/(f) 競標/下標/參與賭盤    (^V)/(V)/(R) 活動連署/投票/投票結果
             (d)/(E) 刪文/重編文章                  (I) 查詢看板設定(隱藏,推文,..)

    【 板主命令 】
               (M/o) 舉行投票/編輯投票名單   (m/c/g/^Z) 保留/選錄精華/文摘/置底
                 (D) 刪除一段範圍的文章             (Y) 取消推薦文章
           (T/B) 重編文章標題/重編看板標題   (t/^D) 標記文章/砍除標記的文章
             (O)/(i) 發表注意事項/文章類別  (W)/(K)/(v) 編進板畫面/水桶/可見名單
                (^G) 舉辦賭盤/停止下注/開獎         (H) 切換看板隱藏
             (I) 看板設定(隱藏,推文,轉錄記錄)
    13 Mai

    batch convert bmp to png

    #!/bin/bash


    i=`ls | grep bmp | awk -F\. '{print $1}'`

    for var in $i
    do
    convert $var.bmp $var.png
    done

    24 April

    限制user使用su指令

    /etc/pam.d/su:
    auth required /lib/security/pam_wheel.so group=xxx

    /etc/group:
    xxx:x:999:user1, user2....

    只有加入xxx群組的user才可以su
    17 April

    vim help

    http://vimdoc.sourceforge.net/htmldoc/help.html

    ex:
    set the vim color

    /etc/vim/vimrc or /usr/share/vim/vimrc

    if &term =~ "xterm"
            if has("terminfo")
                    set t_Co=8
                    set t_Sf=<ESC>[3%p1%dm
                    set t_Sb=<ESC>[4%p1%dm
            else
                    set t_Co=8
                    set t_Sf=<ESC>[3%dm
                    set t_Sb=<ESC>[4%dm
            endif
    endif

    <ESC> = Ctrl+v, ESC(real escape)

    13 April

    FC5 vlc error

    error message: snd_pcm_format_linear(slv->format) control center -> sound -> hardware set OSS
    04 April

    SCIM輸入法安裝(kubuntu)

    http://wiki.ubuntu.org.tw/index.php/UbuntuL10n

    the crash of firefox when scim installed

    dirty soluation:
    #sudo edit /etc/gtk-2.0/gtk.immodules
    mark the two line of scim


    14 März

    build pcmanx-pure-gtk2-0.3.3 in FC3 [FAILED]

    必要套件: gtk2 >= 2.4.0
    gtk2-2.4.14-3.fc3
    gtk2-engines-2.2.0-6
    pygtk2-libglade-2.4.1-fc3.1
    gtk2-2.4.14-4.fc3.3
    pygtk2-2.4.1-fc3.1
    gtk2-devel-2.4.14-4.fc3.3

    [root@finleyhost pcmanx-pure-gtk2-0.3.3]#./configure


    在make時出現了這樣的錯誤訊息

    .............
    from ../src/core/termview.h:33,
    from view/telnetview.h:26,
    from view/telnetview.cpp:32:
    /usr/include/libintl.h:40: error: expected unqualified-id before "const"
    /usr/include/libintl.h:40: error: expected `)' before "const"
    /usr/include/libintl.h:40: error: expected init-declarator before "const"
    /usr/include/libintl.h:40: error: expected `,' or `;' before "const"
    /usr/include/libintl.h:44: error: expected unqualified-id before "const"
    /usr/include/libintl.h:44: error: expected `)' before "const"
    /usr/include/libintl.h:44: error: expected init-declarator before "const"
    /usr/include/libintl.h:44: error: expected `,' or `;' before "const"
    /usr/include/libintl.h:51: error: expected unqualified-id before "const"
    /usr/include/libintl.h:51: error: expected `)' before "const"
    /usr/include/libintl.h:51: error: expected init-declarator before "const"
    /usr/include/libintl.h:51: error: expected `,' or `;' before "const"
    /usr/include/libintl.h:81: error: expected unqualified-id before "const"
    /usr/include/libintl.h:81: error: expected `)' before "const"
    /usr/include/libintl.h:81: error: expected init-declarator before "const"
    /usr/include/libintl.h:81: error: expected `,' or `;' before "const"
    /usr/include/libintl.h:85: error: expected unqualified-id before "const"
    /usr/include/libintl.h:85: error: expected `)' before "const"
    /usr/include/libintl.h:85: error: expected init-declarator before "const"
    /usr/include/libintl.h:85: error: expected `,' or `;' before "const"
    make[3]: *** [telnetview.o] Error 1
    make[3]: Leaving directory `/root/download/Programs/pcmanx-pure-gtk2-0.3.3/src'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/root/download/Programs/pcmanx-pure-gtk2-0.3.3/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/root/download/Programs/pcmanx-pure-gtk2-0.3.3'
    make: *** [all] Error 2
    [root@finleyhost pcmanx-pure-gtk2-0.3.3]#

    根據錯誤訊息找到這篇說明
    http://www.jeffhung.net/blog/articles/jeffhung/257/
    如他所言是#define 的問題 而將某個function替換成奇怪的字串
    在 /usr/include/libintl.h :40
    extern char *gettext (__const char *__msgid) __THROW;

    而剛好在/usr/include/glib-2.0/glib/gi18n.h 和 /usr/include/glib-2.0/glib/gi18n-lib.h中有這樣的define
    [root@finleyhost include]# grep -R "#define gettext" *
    glib-2.0/glib/gi18n-lib.h:#define gettext(String) (String)
    glib-2.0/glib/gi18n.h:#define gettext(String) (String)


    因此造成compile error...
    soluation:
    很不幸的, 這個錯誤是由兩個library 之間的錯誤所造成的,而不是pcman的程式錯誤,因此我想到的解決方法勢將其中一個library抓下來重新編譯....
    不過我想這並不太可行= =

    05 März

    WindowsXP安裝教學

    首先進入 BIOS 修改開機的順序,可是不同的主機板的 BIOS 設定畫面差別頗大,而 提供畫面者僅能拍下自己電腦的 BIOS 畫面供你參考。你可要肯動腦筋,膽大心細才會成功哦!

    常常聽人說,一開機按 Delete 即可進入 BIOS 。是的!大部份的主機板都是按 Delete 的;但也有標新立異的廠商,改用按 F1 或 F2 ,甚至按 Ctrl+Alt+Enter (DELL 的部份型號)和按 F10 (Compaq 的部份型號),因此還是根據螢光屏秀出的指示比較妥當。

     


    進入 BIOS 主頁,點選 BOOT 頁面,用鍵盤上的上下方向鍵反白第一個選項,按 Enter 鍵,就進入下一個頁面。有些主機板的 BIOS 沒有 BOOT 頁面,而將 Boot Sequence 收藏在 BIOS Features Setup 頁面之中,修改時只能選擇: A, CDROM, C ,只要選擇 CDROM 在 C(硬碟)的前面就行了,因為如果第一個選項是 A(軟碟機),而軟碟機之中沒有置入軟碟片,BIOS 就會自動進入第二個選項 CDROM 。

     

     


    在儲存離開之前--記得先將 Windows 安裝光碟片放入光碟機中--一按 Enter,就自動重新開機。此時要留意螢光屏出現,

     


    在五個句點出完之前,趕緊按鍵盤上的任一鍵,就正式進入由光碟片開機了。


    再把上面的說明說一次;先進入 BIOS 設定開機順序--光碟機優先啟動;並將 Windows XP 安裝光碟片 置入光碟機中,當螢光屏出現 Press any key to boot from CD.. 時,趕緊按下鍵盤上的任一鍵,此時螢光屏上,顯示光碟片中的程式正忙碌地偵測電腦內的各個硬體裝備,直到以下第一張圖檔出現,安裝作業系統的工作--才正式開鑼!

    (一)按鍵盤上的 Enter 鍵,表示 要安裝 Windows XP 。


    (二)按鍵盤上的 F8 鍵,表示 接受授權合約 。

     


    (三)按 D ,選擇 要刪除磁碟分割 。 Windows XP 會把整顆新硬碟的全部容量,預設為 C: 主要分割區 ,如果你不打算分割硬碟,就直接按 Enter。範例所使用的是一個已經分割過的舊硬碟(其中一部份屬於未配置空間),一樣可以按 D ,刪除原有的磁碟分割,以便重新規劃硬碟。

     


    (四) 堅持要刪除分割 ,就按 Enter 。

     


    (五) 再次確定要刪除分割 ,按 L 。

     


    (六)原有的磁碟分割已經刪除,出現為 未分割空間 。接著按 C ,表示選擇 要在未分割的磁碟空間建立一個主要分割區 。

     


    (七)在這裡 填入你要的主要分割區容量數額 (單位是 MB,1 GB=1000 MB)。應該以硬碟的總容量,和打算分成幾個分割區作為分配的依據,請不要照抄範例的數值。舉個例子來說,假設你用的是 80 GB 的硬碟(實際容量大約為 76317 MB),你打算分割 25000 MB 為主要分割區,剩下來的當作邏輯磁碟,那麼,就在空格內填入 25000 。

     


    (八)顯示最新分割狀況,按 Enter 。

     


    (九)如果前一步,你填入的數額大於 32000,在這裡只能看到 NTFS(快速)及 NTFS 兩個選項,沒有 FAT 檔案系統供選擇。因為 FAT 的檔案系統無法支援容量超過 32000 MB 的磁碟區。用鍵盤的上下方向鍵 選擇(反白)你喜愛的檔案系統 (舊硬碟盡量避免選用快速),按 Enter 。

     


    (十)範例所選的是 FAT 檔案系統(註一),才會出現此畫面;若選擇 NTFS,就直接進入下一個畫面。

     


    (十一)開始進行格式化。

     


    (十二)格式化之後,便開始複製檔案,安 裝 Windows XP 。在安裝過程中,經常需要重新開機,因為安裝光碟片還在光碟機裡,因此螢光屏一樣會秀出 Press any key to boot from CD..... 這行句子,請千萬 不要 按鍵盤上的任何鍵,讓句末的五個句點出完,進入硬碟,繼續未完成的工作。

     


    (十三)正在儲存設定

     

    (十四)開始複製檔案了,複製完畢,進行初始化及儲存檔案,然後自動重新開機。

     

    (十五)因為你的安裝光碟片還在光碟機內,重開機時, 螢光屏 同樣會 秀出 Press any key to boot from CD.. ,此時千萬別碰鍵盤上的任何鍵,讓系統直接進入如下開機畫面。

     

    (十六) 正式進行安裝。

     

    (十七)在這裡,請根據你的需求進行設定。

     

    (十八)輸入 你的姓名,最好用英文字母或數字,儘量避免用中文字。非公司電腦,組織一欄可以留空。

     

    (十九)接著輸入產品金鑰。

     

    (二十)安裝程式已代你輸入 電腦名稱,不滿意的話,可以自行更改。此外,請考慮是否須要設定 Administrator(管理員)密碼;假如不打算設定密碼,這兩欄可以留空。(強烈建議設立密碼)


    (二十一)確定日期、時間和時區。

     

    ----------------------------------------------------------------------------------------------------------------------

    滿詳盡的教學~~適合不太熟悉windowsXP安裝的人使用....

    25 November

    install openssh in solaris9

    env:
    SunOS SunRay 5.8 Generic_117350-18 sun4u sparc SUNW,Ultra-Enterprise
     
     
    packages needed:
     
    openssl-0.9.7f-sol9-sparc-local
    openssh-3.6.1p1-sol9-sparc-local
    prngd-0.9.25-sol9-sparc-local
     
    #pkgadd -d openssl-....
    #pkgadd -d prngd....
    #pkgadd -d openssh....
     
    pkgrm can remove old package instance
    #pkgrm SMCossl
     
     
     
    to do:
    how to start ssshd???
     
     
    not bad experience^^