2015年10月10日星期六
Dualless - 10萬用戶達成紀念
2015年6月29日星期一
Side Project : Team Color - 在試算表上研究顏色
#F
#FF
#FFA
#FFA5
#FFA50
#FFA500 [Enter] 立即變色
- 輸入16位的顏色代碼後,背景顏色會自動轉成該顏色
- 支援3/6/8位的16進制碼,8位為ARGB碼
- 提供Custom Formula用來處理顏色(e.g colorRgb, colorArgb , colorSetOpacity , colorRed , colorSetGreen etc) 詳細請看說明文件
- 反轉文字及背景色
相關文章
2013年6月16日星期日
週末的軟件開發計劃 - Angular Loading Promise
<html ng-app="bn.loadingPromise"> <head> <title>Demo1 - Use it without coding</title> </head> <script src="lib/angular.js"></script> <script src="../src/bnloadingpromise.js"></script> <body> <div bn-promise-show="loading"> Loading <img src="assets/ajax-loader.gif"> </div> <div bn-promise-hide="loading"> All the content loaded. </div> <div style="width:680px;" bn-promise-show="success"> <img src="assets/01.jpg" bn-promise> <img src="assets/02.jpg" bn-promise> <img src="assets/03.jpg" bn-promise> <img src="assets/04.jpg" bn-promise> </div> </body> </html>
在以上的例子裏只是使用了3個directive : bn-promise , bn-promise-show , bn-promise-hide。
bn-promise
只要把bn-promise加入
bn-promise-show / bn-promise-hide
二者的的作用跟ng-show及ng-hide差不多,視乎狀況決定DOM tree的顯示與否
<div bn-promise-show="loading"> Loading... </div>
以上的內容只有在Loading時會顯示,當所有資源都載入後就會自動消失。
註:進階使用方法請參考Github網頁
2013年5月5日星期日
擴充Google Docs的應用(1) - 在試算表中建立連結
2011年5月4日星期三
This is not a bug but intended design feature
「This is not a bug but intended design feature.」
全盤接受?耍嘴皮?騙鬼?開玩笑?
這不能排除有這個可能,可是我會偏向負面的意思,畢竟Bug就如小強一樣,是讓人惡厭的東西,如果一項功能會讓別人以為是bug… well。
這句子成立的情況有許多,只是大多數情況下都不成立而已,比較常出現而又成立的應該是遊戲設計上。
例如我看過這篇文章 ﹣ “这不是Bug而是个Feature”,其中提到一個叫ExtremeG的N64賽車遊戲的的bug。
本來有一個AI來讓電腦玩家決定在何時使用Turbo超車,但因為編程錯誤讓電腦玩家變得非常之侵略性,即使在灣道也不許你超車,會立即使Turbo迎擊,結果就是一團糟的車禍意外.
測試者的評價是贊賞的!
類似的故事在遊戲業界還能找到許多,基於我不是屬於那個界別,而又不是不負責任之徒,所以還真是沒有說過這番話,解釋bug與defect倒是經驗豐富,因為許多客戶都把不存在的功能視為bug,費的力氣還真不少。
雖然沒有把bug當作過feature,不過把不可預測狀況的代碼送出去倒是做過。
在ThinkGeek或一些網站可以買到一個叫做USB Stress Game的玩意:
當年我為客戶設計了這個玩具的程式,這玩意能接駁電腦,你可以拉、推及扭這個“球”,然後電腦的畫面就會被你所扭曲。
最初的規格裹面定義4種扭曲,然後由一種扭曲轉到另一種之前要先把畫面還原。
依足要求完成後,客戶說:
「效果好像不太好...」
「那要怎樣的效果呢?」
「hmmm… 最好是不用變回原狀,直接變成其他扭曲。」(規格要修改了!要加入新的過渡動畫)
「那已經不是原來的形狀了,我們有4種扭曲,如果要加入過渡的動畫,就要多6種效果,你們要設計這6種,而我們又會很辛苦,這超越了預算,我們得...」
對方明白我們的難處,所以陷入了沉思之中。
這個動畫是利用物理模擬的方法製作的,基於當初的要求,改變扭曲必須在畫面還原後進行,所以有額外的代碼確保流程,不過因為程式架構做得好,改動的難度低,所以我提出:
「不如這樣子,我把確保畫面如規格般顯示的代碼關閉,我不能保證會發生什麼事,動畫可能會變得亂七八糟,先讓你看一看效果吧。」
從14秒開始就是多出來的效果,例如翻頁、螺旋、無限拉長、局部變大等等, 那完全是規格外、不在設計之中的效果,而且多出的效果可不祇有6種,只要按鍵的次序及時機不同便會生出現許多無法預測的動畫,就算是作者本人我也不知道 XD
結果客戶飛快地接受了這個版本,後來還把幾項控制用的代碼刪掉,在保持原來四種扭曲時,其他過渡動畫的表現更加隨機。
想不到跟規格做的東西反而是多餘的 XDDD
說了些bug / defeat變成feature的實例,也說些完全相反的混帳事。
在上文<<買Motorola手機前請先考慮清楚 (包括Atrix)>>說過我對MO記震蛋的投訴,後來又收到了一個白目的回應:
「This is not a bug but intended design feature.」
即是代表:「震蛋是功能,不是錯誤」
(回答者是一名MOTO Expert,說是volunteer,但如果沒有跟Motorola的聯絡,又那會說得出這是design!?)
到底為何MOTOROLA的設計師/高層那麼堅持手機必須在使用震個不停來虐待用家,我是完全沒有頭緒啦,說不定他們其實有什麼特殊的使用方法,是我們好孩子們不應該知道的。
作為消費者,我認為被愚弄了,別說其他公司的產品,剛是第一代Milestone就沒有這個bug,用feature來推卸責任,我唯一想到的解釋是:「那一定是用來懲罰用家的功能!」
我強烈建議Motorola還要加入播歌功能,唱:「你真是蠢!蠢!蠢!,蠢得真奇妙!妙!妙!」
概然他們堅稱那是功能,那可以想像到之後還是會有新成員作加入震蛋系列,祝各位用家好運。
2010年10月5日星期二
又開新坑 - DQuest , ORM for Qt/Sqlite
在我開發PenPen時,核心的繪圖部份花了二晚就完成了,然後當我寫資料庫時... 花費了意外地多的時間,有時候SQL寫錯了少許,結果到了中期才發現有bug,除錯就得用不少時間。最慘是到了後期發現資料庫設計不對,計劃的宏願過於龐大(Over design),難以在短期內完成,要把不少部份砍掉……
最終資料庫的部份佔了60%的開發時間,實在冤枉得很。
作為應用程式的開發者,又不是要處理龐大的資料,對SQL的效能要求可謂完全沒有,只想要有一個簡單而用的介面。
所以那時我就想為Qt弄一個ORM (Object Retional mapping)的library,可以用Object的方式存取SQL,不用再浪費時間在這方面。
跟著開始了ORM的研究,ORM當中我最熟識的是Django,由資料庫的定義到存取都很簡單,但C++不像Python般的scipting language那麼俱彈性,Django的方法無法直接利用,除非學Qt弄出MOC (Meta-Object Compiler)那樣的東西,不過幾經考慮後還是放棄這個方案。
之後有段時候就好像回到初學編程的時候,研究C++的各種不同寫法,有沒有什麼語法、Macro、template的應用可以做出像Django的效果呢?幾經嘗試以後,終於弄出了一個比較漂亮的方法,只靠Macro及template的混合應用就能模仿MOC的效果:
/// User account database
class User : public DQModel {
DQ_MODEL
public:
/// The user ID
DQField<QString> userId;
/// The account creation date
DQField<QDateTime> creationDate;
/// The karma of the user
DQField
};
/// Declare the model and the field clause
DQ_DECLARE_MODEL(User,
"user", // the table name.
DQ_FIELD(userId , DQNotNull | DQUnique), // The field can not be null and must be unique
DQ_FIELD(creationDate , DQDefault("CURRENT_TIMESTAMP") ), // The default value for the field is the current timestamp
DQ_FIELD(karma) // If no special requirement to the field , you don't need to pass the second argument
);
以上的宣告只要放在header檔裏便可以定議出以下的SQL table:
CREATE TABLE user (
id INTEGER PRIMARY KEY AUTOINCREMENT,
userId TEXT NOT NULL UNIQUE,
creationDate DATETIME DEFAULT CURRENT_TIMESTAMP ,
karma DOUBLE);
所以我決定開始一個叫做DQuest的計劃,並且把程式碼以New BSD license的方式放出。
計劃資料:
Project Page:
http://code.google.com/p/d-quest/
Mailing list:
http://groups.google.com/group/dquest-dev
API Document
http://d-quest.googlecode.com/svn/trunk/docs/annotated.html
2010年7月19日星期一
我的第一個N900程式 - FrontView 900
所以我想在這裏介紹我真正的第一個N900程式 - FrontView 900,這是一個可以幫用戶將手機變成一部文件掃描器的程式。
我想不少人都試過利用手機的鏡頭充當文件掃描器,以現在的鏡頭規格來說是相當之合理的想法,但實際上的效果卻遠遜於真正的掃描器,最困難的是影像的對位,若不把鏡頭跟紙張對正,拍攝的影像便會傾斜,而要費心對正這一點往往令人卻步。
在網絡上我見過好幾個位人兄各自做了不同的手機架,讓手機可以簡單地與紙張對正,這的確令工驟簡單化,不過基本上不會有人把它帶在身邊。
FrontView 正是為解決這問題而開發的,它可以在影像中分辦出紙張,然後把變型的影像修正成正面(Front View),那麼就不用再為拍攝的角度費心,使手機輕易地變成一部文件的掃描器。
截圖
程式已經在Maemo的extras repository,即是說各位可以在App Manager裏找得到,希望你們喜歡。
2010年6月24日星期四
我的第二個N900程式
程式的名字叫PenPen Sketchbook,算是一個繪圖工具,但在設計上是為快速的筆記、塗鴉而設,內容未必是長篇大論的文章,可能僅僅是記些數字、購買清單,或者畫簡單的手繪地圖等。
雖然內建的Sketch也能勝任以上的工作,但由一篇塗鴉轉到另一篇要叫出Menu,而且也不能方便地查看以往所繪的東西,還有Sketch是採用Bitmap的儲存方式,如果想刪除已寫下的東西,必須要用筆桿來往掃描,但往往清除得不徹底,而PenPen Sketchbook就是為修正這些問題而開發的。
功能:
- 矢量圖像
- 筆觸是以矢量方式儲取,刪除只需要一下點擊,清除文字的速度比bitmap快更多。
- 無大少限制的畫紙
- 自動儲存,無須你費心所畫的東西要放在那個目錄
- 手繪觀看模式,曾畫了什麼一目了然
- 支援橫直觀看的模式
- PNG輸出
![]() |
![]() |
程式已經在extras-testing,我想要些時間才會有extras出現,希望你們會喜歡這個程式
另外也想分享一下這個程式的開發歷程
2010-06-10 星期四
在乘車回家的時候在構思該用什麼程式去參加Maemo的比賽,我並不打算寫非常之複雜的程式,因為大病剛癒,不想投入太多的時間,拿出N900出來寫點隨筆,然後……我發覺Sketch在這方面是極之不同好用,所以就有了這個程式的想法,不過內心真正想做的並不只是繪圖軟件,我希望將來能做出一個完全不用任何鍵盤的工作管理程式。
2010-06-11 星期五
回到家後就開始編程,用Qt寫繪圖程式那部份……不過一晚就完成7、8成了!Qt在這方面實在太贊了!
2010-06-11 星期六
開始弄資料庫有關的部份,基於真正想做的東西並不單單是繪圖軟件,所以資料庫的設計留有非常之高的彈性,手繪用XML儲存,但又可以讓其他部份進行取存,加上又有快取用的snapshot,結果做出來的資料庫大部份都是PenPen Sketchbook所不需要的,寫了一整天都是bug……
另外Qt的Database model只有比Sql多一點的支援,比直接用Sql寫好一點,很難進行refactor,出現了大量copy & paste的代碼,管理很麻煩……
2010-06-12 星期日
別發瘋了,不是說只是做玩具程式嗎?就讓它保持玩具的樣子!把無用的資料庫刪除,跟著程式就快做就做起了。
2010-06-13/14 實際測試,修正大少臭蟲
2010-06-16 正式公開
不過花在上傳的時間挺多,規則比Ubuntu的launchpad寬鬆好多,不過好像系統有問題,不太穩定。
2008年10月30日星期四
Ditz Commander v0.3
我心目中想要的功能都已經齊備,下一次v0.4的發佈應該是針對說明提示等對ditz初心者較親切的環境,但基於本人對那些功能不太熱衷,所以應該要過一段時間才會去做……
Changelog:
- Added new Tool buttons : Go back & Go forward
- Added extra command list for non-common command
- Implemented commands : "add-release" , "add-component" , "set-component" , "Unassign" , "Stop" , "Raw Edit"
- Added "Recently opened folder" menu
- Raw Edit Command - Launch $EDITOR (default is vim) and open raw issue file
- Bug Fix - It is now able to handle relative path as input argument of command "ditz-commander"
- Change window title according to the current loading page
2008年10月24日星期五
Ditz Commander
為什麼連Issue Tracker都要分散式?
無論是開源免費或商業收費的Issue Tracker都有不少,開源軟件中最為人所認識的有Bugzilla、Trac之類,而項目管理網站如Google Code及Launchpad等均有自己的Issue Tracker,雖然未必能提供非常強大的功能,然而經歷過多個項目的實踐,證明了它們相當之有用。
相比起來,Ditz還是處於起步階段,雖然能造出HTML文件,但連Web介面乜欠奉,只有指令介面的輸入,實在很難與Trac之類的軟件比較。
但憑著分散式系統的優點,Ditz亦有吸引使用者的本錢。
理由1 - 沒有伺服器的負擔
分散式系統其中一個最大的好處就是無需架設伺服器,不用維護,不用特別搞什麼備份系統,每個人手上的都是一份完整的拷貝。
這並非是為了省錢不架伺服器,如果沒人專責管理伺服器的話,我認為從一開始就不要去做。
沒人管理、沒人負責備份的機械當遇上事故如硬件故障等情況,裏面的資料很可能就此救不回來。
而更糟的情況是讓沒人管理的伺服器成為「觀光聖地」,任「遊客」予以取求,反而惹麻煩上身。
理由2 - 用作個人的Issue Tracker
為什麼個人本身都要做Issue Tracking呢?
跟據Getting Things Done一書所提及,一個項目/project,是由數個及更多的工作所組成,至於怎樣安排及完成這些工作,該書有一套方法,不少軟件會按該書所提及的方法去管理工作,但一點是經常遺忘的,就是工作是可能有「手尾跟」,會有「鑊氣」(廣東話)的。
這並非軟件開發的獨有問題,但凡涉及數人、漫長時間的項目都一樣,計劃往往跟不上變化,記錄工作、發生的事情、解決的方法,正好是Issue Tracker所善長的的工作。
引述Jserv的說話:
「包含我在內,不少人將 [trac] 也裝於自己的電腦 (laptop) 中,搭配 svk 一類的分散式版本控制系統,就可隨時隨地追蹤專案進度 (internal / external)、作基本的個人知識管理 (KM),或者查核待作事項等等。」
故此一套Issue Tracker是可以有效地幫助你去管理項目,而一套不需安裝WWW伺服器的個人的Issue tracker,可以進一步節省安裝及維護的時間。
Ditz Commander
Ditz正好能解決以上提到的問題,但……一套指令介面的Issue tracker,是連我這樣的Geek也覺得難用的。故此我為它寫了一個簡單的圖像介面 - Ditz Commander
功能:
- HTML瀏覽器與Terminal整合,一邊使用Ditz的指令介面改寫Issue,另一邊在瀏覽器上觀看結果。
- 提供基本Ditz指令的short cut key
- 自動提供Issue ID參數,例如在觀看某個Issue時,想寫下感想,一般需要在從瀏覽器 c&p issue ID,然後貼在Terminal裏。在Ditz Commander裏可以省點這個步驟,只要按下"Comment"按扭便會自動填寫Issue ID。
- 記錄已開啟Ditz項目
Ditz及Ditz Commander的Debian套件:http://www.cgarbs.de/stuff/deb-repository.html#1
相關閱讀
2007年7月10日星期二
開源軟件計劃 - QRCode Reader
在上次Linux the Gathering活動上談了些有關於Computer vision的技術,當然不能不提的是QR Code,雖然已經有開源的程式庫,但欠卻一般應用,計劃內所提供的只有幾個簡單的範例程式,除了MIDLet那個以外都不能讀取鏡頭影像,那就沒有什麼 用處了。概然最近都是在寫V4L2的程式庫及其他元件,不如試一試把這幾個東西整合一起,為這個程式庫做個Linux的介面吧。
花了2日時間,作為Proof-of-concept的實驗品出來了:
因為Open Source QRCode library本身是用Java撰寫,而怎樣用Java存取硬件,或者把V4L2的API做給Java,相對要花較長的時間,所以在設計上有些取巧的地方。
首先是用GCJ把QRCode Library編譯做native的object code,再用gcjh弄出C++要用的標頭檔,主體是一段不太長的C++程式碼,負責經Rvtk ( Realtime Video Toolkit )調整鏡頭參數及讀取影像,還有是建立gtk+介面。當一切準備就緒便從鏡頭讀取影像,抽出觀景框裏的內容,最後交給QRCode Library處理。
當然啦,在那麼短時間內做出來的東西自然存在不少問題,甚至是經常SEGFAULT。所以先把消息發給較熟識的OSS開發者如Anthony Wong等人作討論。最後經Roger So指點,再花若為2天的時間,終於完成了第一個Alpha版本。
QRCode library本身的處理速度就相當之迅速,而整合後的就準確度算蠻高的,只是還未開始弄亞洲語系的支援,暫時只能解讀ASCII的條碼,介面也沒怎樣特別考慮過。會先休息一段時間,思考一下跟著的計劃。
另外Debian SID的GCJ有點問題,據體原因並不太清楚,嘗試用來編譯QRCodeDecoderCUIExample(指令模式範例),可是ImageIO無法運 作,只會回傳null。 而gcjh也同樣有問題,無論是什麼輸入,最終都只能製出空白的header檔。
相反在另一部安了Etch的電腦就一切正常。當然不排除是我自己部機的問題,最好有人再幫我試試 :D
今天先寫那麼多,程式碼的下載及編譯程序之後再補上。
2007年6月11日星期一
libv4l2
libv4l2 is a user space library to access V4L2 compatible video device. Current features (v0.1) include:
- V4L2 API (only)
- Query and set video device properties that include:
- Resolution, Image Format, Channel, Norm, fps...
- Read/Write and Memory mapped streaming I/O
- YUYV/YUV420 to RGB conversion. (No MJPEG yet)
- A simple GTK+ dialog to choose the video device to open and set the properties.
- Utility to convert video frame to IplImage format for use with OpenCV.
Snapshots:
Dialog to query the V4L2 device available and choose the one to open.
Adjust device properties
Sample program - facedetect from OpenCV
The source comes with two libraries. They are libv4l2 and libcv-v4l2. libv4l2 is the core library to deal with v4l2 device. libcv-v4l2 is “supposed” to be an extension to OpenCV for access low level device setting, but only few functions are implemented and the design is not well. It will be completely rewritten afterward. All features that should not be provided by libv4l2 will be there (e.g. GTK+ Dialog)
libv4l2 itself is a very simple library that just requires standard library like libc6-dev in order to build, but libcv-v4l2 need packages of gtk+-2.0 and OpenCV.
The package of OpenCV has been available in Debian Etch/SID, they could be installed by:
apt-get install libcv-dev libcvaux-dev libhighgui-dev
The build instructions:
bzr branch http://benlau.e-fever.org/projects/bzr/libv4l2 libv4l2
cd libv4l2
aclocal
automake
autoconf
./configure –prefix=/tmp/usr # for testing
make
make install
There are two demo applications available. The first one is a video viewer with two dialogs to choose the input video device and set the properties respectively. The other one is a face detection program from the sample code of OpenCV project.
/tmp/usr/bin/v4l2-demo
/tmp/usr/bin/facedetect
The library is still under development. The API may change for new version. Therefore, only static link libraries are provided.
API Doc:
http://benlau.e-fever.org/projects/docs/libv4l2/index.html
http://benlau.e-fever.org/projects/docs/libcv-v4l2/index.html
Tested Camera :
KWorld DVD Marker [em28xx]
Logitech Quickcam Pro 4000 [PWC] - The PWC do not support to adjust FPS by standard V4L2 API
Logitech Quickcam Pro for Notebooks[UVC] - The driver supports MJPEG and YUYV for output. If chosen YUYV, only 1024×576 is provided.
Pinnacle DVC 90 [em28xx] - mmap fails in streaming I/O
Please feel free to contact me for any comment of the source
2007年3月31日星期六
Getting Started with CVS
許久以前在「昨天教了一堂CVS」一文內提過弄了份CVS的教材,當初完成的時候有計劃過要公開出來,反正內容都是東湊西拼出來的,不過呢,因為太忙的關係將件事完全遺忘了……
說實話以現今的狀況應當推介SVN、Bazaar而放棄CVS,免得害人浪費時間,算是過時得很的教材。
但現實始終是現實,還有許多地方仍使用CVS,更改VCS可不是每個機構都有那個決心實現,新人要接手總得重新學習。
那麼這份教材「應該」會有用得著的地方吧。
我希望……
又或者可以拿來改做成Subversion、Bazaar的教材?
Getting Started with CVS (odp,pdf)
此文件採用 Creative Commons 授權條款
2005年8月15日星期一
Fruit-Based computers: On the cutting edge
Fruit-Based computers: On the cutting edge
譯者: Ben Lau
在 Orchard Technologies 的 新 聞 發 佈 會 上Orchard 的 行 政 總 裁 Richard Mothball 手 上 玩 弄 著 一 個 酷 似 鮮 橙 的 東 西 , 說 道 : 「 這 就 是 我 們 的 產 品 - 一 部 終 極 的 掌 上 電 腦 。 世 界 的 焦 點 將 會 落 在 我 們 的 身 上 , 所 有 的 大 少 傳 媒 面 都 會 以 我 們 的 產 品 做 封 面 , 因 為 ! 我 們 成 功 地 改 造 了 橙 , 讓 它 可 以 儲 存 及 處 理 資 料 ! 它 已 經 是 一 部 電 腦 ! 」
全 場 嘩 然 。
Richard Mothball 繼 續 道 : 「 我 們 的 工 作 , 就 是 把 橙 的 DNA 改 良 , 讓 它 擁 有 可 覆 寫 資 料 的 特 性 。 這 是 個 讓 人 興 奮 的 產 品 。 」
他 一 氣 呵 成 , 絕 無 間 斷 , 死 不 斷 氣 地 繼 續 道 : 「 還 有 的 是 , 它 提 供 了 豐 富 的 維 他 命 C , 明 白 嗎 ? C? C++? 」 我 敢 保 證 , 在 場 沒 有 記 者 明 白 他 說 什 麼 。
Orchard 公 布 , 這 個 產 品 命 名 為 Oranj 。
Richard Mothbal 慢 慢 地 把 橙 皮 撕 開 , 入 面 是 一 個 生 化 輕 觸 式 螢 幕 , 他 把 寫 好 了 的 電 子 郵 件 送 出 , 跟 著 他 漫 無 目 的 地 翻 開 朋 友 的 資 料 、 玩 了 一 回 兒 俄 羅 斯 方 塊 、 看 了 幾 個 網 頁 , 接 著 就 把 它 吃 了 。
「 平 均 一 個 橙 的 citric acid ( 果 酸 ) 足 夠 它 於 standby mode 運 作 一 個 星 期 , 平 均 使 用 時 間 則 是 二 天 , 跟 著 它 便 會 腐 爛 。 」
「 只 要 利 用 我 們 的 手 提 KitchenSync 插 座 , 便 能 夠 更 新 Oranj 的 資 料 , 只 消 把 KitchenSync 插 在 PC 上 高 的 平 行 埠 便 可 。 」 他 把 一 個 橙 放 進 KitchenSync 上 , 在 PC 上 按 了 數 個 鍵 , 接 著 便 把 橙 拿 起 。 「 這 個 橙 , 放 進 了 我 的 電 話 簿 , 任 何 的 改 動 都 會 存 進 快 閃 式 脫 氧 核 糖 核 酸 (Flash-DNA) 內 , 只 要 少 少 的 一 塊 , 便 可 以 更 新 我 的 PC 。 」 為 求 證 , 他 把 電 話 簿 的 內 容 亂 改 一 通 , 撕 下 幾 片 的 橙 皮 , 不 消 三 二 口 便 把 所 有 橙 肉 吃 進 肚 裏 。 跟 著 他 把 剛 才 撕 下 的 橙 皮 放 進 KitchenSync 上 , 按 下 extract 鍵 , 像 是 攪 拌 機 般 的 聲 音 響 起 。 PC 螢 幕 出 現 了 短 暫 的 停 頓 , 接 著 便 出 現 了 那 些 被 塗 改 了 的 資 料 。
工 程 師 席 上 傳 出 陣 陣 的 喝 采 聲
「 我 們 研 究 過 3COM 與 M$ 的 掌 上 型 電 腦 後 , 我 們 決 定 邀 請 Linus Torvalds 為 Oranj 設 計 作 業 系 統 。 這 可 確 保 Oranj 能 夠 在 市 場 上 生 活 , 因 為 Linus 做 的 每 一 件 事 都 會 被 世 上 萬 千 的 電 腦 愛 好 者 所 仿 傚 。 」
就 在 此 時 , 有 三 個 人 闖 進 會 場 中 , 把 發 佈 會中 止 , 他 們 分 別 是 M$ 的 高 級 行 政 人 員 、 M$ 聘 請 的 一 位 律 師 及 一 位 強 壯 的 護 衛 。
當 日 , M$ 即 場 以 2 憶 5 千 萬 收 購 Orchard Technologies , 並 改 名 為 「 M$ Orchard 99 」 。
第 二 天 , M$N 以 「 Once again , M$ is at the forefront of innovation 」 作 為 網 頁 的 標 題 。
- 2 個 星 期 後 -
M$ 公 布 她 們 成 功 地 把 ~WindozeCE 移 植 到 新 的 PDA - 「 M$-Orange handheld organic PIM 」 上 。 並 會 在 WindozesWorld 99 時 正 式 亮 相 。
在 WindozesWorld 99 當 日 的 揭 幕 禮 上 , 二 位 M$ 最 高 層 人 士 亦 有 出 席 , 當 中 包 括 剛 到 過 美 國 司 法 部 為 反 壟 斷 法 案 訴 訟 答 辯 的 標 叔 叔 。
一 個 寫 著 : 「 What DO YOU Want to Eat Today? 」 的 橫 額 高 高 的 掛 在 禮 堂 上 。
整 個 揭 幕 禮 , 由 示 範 小 組 隊 長 Hiro Takedablame 的 一 番 說 話 開 始 。 他 說 : 「 我 們 做 過 問 卷 調 查 , 關 於 人 們 希 望 在 這 個 新 產 品 上 看 到 什 麼 , 97% 希 望 沒 有 bug 、 3% 希 望 有 USB Port , 所 以 我 們 把 USB Port 加 了 進 去 。 同 時 , 我 們 亦 把 Windozes 98 CE 放 進 了 去 , 我 們 現 在 將 會 示 範 這 部 新 產 品 的 威 力 」
標 叔 叔 滿 意 地 微 笑
Hiro Takedablame 跟 著 便 把 一 個 橙 放 進 了 M$-ActiveActivator 裏 , 按 了 數 個 鍵 , 那 個 橙 震 了 一 震 , 然 後 變 得 沉 寂 , 「 WIndoze98 CE 現 在 啟 動 中 」 Hiro 的 聲 音 響 起 , 「 它 正 在 建 立 一 個 交 換 檔 (swap file) , 跟 著 就 會 啟 動 OuterLooker98 。 我 們 會 把 一 個 USB Fax modem 插 上 去 , 看 它 如 何 自 動 檢 查 」
就 在 這 時 , 那 個 橙 突 然 暴 漲 , 漲 到 像 一 個 南 瓜 般 , 跟 著 「 彭 」 的 一 聲 , 那 個 橙 爆 炸 ! 殘 渣 灑 落 在 各 位 示 範 小 組 成 員 的 身 上 。
觀 眾 席 上 , 有 些 人 狂 笑 、 有 些 人 咆 哮 、 有 些 人 尖 叫 。 標 叔 叔 皺 起 眉 頭 。
「 呀... 」 , Hiro 漲 紅 了 面 道 : 「 可 能 是 記 憶 體 不 足 , 我 想 這 大 概 就 是 我 們 之 所 以 還 不 能 付 運 的 原 因 。 」 執 行 委 員 席 上 傳 出 微 弱 的 笑 聲 。
在 這 裏 作 少 許 補 充 , 有 許 多 的 測 試 員 曾 經 回 報 過 類 似 的 情 況 , 只 是 被 他 們 忽 略 了 。
- - 幾 天 後 - -
Orchard 科 技 發 表 了 新 一 系 列 的 鮮 果 掌 上 型 電 腦
在 發 布 會 上
「 我 們 很 感 謝 M$ 購 買 了 Orange , 使 得 我 們 可 以 獲 得 足 夠 的 經 費 去 開 發 更 強 大 的 產 品 , 現 在 我 為 大 家 介 紹 我 們 的 新 產 品 Orchard Apple 、 Orchard Grape 及 Orchard Banana. 」
差 不 多 在 同 一 時 間 , Linus Torvalds 發 表 了 世 上 第 一 個 為 M$-Orange 設 計 的 preemptive multitasking organic kernal 的 beta 版 本 。
Torvalds 說 : 「 這 實 在 不 是 什 麼 一 回 事 , 把 二 進 制 碼 轉 成 DNA 的 四 進 制 碼 , 是 有 些 困 難 。 但 不 是 不 可 能 的 , 還 得 多 謝 那 些 詳 盡 的 系 統 文 件 說 明 及 來 自 世 界 各 地 的 設 計 師 的 支 持 」
他 接 下 去 說 : 「 我 們 下 一 個 計 劃 是 去 建 立 一 個 支 援 Orchard Grape 及 Banana 以 至 日 後 新 產 品 的 kernel 。 我 們 已 經 計 劃 好 如 何 去 處 理 資 源 分 享 及 低 階 資 料 交 換 等 問 題 , 這 項 技 術 我 們 稱 之 為 Grapevine , 它 就 成 就 應 當 如 當 的 TRS-80 那 樣 。 而 Apple 的 開 發 工 作 亦 已 經 展 開 , 但 我 們 在 core level 上 遇 到 一 些 技 術 上 的 問 題 。 」
Fruit-Based computers: On the cutting edge
Orchard Technologies took the world by storm on Friday, when it announced to the world it had successfully genetically enhanced an orange to store and manipulate data.
"This is the ultimate handheld computer. What we've done is enhance the chemical structure of the orange's DNA to allow short-term data storage and retrieval. It's really very exciting.", said Richard Mothball, CEO of Orchard. "Plus, they're a valuable source of Vitamin C. Get it? C? C++?" None of the journalists got it.
Demonstrating the new handheld, dubbed the Oranj, he peeled back the skin, showing an organic touchscreen on the inside, and retrieved some e-mail. Then he fiddled with his contact manager, played a quick game of tetris, and did some web browsing. Then he ate it.
"The average orange has enough citric acid to run the circuits for a week on standby, or two days of average use, after which they decay."
"Users can update their Oranjes using our handy KitchenSync cradle, which attaches to the parallel port of any PC." By way of demonstration, he dropped another orange into the KitchenSync, tapped a few keys, and then lifted out the orange. "Now my contact manager is up to date. And since any changes I make are stored in Flash-DNA, all I need is a small sample to update my PC." To illustrate, he changed a contact name, saved the changes, then tore off a bit of skin, and once again ate the orange. Placing the orange peel in the KitchenSync, he tapped the "extract" key, which caused the Sync to make a blender-like noise. On the PC screen, there was a brief pause, then the contact's name changed. There was a cheer from the developer's corner.
"After reviewing handheld operating systems from 3COM and Microsoft, we have asked Linus Torvalds to design the OS for our Oranj. This will ensure the survival of the product, as anything Linus does is emulated by hundreds of millions of geeks everywhere."
The press release was interrupted by the arrival of three helicoptors full of Microsoft executives, lawyers, and armed guards. They bought Orchard Technologies on the spot for $250 Million dollars, and promptly renamed it to "Microsoft Orchard 99".
"Once again, Microsoft is at the forefront of innovation," babbled a corporate drone.
---------Two Weeks Later---------
Microsoft announced it had succeeded in fitting Windows CE into its new MS-Orange handheld organic PIM. In a press demo at
WindowsWorld 99, top executives gathered to watch the unveiling of the new product. Bill Gates himself was on hand, having just finished his deposition to the DOJ. A banner entitled "What Do You Want to Eat Today?" hung over the stage.
Demo team leader Hiro Takedablame opened with the words, "We asked our focus group, what would you like to see in this product? 97% said, No Bugs. 3% said, a USB port. So, we built in a USB port. We've also installed Windows 98 CE into the MS-Orange, and we'd like to demonstrate the unique capabilities of this product." Bill smiled.
With those words, he dropped the orange into the MS-ActiveActivator and pressed a few keys. The orange vibrated briefly, then was still. "Windows CE is now booting", announced Hiro. "It will build a swap file inside the orange, and start to load in Outlook98. Then we'll plug in this USB faxmodem and watch it auto-detect it."
At this point the orange swelled to the size of a pumpkin and exploded all over the demo team. The press laughed. They roared. They screamed. Bill frowned.
"Umm... hmm... umm.." said a red-faced Hiro. "Looks like an out of memory error. I guess that's why we're not shipping it yet, huh?" Weak laughter from the executives.
It should be noted that many such incidents have been reported to Microsoft by the beta testers, but were ignored by the team.
---------Several days after that, Across the World...---------
Orchard Technologies recently issued a press release of more handheld organic computing devices being readied for market. "Thanks to Microsoft's infusion of cash in purchasing the Orange, we were able to go ahead with research on other, more powerful products. I'd like to introduce the Orchard Apple, the Orchard Grape, and the Orchard Banana."
Almost simultaneously, Linus Torvalds announced the beta release of the world's first preemptive multitasking organic kernel, designed to work on the MS-Orange.
"This was nothing, really", Torvalds said. "converting from binary to Base4 DNA was a little difficult, but not impossible, thanks to our well-documented source code and help from developers worldwide."
"Our next project will be to build kernels that support clustering for Orchard's latest developments, the Grape and Banana. We've already laid out plans for resource sharing and low-level data exchange, called Grapevine, and from what I've seen of the inital code, it'll make Beowulf look like a TRS-80. We've also started work on the Apple, but there are some difficulties at the core level to work through."
2005年3月5日星期六
用AP播MP3
在WL500G最新版本的韌體中,加了一個被喻為十分沒用的功能-播放MP3,理論上安裝所須的軟體,打開Windows Media Player,插上USB音效就立即搖身變成一台網絡的MP3播放器(ref: SqueezeBox)。可是……我未成功用過……而且家裏我沒有Windows的機器,於我無用。
但又心思思想試一試,結果花了一個星期天,成功把一個SlimServer(Music Server)的client及MP3播放器做了進去,之後只要隨便找台Linux、Mac OS-X、Solaris及Windows做Server,設置IP後就可以播放了!
WL500G

