uClibc的libm沒有trunc function的實作, 如果一定要用到的話, 可以加入簡單的實作:
發表文章
目前顯示的是 2010的文章
就如同官網上所講的, MSYS可以讓Windows有基本的Linux Shell的指令. MSYS is a collection of GNU utilities such as bash, make, gawk and grep to allow building of applications and programs which depend on traditionally UNIX tools to be present. It is intended to supplement MinGW and the deficiencies of the cmd shell. 但由於mingw-get-inst自動安裝程式下載msys的套件安裝還有問題, 所以我改用手動安裝. 官網的安裝說明: http://www.mingw.org/wiki/msys
It seems the MinGw main site is broken currently. (2010 Oct 26) The automated MinGW Installer (mingw-get, mingw-get-inst) still can't find some of the packages. I do some googling and find another maintainer of MinGW -- TDM-GCC which has a better installer. Reference: http://wiki.codeblocks.org/index.php?title=MinGW_installation
複製硬碟由小到大簡單, 由大到小比較難, 我就遇到這種問題. 兩家2G的卡片, 就有不同的大小. 這是第一個CF的大小 Disk /dev/sda: 2079 MB, 2079866880 bytes 這是第二個的 Disk /dev/sdb: 2029 MB, 2029805568 bytes 這是partition的layout Device Boot Start End Blocks Id System /dev/sda1 * 2048 3756031 1876992 83 Linux /dev/sda2 3758078 4061183 151553 5 Extended /dev/sda5 3758080 4061183 151552 82 Linux swap / Solaris 在較小的CF卡上, 我決定將後面的swap放棄掉. Linux的partition不變. 1. 我先備份bootloader(Grub) $dd if=/dev/sda of=MBR-backup bs=446 count=1 我不備份到512bytes的原因, 是因為不想備份到partition table. 參考這篇文章: http://embraceubuntu.com/2005/10/20/backing-up-the-mbr/ 2. 按照之前sda所得到的partition table, 用fdisk設定到sdb上, 只有swap的partition變小. 並將之格式化. # mkfs.ext2 /dev/sdb1 swap 因為要設定UUID, 所以待會再做 再把bootloader 還原回去 $ dd if=MBR-backup of=/dev/sdb 3. 將/dev/sdb1 mount 到/mnt上, 用rsync備份根目錄下的資料到/mnt下 # mount /dev/sdb1 /mnt # cd / 因為mnt, proc, sys的目錄都是虛擬的檔案系統, 所以不用copy # rsync -a --exclude=mnt -...
我覺得YAML可以用在比較複雜的設定檔上, 它有提供各種語言的parser, 也比XML來得簡單. Google App engine也用這種語言來做設定檔的語法. 下載網站: http://www.yaml.org/ 以下為wikipidia的介紹: YAML (IPA: /ˈjæməl/,尾音類似 camel 駱駝)是一個可讀性高, 用來表達資料序列的程式語言。 YAML參考了其他多種語言,包括: XML 、 C語言 、 Pytho n 、 Perl 以及電子郵件格式 RFC 2822 。Clark Evans在 2001年 在 首次發表了這種語言 [1] ,另外Ingy döt Net與Oren Ben-Kiki也是這語言的共同設計者。 目前已經有數種程式語言或腳本語言支援(或著說解析)這種語言。 YAML 是"YAML Ain't a Markup Language"(YAML不是一種 置標語言 )的 遞歸縮寫 。 在開發的這種語言時, YAML 的意思其實是:"Yet Another Markup Language"(仍是一種 置標語言 ), 但為了強調這種語言以數據做為中心,而不是以置標語言為重點,而用 返璞詞 重新命名。 http://zh.wikipedia.org/zh-tw/ YAML
First, install mplayer, gnome-mplayer http://www.ubuntugeek.com/install-mplayer-and-multimedia-codecs-libdvdcss2w32codecsw64codecs-in-ubuntu-904-jaunty.html gecko-mediaplayer . A Mozilla browser plug-in to handle media on websites, using gnome-mplayer sudo apt-get install gecko-mediaplayer Open firefox->Tools->Manage Content Plug-ins, Change Windows Media video content handler to Gecko Media Player
我有一個舊的blogger帳號及網址很久沒用了,在轉換成google帳號之後, 發現在blogger 資訊主頁 上並不會出現, 在討論區爬了一些文之後, 找到了解決方式 http://groups.google.com/group/blogger-help-troubleshoot/browse_thread/thread/b6d0944608e0def3/7c335565e95a3355?lnk=gst&q=old+blogger#7c335565e95a3355 只要到下面的網址 http://blogger.com/forgot.g 登入之後會再收到一封含有登入指示的電子郵件, 再照指示去做, 舊的網址就會出現了
Today I finished cross-compiling wvdial package. After I cross-compiling it, I found that it has some problem to load the wvdial.conf. And I also know that passing arguments to the wvdial is still working. Finally, I decide to modify the wvdial program to load the wvdial.conf by my own. I load the config file with iniParser and pass it to the cfg object. Now it works perfectly !! wvdial -- a utility that helps in making modem-based connections to the Internet wvdial site wvdial wiki iniParser home wvdial introduction
cvsync 網址 http://www.cvsync.org/ 預設設定檔位址 /usr/local/etc/ 設定檔範例在samples目錄 cvsync.conf是給client用 cvsyncd.conf是給server用 如果在compile的時候出現下面訊息, 則是沒有指定HASH_TYPE WARNING! Please specify the HASH_TYPE. libgcrypt mhash native (default) openssl make[1]: *** [hash-error] Error 1 直接在make後面指定就可以了 make HASH_TYPE=openssl