ppk on javascript and blog
http://www.quirksmode.org/blog/
http://www.quirksmode.org/book/
fronteers 2010
—
http://phorum.study-area.org/index.php?topic=17120.0
ppk on javascript and blog
http://www.quirksmode.org/blog/
http://www.quirksmode.org/book/
fronteers 2010
—
http://phorum.study-area.org/index.php?topic=17120.0
心血來潮,把本來伺服器上 yum 裝的 PHP 換成 5.3.3 ,搭配 yum 安裝的 httpd 遇到一些小問題,都好解決,紀錄一下
yum install httpd-devel mysql-devel
./configure –with-apxs2=/install-path –with-mysql=/install-path
再裝就沒什麼問題了
然後就來寫一下
$curry = function($a) { return function($b) use ($a) { return $a+$b; } } $curry_add= $curry(1); echo $curry_add(2);// result = 3 ($curry(1))(2); //error
感覺學的跟 JavaScript 很像,又多了一些蠻麻煩的語法 (use),本身感覺又不像 Js 開發流程的輕便,感覺有點不太適合這樣寫..
有點怪..
這幾天裝了Android 2.2 的模擬器,想要裝個 market 來玩玩,結果挫敗連連…
ADB:可以連接模擬器的工具在android sdk tools 裡面,可以進 shell 還有一些額外的指令工具。
紀錄一下步驟…
模擬器與adb指令 http://xxlinxx.wordpress.com/
今日延燒至Linux Mint 中成功了…,因為被 Ubuntu 10.10 的 Eclipse 氣死了,原本主要的問題好像都是 push 完以後重開就都沒了,只是這次完全照著作就沒事了…嘆…
參考這篇回應的 http://anythingsimple.blogspot.com/2010/09/how-to-use-android-market-on-android.html
Linux Users
1. Create your avd using either terminal or gui. #建立一個 2.2 的 avd
A. Terminal – cd to the location of your SDK tools folder and run
./android create avd -n android-2.2 -t 7
B. Gui – run ./android from you SDK tools folder and make a new 2.2 virtual device
named android-2.2
*Note – Replace the 7 in the terminal with whatever 2.2 is for you. You can find out by running
./android list target
2. Copy the system.img from your sdk using the terminal or manually #複製 system.img 到你的 avd 資料夾下 ,不知道目的是啥,因為 system.img 好像設完後沒改變大小
Terminal – cp /home/USER/location of sdk/platforms/android-8/images/system.img ~/.android/avd/android-2.2.avd
3. Start the emulator using either the terminal or gui #開啟模擬器用指令的方式 才能設 partition-size 等下要 remount 用的
A. For terminal (Make sure your in your SDK tools folder) – ./emulator -avd android-2.2 -partition-size 96
4. After the emulator has fully started we need to pull build.prop (Open a terminal if needed and go to the tools folder) #把 build.prop 拉出來
A. Terminal – ./adb pull /system/build.prop
*Note – Open a new terminal or a new tab and cd back to the tools folder of the sdk.
5. Comment out ro.config.nochecking=yes from the file by putting a # in front of the line. # 把不允許登入 google 拿掉
A. Terminal – gedit build.prop
B. Save changes and exit
6. Push back the update build.prop # remount 後推回去
Terminal – ./adb remount
./adb push build.prop /system/build.prop
7. Get the custom rom linked above. Extract it to your desktop and rename the folder
to r21
8. Run the following commands in the terminal # 把 goole service 跟 market apk push 上去
./adb push ~/Desktop/r21/system/app/GoogleServicesFramework.apk /system/app
./adb push ~/Desktop/r21/system/app/Vending.apk /system/app
9. Remove the SdkSetup file #移除SdkSetup ? 有啥用
./adb shell rm /system/app/SdkSetup.apk
10. Finally stop the emulator and run these commands in terminal #砍掉幾個記憶檔
cd ~/.android/avd/android-2.2.avd
rm -R userdata-qemu.img userdata.img cache.img
11. Start up the emulator and you should now have the market! #重開吧 !去抓遊戲來玩…
模擬 update 列出會更新的檔案
svn merge –dry-run -r BASE:HEAD .
http://justaddwater.dk/2008/04/29/how-to-make-a-dry-run-with-svn-update/
svn color diff 有顏色
先安裝 colordiff 套件
svn diff --diff-cmd colordiff -x "-u -w -p" "$@" | less -R
http://www.zalas.eu/viewing-svn-diff-result-in-colors
http://stefaanlippens.net/color_highlighted_diffs_with_git_svn_cvs
RewriteEngine on RewriteCond $1 !^(index.php|images|robots.txt|assets|temp) RewriteCond %{REQUEST_FILENAME} ^/home/(.+)/www/(.+)/(.*) RewriteRule ^(.*)$ /~%1/%2/index.php/$1
RewriteCond %{REQUEST_FILENAME} ^(.*)$ RewriteRule ^(.*)$ index.php?%1