之後的下一步應該是去找台NAS回來,把SlimServer做進去吧 :)
後話: 其實,對於一個不聽歌的人來說,這樣的系統有什麼意義呢……?
Building madplay for WL500G Howto (Draft)
This Howto assumes a build environment of custom firmware 1.9.2.7-4 has been setup according to the instructions provided in Oleg's page of "ASUS WL-500g custom firmware page". It should also work for other versions, but it is not tested.
Download
| File | Version | Download |
| madplay-0.15.2b.tar.gz | 0.15.2b | http://sourceforge.net/project/showfiles.php?group_id=12349 |
| libid3tag-0.15.1b.tar.gz | 0.15.1b | http://sourceforge.net/project/showfiles.php?group_id=12349 |
| libmad-0.15.1b.tar.gz | 0.15.1b | http://sourceforge.net/project/showfiles.php?group_id=12349 |
| zlib-1.2.2.tar.gz | 1.2.2 | http://sourceforge.net/project/showfiles.php?group_id=5624 |
Libraries preparation:
ASUS firmware build package do not come with all the libraries required by madplay, therefore it must build and install them by yourself.
Warning: Below instructions will install additional libraries under the toolchain's path.
Environment variable:
TOOLCHAIN_PATH=/opt/brcm/hndtools-mipsel-uclibc
(This environment variable is not really necessary in the build process. It is used to indicate the target installation path that passes to configure script.)
zlib:
tar zxf zlib-1.2.2.tar.gz
cd zlib-1.2.2
./configure --prefix=$TOOLCHAIN_PATH
make CC=mipsel-uclibc-gcc 2>&1 | tee build.log
make install
tar zxf libid3tag-0.15.1b.tar.gz
cd libid3tag-0.15.1b
RANLIB=mipsel-uclibc-ranlib AR=mipsel-uclibc-ar CC=mipsel-uclibc-gcc ./configure --prefix=$TOOLCHAIN_PATH --enable-static --disable-shared --host=mips-linux
make 2>&1 | tee build.log
make install
libmad:
tar zxf libmad-0.15.1b.tar.gz
cd libmad-0.15.1b
RANLIB=mipsel-uclibc-ranlib AR=mipsel-uclibc-ar CC=mipsel-uclibc-gcc CXX=mipsel-uclibc-g++ ./configure --prefix=$TOOLCHAIN_PATH --enable-static --host=mips-linux --disable-shared
make 2>&1 | tee build.log
make install
madplay compilation:
After installed all the libraries provided above, you could now compile madplay:
cd madplay-0.15.2b
LIBS="-lm -lz" RANLIB=mipsel-uclibc-ranlib AR=mipsel-uclibc-ar CC=mipsel-uclibc-gcc CXX=mipsel-uclibc-g++ ./configure --prefix=$TOOLCHIAN_PATH --enable-static --host=mips-linux
make 2>&1 | tee build.log
If no error was found during the compilation, a binary file (`madplay`) should be created within the path of madplay-0.15.2b/ . As additional libraries like libmad and id3tag are linked statically, you could just install this single binary to your access point.



















