code style

7/29/2009

iPhone 3D engine survey

[open source]
SIO2
indie certifiate $99
Blender as the tool chain
Bullet as the physics engine
Lua script integrated
rich tutorials

Oolong, author's blog
ARM VFP math library

Irrlicht
OGRE

note: SIO2, Oolong mainly focus on iPhone.

[commercial]
Torgue
2D: indie $750, commercial $2,250
3D: indie $650, commercial $1,749

ShiVa
unlimited: €169,00
advanced: €1499,00

unity3D
foundation: indie $199, pro $1499
iPhone: basic $399, pro $1499

6/11/2009

工程師養貓指南


2/14/2009

Greasemonkey

用cooliris看正妹相簿實在相當方便

可惜台灣的正妹相簿大多放在無名

無名又沒有提供media rss給cooliris使用

所以只好找替代方案 "Greasemonkey"

Greasemonkey是FireFox上的萬能腳本外掛程式

已經有很多網友寫了一堆script供大家使用

gslin大神寫wretch album expander相當簡單俐落

[使用前]



[使用後]



如果要支援cooliris,就要參考這篇文章

基本上就是擷取相簿內容,轉換成media rss,再餵給cooliris


附註: 長輩推薦的autopagerizer也很好用!

2/13/2009

La Princesse in Liverpool

這算是大型裝置藝術嗎? :P


La Princesse in Liverpool - The Big Picture - Boston.com

不知道何時有剛彈可以看

2/12/2009

Hackintosh

iPhone 3G當紅,害我也很想買一隻來玩玩

最吸引我的當然是開發iPhone上面的app.囉

雖然windows也有toolchain可以開發iPhone app.

不過用mac開發才是王道阿! (握拳)

但因為在下實在是"真。窮人",買不起macbook

所以只好轉進hackintosh這個罪惡的淵藪 :>

剛好我的電腦是dell inspiron 530,有強者提供了完整攻略

在此我也簡單地說一下我的攻略
  1. download iATKOS 5i and leopard HD install helper
  2. create 2 partitions, one for mac os and one for HD helper
  3. use HD helper to dump iso into the partition
  4. reboot
  5. choose iATKOS to boot
  6. earse mac os parition into mac journal format
  7. customize installer
  8. install
至於audio/network,強者攻略中有提供方法就不再贅述

有圖有真相

2/11/2009

[教學] Mac OS X 常用快速鍵

作者: rofu (心若冰清天褟不驚) 看板: MAC
標題: [教學] Mac OS X 常用快速鍵
時間: Sun Sep 23 15:54:37 2007

簡單介紹,給大家參考參考.

command: 蘋果鍵
option: alt鍵
ctrl: ctrl鍵
退出鍵: 光碟退出鍵
↓: 上下左右的下鍵

