Posts

AMD CodeXL: OpenGL and OpenCL Debugger and Profiler

Image
AMD CodeXL is a new tool for OpenGL and OpenCL developers. CodeXL includes a GPU debugger, a profiler for both GPU and CPU and offers OpenCL kernels analysis capabilities. CodeXL is available as a standalone application for Linux (64-bit) and Windows (32 and 64-bit). An extension for Visual Studio is also available. http://developer.amd.com/tools/hc/CodeXL/Pages/default.aspx

Android customized button

drawable/ return_btn.xml values/ style.xml Create drawable/return_btn.xml in drawable folder Create values/style.xml in your value folder Add ReturnButton style in your layout http://jp-lin.blogspot.tw/2010/12/android.html

SQLite

MesaSQLite可以幫助讀入及編輯*.sqlite 讀入已存在的sqlite private static final String DB_PATH = "/data/data/com.xxx.xxx/databases/"; private static final String DB_NAME = "xxx.sqlite"; SQLiteDatabase database = this.getReadableDatabase(); try { //Open your local db as the input stream InputStream myInput = ctx.getAssets().open(DB_NAME); // Path to the just created empty db String outFileName = DB_PATH + DB_NAME; //Open the empty db as the output stream OutputStream myOutput = new FileOutputStream(outFileName); //transfer bytes from the inputfile to the outputfile byte[] buffer = new byte[1024]; int length; while ((length = myInput.read(buffer))>0){ myOutput.write(buffer, 0, length); } //Close the streams myOutput.flush(); myOutput.close(); myInput.close(); } catch (IOException e) { throw new Error("Error copying database"); } ...

Chat List show/hide keyboard

_chatList.setOnTouchListener( new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { // TODO Auto-generated method stub ( //close keyboard (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow( _chatText.getWindowToken(), 0); //open keyboard ((InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE)).showSoftInput(chatText, InputMethodManager.SHOW_FORCED); return false; } }); http://stackoverflow.com/questions/1109022/close-hide-the-android-soft-keyboard

Head in the Clouds: The reasons of OnLive's failure

Image
OnLive的最高同時上線人數大概1800位,註冊用戶2萬人。但是OnLive每個月卻有五百萬美金的的服務開銷。想想每個使用者平均要花多少錢才能回本,這是一個失敗的business model。 錯誤的策略,這些console主機仍然是被玩家使用中的。OnLive卻仍想要賣服務給這些已經有主機的玩家。 網路頻寬問題: 許多註冊用戶被發現他們並沒有去依照OnLive的需求來升級頻寬。 如果你給一個人免費服務,他們會覺得這東西的價值是比較低的,遊戲主機的business model會運作的原因是當你購買了一台主機,用戶會想證明自己的投資是對的就會購買更多的遊戲。但對於OnLive的用戶因為沒花到錢,所以也不急著要付費投資他,包含去申請符合OnLive要求的網路頻寬。 OnLive的針對用戶是core gamer和搶先玩家。但是他們不會滿意OnLive的performance,包含lag和畫面失真等不可避免由於網路頻寬造成的結果。OnLive所提供的軟體不是最熱門最新的遊戲,這些核心玩家是不會有興趣的,反而這樣的服務會吸引casual玩家(對於最新遊戲或是購買最新硬體沒這麼熱衷的玩家),但這種玩家通常頻寬不會太好。 本身的硬體更新每次費用都會非常昂貴。 它不是console平台的掌握者,它沒辦法掌握硬體的升級,說服玩家只要用低規的硬體就可以遊玩高級的遊戲。 隨著Graphics processor越來越便宜和精巧,以及效能越來越好。越來越多輕薄的手機終將會超越現今的console,然後在家裡的TV上用它們遊玩高級遊戲。 當一切策略錯誤後,沒有將目標鎖定到專一特殊的領域。例如,Gaikai專精提供game demo服務。 Reference: http://www.gamesindustry.biz/articles/2012-08-24-head-in-the-clouds?utm_source=newsletter&utm_medium=email&utm_campaign=european-daily

Android: Async-Http library

Android Asynchronous Http Client A Callback-Based Http Client Library for Android http://loopj.com/android-async-http/ Http Send: // http send AsyncHttpClient _clientPost = new AsyncHttpClient(); RequestParams params = new RequestParams(); params.put( "type", "" + type ); params.put( "text", message ); if( CookieManager.getInstance().getCookie(HttpAPI.uriAPI) != null ) { String cookieStr = CookieManager.getInstance().getCookie(HttpAPI.uriAPI); _clientPost.addHeader( "Cookie", cookieStr ); } _clientPost.post( addr, params, new AsyncHttpResponseHandler() { @Override public void onSuccess(String response) { try { } catch (JSONException e) { } } }); Http Get: // http get AsyncHttpResponseHandler _responseHandler = new AsyncHttpResponseHandler() { @Override public void onSuccess(String response) { } }; if( CookieManager.getInst...

Build OGRE with dependency

Dependence file Updated 19 Aug 2012 is not work. Boost link error for OGRE 1.8 build http://blog.csdn.net/hackbuteer1/article/details/6597710