2012年6月1日 星期五

Set up a CloudStack development Environment

I. Set up the development environment
Following are a brief steps of setting up CS development Environment. For the detail steps, check Citrix document 132013.
  1. Install Java JDK.
  2. Install Apache TomCat. (Avoid Tomcat 6.0.35, since it has some problem with CloudStack).
  3. Install Apache ANT.
  4. Install git.
II. Use Eclipse to develop

Import CS src to Eclipse:
Since CloudStack uses Java, it's easier to use Eclipse to develop our own program. After done the first part, all we need to do is to import the CS source code to Eclipse. Check the importing source to Eclipse part of CloudStack document.

Import Eclipse preference:
CloudStack provides the Eclipse preference, just download the attachment in the article, and import it into Eclipse. File->import->General->Preferences->the download file location.

III. Errors in Eclipse:
After CS src was imported to Eclipse, there are many errors. most of them is because awsapi this project. 
awsapi project missed its Libraries. We just need to add the missed jars to it. The missed jars are in project deps/awsapi-lib. Add all jars in awsapi project, then lots of errors can be solved.

For other errors, still checking...

2012年5月30日 星期三

Install Openstack Swift.

References:
More information:

2009年12月23日 星期三

[Eclipse] eclipse 裡如何加變數?

Eclipse 裡要如何加 runtime 的 path 變數呢?
請先run 要跑的程式,當出現no XX in java.lang.path之後
點Eclipse的 Run->Run Configurations
在出現的視窗內,左邊欄位點一下剛才run的檔案名
右邊欄位點選 Enviroment的 tab
新增一個變數 PATH
注意: 變數名一定要是 PATH (大小寫有差!)
value 請填入 XX.dll 的絕對路徑,多個檔案間要加;
按下 apply
run
基本上就可以跑啦~

p.s 可以將要用的.dll 放在一個資料夾下,path下的value可以設成該資料夾的路徑
這樣就不用一個個設啦

[Eclipse] 執行出現no WiiuseJ in java.library.path 的錯誤

話說抓了某個大大所編寫的 headTracking code,高興的import進eclipse run
竟然出現下面的錯誤:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no WiiuseJ in java.library.path


試了加入windows user變數 -->失敗
最後是用 在IDE(eclipse) 裡設Run Configurations才解決

以下是步驟:
1. 先 run 出錯誤
2. 看錯誤顯示 xxx not in java.library.path
3. 猜檔名
linux -> libxxx.so
win -> xxx.dll
4. 把 xxx.so or xxxdll 的 path 加至 變數
5. 也可以建一個專用資料夾, 集中在一起, 加至變數(HOW?)
repeat 2~4 until no java.library.path problem

至於為啥在windows下設變數會有問題,目前只能猜是Eclipse會蓋掉PATH...
如果有大大有別的意見,也歡迎提出~

總之 祝大家跑程式成功

2009年7月27日 星期一

[Flash] Flash 支援影音格式

• WAV (Windows only)
• AIFF (Macintosh only)
• mp3 (Windows or Macintosh)

If you have QuickTime 4 or later installed on your system, you can import these additional sound file formats:
• AIFF (Windows or Macintosh)
• Sound Designer II (Macintosh only)
• Sound Only QuickTime Movies (Windows or Macintosh)
• Sun AU (Windows or Macintosh)
• System 7 Sounds (Macintosh only)
• WAV (Windows or Macintosh)

data from:adobe flash cs3 professional User Guide.

2009年7月20日 星期一

[Flash] 一個物件使用在不同影格

在練習 "Action Script 3.0 互動媒體設計" 單元二的練習時,要求增加相片淡出的功能,運用其所給的提示,製作一個白色矩形,並將其轉換成movie clip,命名為m_effect,並編輯m_effect物件,在其物件內將白色矩形轉變為透明矩形。
之再將m_effect直接加入多個影格內,執行後發現,只有第一張照片有淡出效果,之後都沒有。目前找出的解決方法如下:
為每個影格內的m_effect設定instance name
此作法是為確保每個影格內的m_effect是一個新的獨立物件。
另外一個想法是監聽按鈕在偵測到按鈕按下後,使m_effect回到第一個影格,此方法較為不好,使用此法會使m_effect受限於與按鈕的配合,使本身的再利用性降低。