免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2011年9月22日 星期四

php on GAE

GAE: Google App Engine 的縮寫 

PHP: 本來是 Personal Home Page 的縮寫,
後來俺不知為了啥, 它就變成了PHP: Hypertext Preprocessor 的縮寫, 
這種縮寫稱為 Recursive Acronym ...

GAE 目前只支援 Python, Java , Go, 想要在GAE 上跑 php 
必須先將php 轉成Python 或 Java ?

在網路上找到Quercus (php engine in java , caucho.com 這家公司作的?) 
i.e.  php ->java -> GAE
....

[try]
照著[ http://raivoratsep.com/42/running-quercus-php-on-app-engine ]的步驟
使用MyEclipse成功的 在 local 端建立 myApp
瀏覽 http://localhost:8888 就會正確顯示 phpinfo; 

但是將war 上傳到GAE之後, 
瀏覽 http://myappid-xxxxx.blogspot.com, 
出現 HTTP Server Error 500, 
"
Error: Server Error
The server encountered an error and could not complete your request.
...
"

使用的程式庫版本為 appengine-java-sdk 1.5.3, quercus resin 4.0.22, MyEclipse9.1 ...


//===
[ http://www.webdigi.co.uk/blog/2009/run-php-on-the-google-app-engine ]
[ http://php-apps.appspot.com ]
均提供了phpOnGAE 的範例程式
試著將www.webdigi.co.uk 提供的war, 
修改appengine-web.xml 上傳到自己的app-id 
可正常顯示phpinfo ! 
有鬼?




[ref]
http://en.wikipedia.org/wiki/Recursive_acronym



2011年9月16日 星期五

Google App Engine Try

Google App Engine 目前支援3種語言 : Go, Java, 與 Python.
但是 Go 目前只能在Linux/Mac 的環境下跑 , 而且需要Python 2.5


[ref]  http://code.google.com/appengine/docs/go/gettingstarted/devenvironment.html
『...
 The Go SDK uses slightly modified versions of the development tools from the Python SDK,
and will run on any Intel-based Mac OS X or Linux computer with Python 2.5.
...

//===
Python  只聽過正妹的一次課
//=== 所以 只好試試 appengine-java
0. 下載Java6 (runtime or jdk?)
1. 下載Eclipse3.6 (Helio)
2. 透過Eclipse Software Update 下載 App Engine SDK
或者
單獨下載App Engine SDK(事後還要透過Eclipse -> Configure SDK->告訴Eclipse, App SDK裝在何處 )
3. 透過Eclipse 下載  Google Plugin for Eclipse


高人建議直接試用 MyEclipse (內含Java), 不過頗肥, 整個下載要超過900MBytes ...
 MyEclipse 目前最新版是9.1 , 基本上是把Eclipse 3.6及其相關的資源打包,
有個Configuration Center -> Software -> ...

循著 Getting Started [ http://code.google.com/appengine/docs/java/gettingstarted/installing.html ]
逐步走
  • Creating a Project
  • Using the Users Service
  • Using JSPs
  • Using the Datastore
  • Using Static Files
  • Uploading Your Application

終於得到個人的第一個 Google App
http://lottery-assistant.appspot.com/
雖然名稱叫 lottery-assistant
其實還是Google 提供的 guestbook  範例



//=== 許多人推崇的GWT
GWT (Google Web Toolkit) :  translate Java to [Html/Javascript + CSS]


//=== 過程中必須修改的組態檔
war/WEB-INF/web.xml
war/WEB-INF/appengine-web.xml
war/WEB-INF/logging.properties


//===  MyEclipse 的 Google Deploy  似乎還不太靈光 ?
To upload the app by Windows Command console,
appcfg.cmd update "C:\Users\username\Workspaces\MyEclipse 9\Guestbook\war"

..\appengine-java-sdk\bin\appcfg.cmd update war

-->
"C:\Users\eric\AppData\Local\MyEclipse\Common\plugins\com.google.appengine.eclipse.sdkbundle_1.5.3.r36v201108301710\appengine-java-sdk-1.5.3\bin\appcfg.cmd" update war


[ref]
//===
http://code.google.com/p/google-app-engine-samples/
http://code.google.com/appengine/docs/java/gettingstarted/installing.html
https://appengine.google.com/start
http://code.google.com/appengine/downloads.html
http://code.google.com/eclipse/docs/install-eclipse-3.6.html

單獨下載Google AppEngine SDK
http://googleappengine.googlecode.com/files/appengine-java-sdk-1.5.4.zip
//=== The Google Plugin for Eclipse, for Eclipse 3.6 (Helios):
http://dl.google.com/eclipse/plugin/3.6

2011年9月14日 星期三

露天拍賣 登入有問題?

明明覺得密碼沒打錯 卻沒能成功登入
跳出「請正確的點擊登入按鈕」的視窗
本以為久沒用 帳號/密碼記錯了
就按下忘記密碼 ...

露天不再以簡訊傳送驗證碼
改採讓用戶撥打一個臨時的號碼(0809053899?)
作為驗證 (本島免費?)

通過驗證後 即在網頁上顯示一組新密碼
貼上新密碼 還是不能成功登入 !


網搜...
原來顯示比例放大後((人得服老...)
露天拍賣的登入按鈕會跑位
所視非所得 ...

[try]
IE8 -> View -> Zoom -> 100%
或者IE8 視窗右下角將顯示比例調回 100%


[ref]
http://forum.ruten.com.tw/replylist.php?article=4934687

Google+ 的Post

在Google+ 的串流(Stream)上可以發表(Post) 文章/相片/影音...
Post 可以分享(Share) 給指定的圈子(Circle)或個人 [直接在Share的輸入盒中打入email]
可是指定的圈子/個人 並不會收到 email "notification" ...

網路上找了好久 終於發現原因
在Share時 必須要 "mention" , 對方才有可能收到email "notification" ,
那 如何 "mention" 對方呢?在Share的輸入時先打+號 再打入email ?

如果要 "mention"一整個circle呢 ?

*** 將滑鼠停在Share輸入盒中該circle/個人 直到 "Notify" 提示盒出現
打勾即可



『...
By submitting a public post, none of your contacts will receive email notifications.
...
If you want people of a certain circle get notified by email then while writing the message, pause the mouse on it and enable the option Notify Circle.
...



[ref]
http://www.nichewp.com/google-plus-secret-commands.html