有鑑於每次都要改 /etc/apt/source.list 很麻煩,所以我做了一份 for Linux Mint 13 的 Mirrors 菜單請大家品嚐(順便備份),如果有推薦的菜色也可以在下面留言或寄信給我,我再把它加進去。
2012年11月7日 星期三
2012年11月5日 星期一
解決 Mac OS X 無法儲存密碼的問題
升級到 Mountain Lion 之後,開始遇到一個問題:每個需要登入的程式一旦重開,就會要我再登入一次,就算勾選了「Remember Me」或是「Automatically login at next time」都沒有用。
我的 Mountain Lion 是 Clean install 的,爲什麼遇到這個問題我也不懂,可能是我同時有兩個 Mac OS X 並存的關係。
我的 Mountain Lion 是 Clean install 的,爲什麼遇到這個問題我也不懂,可能是我同時有兩個 Mac OS X 並存的關係。
2012年5月28日 星期一
自己編譯 Boot2Gecko 快速上手
B2G,Boot2Gecko 是最近 Mozilla 另外一個 Open Source 專案,將 Web 開發的相關技術帶回到 Mobile 的開發平台上面,用 HTML/CSS/JavaScript 等你所熟悉的 Web Technologies,就可以輕輕鬆鬆的開發 Mobile app,這個專案目前還在開發中,想要搶先體驗的朋友可以自己上去抓 B2G 的 source 自己 build。
Labels:
android,
b2g,
boot2gecko,
mozilla
2012年4月15日 星期日
[Erlang] 如何用format的方式產生字串
其實字串在Erlang中叫做List of chars,但是為了讓標題變得比較容易找到還是用通俗講法的字串,也就是string。
平常我們使用format字串的時機其實是在io:format/2的時候,這也是大多數Erlang書籍範例中會一直出現的,但是io:format/2其實只是一個可以把結果輸出stdout的function而已,並不能產生字串來處理或是存入變數,書籍上也鮮少提到說產生format字串的方式。
其實Document中還有一另外一個library叫做io_lib,裡面有個io_lib:format/2,用法跟io:format/2大同小異,唯一的差別就是他會return一個char list。
所以這時候就可以用下面這個statement:
StringData就會被存入一個format之後的字串了。
Original Link: How do you get the result from io:format into a string
Documentation Link: Doc - io_lib:format/2
平常我們使用format字串的時機其實是在io:format/2的時候,這也是大多數Erlang書籍範例中會一直出現的,但是io:format/2其實只是一個可以把結果輸出stdout的function而已,並不能產生字串來處理或是存入變數,書籍上也鮮少提到說產生format字串的方式。
其實Document中還有一另外一個library叫做io_lib,裡面有個io_lib:format/2,用法跟io:format/2大同小異,唯一的差別就是他會return一個char list。
所以這時候就可以用下面這個statement:
StringData = io_lib:format("~p~p", [StringOne, StringTwo]).
StringData就會被存入一個format之後的字串了。
Original Link: How do you get the result from io:format into a string
Documentation Link: Doc - io_lib:format/2
2011年9月26日 星期一
2011年8月12日 星期五
Build a pure Google App Engine environment on your Mac (virtualenv+PIL)
Update: this is unavailable for the current app engine SDK, will occur the cgi import error, the suggestion from experts is "do not use virtual environment with Google App Engine."
- Install Google App Engine at first (details at http://code.google.com/appengine)
- sudo port install py25-pil (this will install python2.5 and PIL)
- virtualenv --python=`python2.5` --no-site-packages appengine
- enable your virtual environment
- pip install PIL
that's all.
Labels:
appengine,
pil,
python,
virtualenv
2011年7月13日 星期三
在Vim中指定執行用的Ctags
Vim如果要使用taglist這個plugin,就一定要裝ctags(如果你是用Mac,那你就要裝py-ctags,也就是Exuberant Ctags),但是你可能會遇到這個問題,尤其在Mac下,就是Ctags回應illegal argument error,其實是因為Mac抓到內建的Ctags,我們必須要把它指定為我們新裝的Ctags。
訂閱:
文章 (Atom)