sox -n -c1 -t alsa default synth 5 sine 200
產生 200HZ 5秒鐘
sox -n -c1 -t alsa default synth 10 sine 100-1000
產生 100HZ~1000HZ 10秒鐘
sox -n -c1 -t alsa default synth 5 sine
產生 middle C(440HZ) 5秒鐘
sox -n -c1 -t alsa default synth 10 sine %0-%7
產生整個 middle octave 8秒鐘
sox -n -c1 -t alsa default synth 10 sine %-7-%7
產生橫跨兩個 octave 8秒鐘
4/22/2009
sox 的用法
4/16/2009
4/09/2009
SF4 絕招尻不出來....
好久沒玩格鬥遊戲, 很興奮地買了SF4 才發現我是肉腳, 跟電腦玩只能打到第四關,
開network match後, 被陌生人踢館踢好玩的, 對決了十次只有贏一次. 我看過一陣子會忍不住去買大搖桿.
其實不應該買這片的, 只是覺得PS3放在客廳都是老弟在玩, 該弄片自己想玩的遊戲,
那為什麼當初要買PS3呢? 我也想不起來, 我好像看完IBM的Cell簡報, 大大讚嘆這是全世界最先進的處理機架構,
開始幻想在上面開發軟體...剛好又有人抽獎抽到PS3, 出個二手價, 我覺得不貴就買了.
4/01/2009
取得struct內個別 member資訊
有offsetof()可以取得member offset, 另外要取得member size也不難, 以下列macro即可
#define lengthof(s,m) ((size_t) sizeof(((s *)0)->m))
backtrace without gdb
http://anndymaktub.blogspot.com/2009/02/stack-backtracing-inside-your-program_23.html
透過backgrace & backtrace_symbols 這兩個function.
殘念, uclibc好像不支援耶...
3/25/2009
ubuntu經常無聲
* /etc/init.d/pulseaudio stop 之後pulseaudio server仍然還在 根本沒有消失
* 可以強制用kill -9 殺掉pulseaudio
* 我用下列指令搞定
>asoundconf list
Names of available sound cards:
Intel
SAA7134
> asoundconf reset-default-card Intel
> asoundconf set-default-card Intel
* 接下來, 查看 /home/timwu/.asoundrc.asoundconf 應該要有內容
* 沒有pulse, 直接對Intel輸出仍可達到multiple audio stream 混音,
* 啟動pulse可以用asoundconf set-pulse
3/10/2009
李小龍的重訓
--------------------------------------------------------
Bruce Lee - Wikipedia, the free encyclopedia
Physical fitness and nutrition
Lee felt that many martial artists of his day did not spend enough time on physical conditioning. Bruce included all elements of total fitness—muscular strength, muscular endurance, cardiovascular endurance, and flexibility. He tried traditional bodybuilding techniques to build bulky muscles or mass. However, Lee was careful to admonish that mental and spiritual preparation was fundamental to the success of physical training in martial arts skills. In his book The Tao of Jeet Kune Do, he wrote
Training is one of the most neglected phases of athletics. Too much time is given to the development of skill and too little to the development of the individual for participation." "JKD, ultimately is not a matter of petty techniques but of highly developed spirituality and physique.[44]
The weight training program that Lee used during a stay in Hong Kong in 1965 at only 24 years old placed heavy emphasis on his arms. At that time he could perform bicep curls at a weight of 70 to 80lbs for three sets of eight repetitions, along with other forms of exercises, such as squats, push-ups, reverse curls, concentration curls, French presses, and both wrist curls and reverse wrist curls.[45] The repetitions he performed were 6 to 12 reps (at the time). While this method of training targeted his fast and slow twitch muscles, it later resulted in weight gain or muscle mass, placing Bruce a little over 160 lbs. Lee was documented as having well over 2,500 books in his own personal library, and eventually concluded that "A stronger muscle, is a bigger muscle", a conclusion he later disputed. Bruce forever experimented with his training routines to maximize his physical abilities, and push the human body to its limits. He employed many different routines and exercises including skipping rope, which served his training and bodybuilding purposes effectively.[46]
Lee believed that the abdominal muscles were one of the most important muscle groups for a martial artist, since virtually every movement requires some degree of abdominal work. Perhaps more importantly, the "abs" are like a shell, protecting the ribs and vital organs.
He trained from 7 a.m. to 9 a.m., including stomach, flexibility, and running, and from 11 a.m. to 12 p.m. he would weight train and cycle. A typical exercise for Lee would be to run a distance of two to six miles in 15 to 45 minutes, in which he would vary speed in 3–5 minute intervals. Lee would ride the equivalent of 10 miles in 45 minutes on a stationary bike.[47]
Lee would sometimes exercise with the jump rope and put in 800 jumps after cycling. Lee would also do exercises to toughen the skin on his fists, including thrusting his hands into buckets of harsh rocks and gravel. He would do over 500 repetitions of this on a given day.[48]
2/26/2009
2/23/2009
computeSpectrum on microphone
唉, 殘念, computeSpectrum不能對microphone.
不知道為什麼adobe為什麼要鎖這個地方, security concern? DRM issue? Adobe's online music plan on it?
從網路上提問的踴躍程度看起來, 這個功能若一開, 一狗票音樂惡搞創作網站會出籠.
2/20/2009
2/19/2009
scim freezes gnome-terminal
但是這會對工作流程中斷不流暢, 到今天才發現是scim 的問題, 輸入法改用gcin就好了
2/15/2009
2/06/2009
2/01/2009
auto-exposure lock
基本精神: 先測光, 然後重構圖(meter then recompose), 主物件不在圖中央的時候好用
操作方式: 除非太久沒動相機, 相機進入睡眠模式, 不然, 不需要按任何按鈕, 相機自己隨時都在測光, 可以看到光圈值與快門值一直跳動,
遇到想要的值, 就先按住AE-L, 值就被鎖定不會再跳, 然後移動鏡頭重新構圖, 最後按下快門鍵.
限制:
1. 在M模式無效(廢話..)
2. 最好調成點測光或中央測光( spot or center-weighted metering), 為什麼matrix 測光結果不適合lock, 說明書上並沒有說.
3. 由於scene mode時通通強迫用matrix metering, 且2, 所以在scene mode 的時候用AE-Lock意義不大,
疑問:
1. 這跟半暗快門鍵(half-press shutter-release button)再構圖差在哪裡?
answer: 不一樣, 半暗快門鍵只會對焦後鎖定焦值, 並不會鎖測光值, 你可以試試看半暗快門鍵後移動鏡頭, 快門值與光圈值仍然會改變
Mobile01 Nikkor AF 50mm F/1.8D愉快入手
照這裡的討論, 銳利度方面, F5.6 = F2.8 > F2 > F1.8
我真的有點白痴, 這顆便宜大碗鏡用那麼久才發現, 之前還不解為什麼人像模式只幫我開到F2.8, 自己硬是調到A模式開F1.8 出來用,
1/31/2009
Submit Your Geo Content to Google - KML - Google Code
google map 裏面可以建立並分享地標, 但是建立方式,只能在地圖上一個個手動重標, GPS 紀錄出來現成的地標檔 KML/KMZ, 我目前找不到簡單的方法上傳, 現在只找到這個方法, 感覺仍然有點麻煩.
1/30/2009
1/23/2009
iphone在台灣只發揮了1/2
iTunes在北美可下載完整的音樂及電影影集先不說, 那邊的在地化服務還真是完整啊
是apple派人在全美各地建置這些系統, key這些地標資料嗎? 當然不是,
全都是因為iphone內建GPS, 賣得量夠多, 且開放appstore, 大家開始願意搭順風車.
呵, 覺得很有趣, 之前聽 location based service 喊了老半天,
GPS製造商搞不起來
手機製造商搞不起來,
晶片製造商更是無能為力,
竟然連 operator 也搞不起來(該怪他們不努力, 還是滿天機導致服務計劃難以實施? 我看是封閉自大怠惰心態居多)
最後仍靠偉大apple 搞定!
說真的, 這 28000 我覺得花得很值得, 一點都不貴! 在上面可以玩的東西, 遠遠超過過去買的任何一種消費性電子產品.
----------------------------------------------------------------------------------
http://www.mobile01.com/topicdetail.php?f=383&t=912279&last=10025516
我覺得這應該就是台灣人對 iPhone 最大的誤解...
有兩句話~ 不曉得您能不能分辨他的不一樣~
你想去哪裡? Where to Go <= Gamin 的經典用語, 我車上有一台
跟你想去的是什麼地方? What place are you going to ?
GPS 導航只能夠告訴你~ 你要去哪裡!!
但是 iPhone 卻能夠告訴你~ 你要去的是什麼地方!!
我給幾個例子:
找加油站!!
iPhone 不只給你最近的加油站, 他還給伱每間加油站最新的油價~
以加拿大是浮動油價~ 每天的油價就像股票一樣大漲大落的... 這就超有用的!!
看電影:
iPhone 告訴妳現在有什麼電影可以看!!
不知到好不好看嗎!? 點進去可以看評語, 簡介, 不夠那電影的預告片可以看!!
選定了!!??
iPhone 不只告訴我, 我附近的電影院在哪!! 還告訴我那間電影院這部電影的放映時間!!
不想趴趴走!?
那 iPhone 可以告訴我離我最近的電影院有上映什麼電影, 還有他們的放映時間!!
找餐廳!?
iPhone 先幫你定位你在哪裡~~
選定好你的喜好
找到你要的餐廳, 你可以再看看~ 其他人或是報章雜誌對這間間餐廳的評語 + 評分
這樣子比較不會去踩掉地雷~~
不然還可以上他們的網站看看...
還有很多功能不能夠一一介紹....
是的 iPhone 很多功能都需要網路... 沒有網路 iPhone 大概會被廢掉一半的武功~~
我一點都不會想拿 iPhone 來當車上的導航!! 車上的導航我交給長駐在車上的 Garmin!!
iPhone 幫我找到我想要去的地方......
之後我會把導行的責任轉交給 Garmin... 他帶我到我要去的地方...
如果我沒有開車... 一個人在 Downtown 晃 iPhone 的導航就超讚了....