2012年4月2日 星期一

Boot into text mode with Ubuntu 11.10

基本上是參考這篇,不過照著作不Work...
又看了這一篇,自己試了一下好像可以了,趕快筆記一下...

編輯 /etc/default/grub

arthur@ubuntu:~$ sudo vi /etc/default/grub
[sudo] password for arthur:

將下面這行
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
改成
GRUB_CMDLINE_LINUX_DEFAULT="text"

然後在把這行前面#拿掉
GRUB_TERMINAL=console  //text base grub menu


存檔後作 update-grub
arthur@ubuntu:~$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.0.0-17-generic
Found initrd image: /boot/initrd.img-3.0.0-17-generic
Found linux image: /boot/vmlinuz-3.0.0-16-generic
Found initrd image: /boot/initrd.img-3.0.0-16-generic
Found linux image: /boot/vmlinuz-3.0.0-12-generic
Found initrd image: /boot/initrd.img-3.0.0-12-generic
Found memtest86+ image: /boot/memtest86+.bin
done
arthur@ubuntu:~$

要啟動桌面的話輸入 startx  就可以了,不過不要desktop的話直接裝server版就好了...我好像多此一舉...

2012年3月20日 星期二

跨平台的APP應用程式框架

本來認為使用HTML + CSS 配合jQuery 就可以在前端應用方面打遍天下無敵手了~不過在行動裝置上的使用者體驗還是不夠好,加上無法和行動裝置的硬體(ex.相機)直接互動,總是不夠完美。

目前跨平台的APP應用程式框架有Titanium Mobile與PhoneGap 兩種,端看應用程式需求來選擇。
偏向遊戲開發有 corona 和 unity 可以選用。

不過目前開發的方向也還沒確定,所以先筆記一下...

參考資料
再談Titanium Mobile與PhoneGap的差異
從使用者角度看 Native app vs Web app

2012年3月17日 星期六

Hadoop

最近稍微看了一下Apache 的 Hadoop 簡單的說 Hadoop 就是雲端系統的架構。
然後發現產業界也蠻多公司在使用的,像是FaceBook 的內部系統就有兩組clusters

A 1100-machine cluster with 8800 cores and about 12 PB raw storage.
A 300-machine cluster with 2400 cores and about 3 PB raw storage.

一千多台的電腦組成的Cluster,想到就覺得很壯觀。

好奇查了一下台灣的使用情形,意外的發現TSMC有在用Hadoop而且還組成推廣小組,同時計畫要作 semiconductor manufacturing and engineering related applications.

2011年12月23日 星期五

強迫中止Scan32.exe

這問題困擾了一段時間,主要是公司的電腦在特定的時間會自動運行 scan32.exe.
CPU loading 是不高,不過佔用Disk I/O 非常嚴重~連要回個mail 都不行...

Google 一下後,發現用ntsd 可以Force Kill process.

指令如下:
@ntsd -c q -pn scan32.exe

弄完之後,終於可以回mail 了...

2011年11月25日 星期五

Siena 全文檢索的問題

最近使用Play! + Siena + GAE 時發現,作類似SQL Like 的Search 時,會傳回所有的資料...
在Stackoverflow 中的討論發現,Siena 由於GAE的限制,在這方面的實做有限...

http://stackoverflow.com/questions/6307841/how-does-siena-query-search-work

也就是支援文字完全相同的和結尾字串相同的比對...真的很雞肋...
就算使用JDBC也必須先手動建立Full text index...

所以看來還是JPA比較有彈性...

2011年7月22日 星期五

轉換程式碼為HTML

備忘一下~線上程式碼語法高亮產生器 - Online syntax highlighting
http://jsgears.com/thread-120-1-1.html

還有另一個網站也有
http://tohtml.com/java/

2011年7月6日 星期三

Play Framework 實驗筆記 5- 上傳到GAE

專案在本地端測試完成之後,接下來就把專案部署到GAE裡面去吧~