command + tab 在不同的程式間作切換(往後)
command + shift + tab 在不同的程式間作切換(往前)
command + ` 在相同程式間的不同視窗作切換(往前)
command + ~ 在相同程式間的不同視窗作切換(往後)

command + c 複製
command + v 貼下
command + x 剪下

command + n 開新視窗
command + w 關閉分頁
command + option + w 關閉所有分頁,但是不關掉程式
command + q 關閉整個程式

command + a 全選
command + f 尋找
command + o 打開檔案
command + s 儲存檔案

command + m 最小化(不推薦使用)
command + h 隱藏目前程式(推薦使用,command + tab可以直接切回來)
command + option + h 隱藏除了目前程式以外的所有視窗

command + e 在外接設備的圖示中按下這個相當於退出
command + d 製作備份
command + ↓ 相當於執行(在圖示上按下enter只能改檔名,按下這個才會執行)
command + shift + a 在finder中可以直接開啟應用工具資料夾


ctrl + 退出鍵 關機詢問視窗(=按下電源鍵)
command + option + esc 強制結束此程式
command + option + 退出鍵 休眠
command + option + ctrl + 退出鍵 關機
command + ctrl + 電源鍵 強制重開機

command + shift + 3 全螢幕快照
command + shift + 4 螢幕快照 選取範圍
command + shift + 4 + 空白鍵 螢幕快照 選取應用程式

開機時:
option 選擇開機磁碟
T 你的mac變成一個外接硬碟(請使用firewire連接其他電腦)
C 從光碟開機

滑鼠右鍵: ctrl + 左鍵 = 右鍵
兩根手在touch pannel上 + 左鍵 = 右鍵

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.90.99

1/13/2009

2009破蛋快樂

三十而立的生日

本來以為會獨自一個人默默度過

不過剛剛哥哥跟嫂嫂突然拿著蛋糕幫我過生日

著實讓我一陣驚喜 >/////<

生日願望 大家都要幸福唷~

1/07/2009

Matt 是真是假? 傻傻不清楚

之前很火紅的環遊世界跳舞


作者在某個演講上開了個玩笑



似乎很多人不懂這種幽默

土生土長的台灣人就算了(有語言上的問題)

鼎鼎大名的Mr.數字先生, 在移民美加多年的語言/文化薰陶之下

居然連這種明顯惡搞的玩笑都當真了

也有很多人看到文章就當真了

剛剛才看到豪宅朱大出來幫忙正名澄清

Matt自己的澄清文也有提到, 連美國人自己也搞不清楚真假

我覺得很可能是大家沒時間把整段演講看完

看文章也只是看看標題就省略真正的內容

所以結論就是 標題殺人法 萬歲 (誤)
 

12/28/2008

流星之絆

連著幾天把剛放送結束的流星之絆 看完

東野圭吾(推理小說家) 加上 宮藤官九郎(鬼才編劇)

又搞笑又沈重又歡樂又哀傷的日劇

而且戶田惠梨香有演出!正妹 最高!!

From UtOpIaN


12/07/2008

wget & curl

因為工作上需要, 想要自動化上傳/下載檔案到web server上

所以就survey了wget與curl 這裡有兩者的比較 wget vs curl

不過在https上遇到了一些問題 因為以前沒有研究過這方面的東西

總之wget/curl要連線到https/ssl的server上必須要有ca憑證 cacert.pem
wget --ca-certificate=cacert.pem url
curl --cacert cacert.pem url

接下來就是自動login的方法了

web server是用form post method讓使用者登入
wget --post-data="name=hello&pass=world" url
curl -d "name=hello&pass=world" url

由於登入資訊是用cookie紀錄 所以要將cookie儲存下來供爾後使用
[SAVE]
wget --keep-session-cookies --save-cookies file url
curl -c file url
[LOAD]
wget --load-cookies cookiefile url
curl -b cookiefile url

最後則是上傳檔案的關鍵了
wget只提供了plaintext的post method
還好curl對於multipart/form-data有特別支援
prefix@代表所要上傳的檔案
curl -F "name=hello" -F "passl=world" -F "file=@filename" url

附註一提: curl是一個snapshot url的工具
沒有辦法像wget一樣parse網頁內容並下載相關檔案

11/15/2008

仁俊婚禮

跑去花蓮參加仁俊的婚禮

特地去感受一下基督教台灣地區的婚禮儀式

感覺還蠻特殊的

或多或少可以感覺得宗教的力量 :P








搶新娘捧花是一定要的啦













亮晶晶的太魯閣號唷
花蓮到台北只要兩個小時!
Posted by Picasa

8/31/2008

漂流之島

作者: phenix (silence) 站內: phenix
標題: 漂流之島
時間: 2008/08/31 Sun 02:25:42

曾幾何時 這座小島只剩下一條聯外橋樑

島上的居民都十分依賴這座橋樑來對外聯絡

但是不知怎麼地 這座橋慢慢年久失修

居民們卻沒有察覺出橋樑即將崩壞的徵照

每日依然照常地享受這橋給他們的便利


一日 橋樑垮了

人們惆悵地站在岸邊望著大海

原來如此堅固的橋樑依舊經不起時間與海水的摧殘

唯一的橋樑斷了 就這麼斷了

這座島變成了一座漂流之島

漂流阿 漂流 最終消逝在大海的彼方


8/11/2008

Video Game Live

剛好同事有事無法參加 因而把票讓給我

所以我才有藉口參加這個電玩阿宅音樂盛會


很High的主持人 跟 很遜的中文翻譯


中場休息時間 有Loading Bar提示


照兩張Coser意思一下

電玩音樂會蠻有意思的, 重溫兒時美好的回憶, 也可以觀察到電玩的演進史

只可惜這場表演似乎不太吸引一般大眾, 座位大概只賣出7,8成吧

8/03/2008

變形金剛

身為一個阿宅 買幾隻變形金剛玩具也不為過吧 科科

Optimus Prime




Prowl



Where the hell is matt?



http://www.wherethehellismatt.com/

原來Matt Harding是美國人
之前是在澳洲做電玩設計師
2003年2月開始環遊世界
並成立了這個網站
讓他的朋友家人知道他到底流浪到哪了


我也想環遊世界 (流口水)

6/21/2008

不專業開箱文-鍵盤松果

自從按過機械軸鍵盤之後,驚為天人!

於是我就踏出了收集鍵盤松果的第一步

(p.s. 松鼠天性會收集松果,因此有人將收集品戲稱為松果)

今天特地跑去"金鍵盤"試打

我對於青軸的敲打感相當喜愛

不過由於小弟不是長輩,狠不下心買CHERRY

只好退而求其次購入今天的主角"DATACOMP DFK191CU-CH"

感想只有一個字 「爽」!





Google Developer Day 2008

G社大拜拜 之 戰利品:

  • T-Shirt一件
  • G筆一隻
  • G牌吊帶一條



3/15/2008

Cloud 阿太的喜宴

作者: phenix (silence) 站內: phenix
標題: [婚禮] 林雲太
時間: 2008/03/15 Sat 22:28:10

林雲太 交大資工學弟 樂陞科技同事

是個非常有趣的人 很容易與人相處

跟朋友在一起就像三歲小孩一樣地吵鬧打混

跟女友認識不到一年就步入禮堂

蜜月旅行是到法國自助旅行一個月

喜宴是由新郎打鼓&新娘玩keyboard來開場

開場後也不用什麼致詞 直接上菜

車子, 房子, 老婆 一次搞定 XD


祝這對新人永遠幸福美滿健康快樂 :)

--
�� Origin:  黎巴嫩花園˙玫瑰花的符咒  tybsd2.csie.nctu.edu.tw 
�� Author: phenix 從 237.254.192.210.dynamic.ttn.net 發表

1/27/2008

Re: Microsoft Interview Question

作者: Baudelaire (Sunnyvale) 看板: Oversea_Job
標題: Re: Microsoft Interview Question
時間: Sun Jan 27 06:41:54 2008

※ 引述《Baudelaire (Sunnyvale)》之銘言:
: 這題據強者我ebay的朋友說,Google在on-campus也問過他這題。
: Array Rotation
: You should be able to do this in less than linear time.
: Implement the following function, FindSortedArrayRotation,
: which takes as its input an array of unique integers that has
: been sorted in ascending order, then rotated by an unknown
: amount X where 0 <= X <= (arrayLength - 1). An array rotation
: by amount X moves every element array[i] to array[(i + X) %
: arrayLength]. FindSortedArrayRotation discovers and returns X
: by examining the array. Consider performance, memory utilization
: and code clarity and elegance of the solution when implementing
: the function.

基本上算是binary search的變形:

public static int FindSortedArrayRotation(int array[]) {
int begin = 0, end = array.length - 1;

while (end-begin>1) {

if (array[begin] > array[(begin + end) / 2]) {
end = (begin + end) / 2;
} else if (array[(begin + end) / 2] > array[end]) {
begin = (begin + end) / 2;
} else {
return (begin+end)/2+1;
}
}
return end;
}

: ----
: Partitioning
: Given an array of balls, which can be one of two colors (RED or BLUE),
: write a function that partitions the array in-place such that on exit
: from the function all the balls of the same color are contiguous. It
: does not matter whether the red or blue balls come first. The return
: value from the function is the index of the first ball of the second
: color. If there is only one color of balls in the array then the
: return value should be 0. It is not legal to change the color of a
: ball. They must be moved. Consider performance, memory utilization
: and code clarity and elegance of the solution when implementing the
: function.

算是quicksort裡面的in-place partition,也不會太難。


public static int Partition(Ball[] aBalls) {
int left = 0, right = aBalls.length - 1;
BallColor pivotColor = aBalls[0].Color();

while (left <= right) {
BallColor leftColor = aBalls[left].Color();
BallColor rightColor = aBalls[right].Color();

if (leftColor == pivotColor) && rightColor == pivotColor)
left++;
} else if (leftColor == pivotColor && rightColor != pivotColor) {
left++;
} else if (leftColor != pivotColor && rightColor != pivotColor) {
right--;
} else if (leftColor != pivotColor && rightColor == pivotColor) {
Ball tmp = aBalls[left];
aBalls[left] = aBalls[right];
aBalls[right] = tmp;

left++; right--;
}
}
return left;
}

--
Je t'aime,o capitale infame.
 Tu m'as donne ta boue et j'en ai fait de l'or.
 Charles Baudelaire 1821-67

http://wonderfultown.spaces.live.com/

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 76.21.111.81

12/08/2007

洛克人

動畫
http://tw.youtube.com/watch?v=NkWsdl5BLMQ

遊戲畫面
http://tw.youtube.com/watch?v=XmaltChJnV0

X-Japan版
http://tw.youtube.com/watch?v=GD3vOKUT0zg

涼宮春日版
http://tw.youtube.com/watch?v=Mpv0JA3l2UU

男聲合唱團
http://tw.youtube.com/watch?v=5I26HFvYs94


[衍生創作]
打不到的空氣人
http://tw.youtube.com/watch?v=JCS0YTcfjqI

沒破關不睡覺
http://tw.youtube.com/watch?v=7-wtScqZ9AE

這傢伙有要幫忙的意思嗎?
http://tw.youtube.com/watch?v=XvF-UlI2Duo


紅白機的洛克人真是兒時美好的回憶 (遠望)