nosql 介紹

relational

http://www.docstoc.com/docs/2996433/Hadoop-and-HBase-vs-RDBMS

http://redmonk.com/sogrady/2009/11/03/amazon-rds-and-the-future-of-mysql/

http://www.eweek.com/c/a/Cloud-Computing/Amazon-Launches-Relational-Database-for-the-Cloud-865321/

nosql

http://oss-tw.blogspot.com/2010/04/hbase-vs-cassandra.html

http://inspire.twgg.org/c/internet/host-setting/written-discussion-nosql-database.html

http://www.javaworld.com.tw/roller/ingramchen/entry/consistency

http://zh.wikipedia.org/zh-tw/Cassandra

??

http://db.apache.org/derby/index.html

http://cloudstoragestrategy.com/cloud-database/

http://www.hellodba.net/2010/02/cassandra.html

hbase vs cassandra
http://www.roadtofailure.com/2009/10/29/hbase-vs-cassandra-nosql-battle/

從比較優劣的角度來描述雙方的優缺點,安裝、使用性、架構等等

PHP 5.3.3 Closure

心血來潮,把本來伺服器上 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 Emulator market 大戰

這幾天裝了Android 2.2 的模擬器,想要裝個 market 來玩玩,結果挫敗連連…

ADB:可以連接模擬器的工具在android sdk tools 裡面,可以進 shell 還有一些額外的指令工具。

紀錄一下步驟…

  • 裝好 SDK 建立一個 AVD
  • 搬出有中文名稱的使用者的資料夾…修改對應的 avd.ini 改成搬出去的其他位置
  • modaco 網站 下載 G1 2.2 映像檔,裡面有實際執行環境的一些映像檔 跟 rootfs ,好像有很多版本會更新
  • 透過 adb remount 後才可以 push ~
  • 從映像檔裡面拿出並安裝 Market 到模擬器上
    • adb push source target
    • GoogleServicesFramework.apk (Google服務 )
    • Vending.apk (Market)
    • 設定 build.prop 不允許 checkin 註解掉 ( pull 再 push )
    • 重開會不見…不知道為啥
  • 失敗,不能登入
    • adb logcat 看到 => com.android.vending.api.FatalCommunicationException: Sent a bad request
    • 這位大大 有很詳細跟類似的錯誤與解決 有點太複雜…
  • 改用 adb install Vending.apk 跟 GoogleServicesFramework.apk
  • 重開不會不見
  • 成功登入
  • 失敗
  • 不能下載…
  • 絕望…
  • 發現我好像連 reboot 都有問題

模擬器與adb指令 http://xxlinxx.wordpress.com/

中文 http://blog.23corner.com/2010/06/17/%E5%9C%A8-android-emulator-%E4%B8%AD%E4%BD%BF%E7%94%A8-android-market-%E7%9A%84%E6%96%B9%E6%B3%95/

英文 http://www.howtogeek.com/howto/21862/how-to-enable-the-android-market-in-the-google-android-emulator/

g1 2.2 映像檔 http://android.modaco.com/content/google-nexus-one-nexusone-modaco-com/317849/22-oct-r24-modaco-custom-rom-desire-port-for-nexus-one-with-online-kitchen-2-2-froyo/

今日延燒至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! #重開吧 !去抓遊戲來玩…