1. 先修改 N:\PlayFramework\play-1.1\members\war\WEB-INF\appengine-web.xml
將GAE設定的Application ID 和版本號填入
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
	<application>arthur201104</application>
	<version>1</version>
</appengine-web-app>

再將專案匯出成WAR目錄架構
N:\PlayFramework\play-1.1>play war members -o members.war

~        _            _
~  _ __ | | __ _ _  _| |
~ | '_ \| |/ _' | || |_|
~ |  __/|_|\____|\__ (_)
~ |_|            |__/
~
~ play! 1.1, http://www.playframework.org
~
00:44:41,359 INFO  ~ Starting N:\PlayFramework\play-1.1\members
00:44:41,390 INFO  ~ Module siena is available (N:\PlayFramework\play-1.1\module
s\siena-1.5)
00:44:41,390 INFO  ~ Module gae is available (N:\PlayFramework\play-1.1\modules\
gae-1.4)
00:44:42,187 WARN  ~
00:44:42,187 WARN  ~ Google App Engine module
00:44:42,187 WARN  ~ ~~~~~~~~~~~~~~~~~~~~~~~
00:44:42,203 WARN  ~ No Google App Engine environment found. Setting up a develo
pment environement
00:44:42,218 WARN  ~ Don't forget to define your GAE application id in the 'war/
WEB-INF/appengine-web.xml' file
00:44:42,218 WARN  ~
00:44:42,218 INFO  ~ Precompiling ...
00:44:48,218 INFO  ~ Done.

~ Packaging current version of the framework and the application to N:\PlayFrame
work\play-1.1\members.war ...
~ Done !
~
~ You can now load N:\PlayFramework\play-1.1\members.war as a standard WAR into
your servlet container
~ You can't use play standard commands to run/stop/debug the WAR application...
~ ... just use your servlet container commands instead
~
~ Have fun!
~


最後上傳至GAE,第一次上傳過程中需要輸入Google的帳號和密碼...
M:\appengine-java-sdk-1.4.3\bin>appcfg update N:\PlayFramework\play-1.1\members.
war
Reading application configuration data...
2011/7/6 上午 12:59:14 com.google.apphosting.utils.config.AppEngineWebXmlReader
readAppEngineWebXml
資訊: Successfully processed N:/PlayFramework/play-1.1/members.war\WEB-INF/appen
gine-web.xml
2011/7/6 上午 12:59:14 com.google.apphosting.utils.config.AbstractConfigXmlReade
r readConfigXml
資訊: Successfully processed N:/PlayFramework/play-1.1/members.war\WEB-INF/web.x
ml
2011/7/6 上午 12:59:14 com.google.apphosting.utils.config.IndexesXmlReader readC
onfigXml
資訊: Successfully processed N:\PlayFramework\play-1.1\members.war\WEB-INF\appen
gine-generated\datastore-indexes-auto.xml
Beginning server interaction for arthur201104...
0% Creating staging directory
5% Scanning for jsp files.
20% Scanning files on local disk.
25% Scanned 250 files.
28% Initiating update.
31% Cloning 252 application files.
33% Cloned 100 files.
34% Cloned 200 files.
40% Uploading 70 files.
52% Uploaded 17 files.
61% Uploaded 34 files.
68% Uploaded 51 files.
73% Uploaded 68 files.
77% Initializing precompilation...
90% Deploying new version.
95% Will check again in 1 seconds.
98% Will check again in 2 seconds.
99% Will check again in 4 seconds.
99% Closing update: new version is ready to start serving.
99% Uploading index definitions.

Update completed successfully.
Success.
Cleaning up temporary files...

M:\appengine-java-sdk-1.4.3\bin>


完成之後連到你在GAE設定的Application網址,就可以看見成果了~
http://arthur201104.appspot.com/basicmemberoperation/index


http://arthur201104.appspot.com/enhancememberoperation/index