原创 Android: call to OpenGL ES API with no current context (logged once per thread)

When I open a WebView in one thread and want to draw somehting in another thread, maybe they conflict when use the open

原创 Cocos2d-x學習筆記

Cocos2d-x學習筆記 A. Severalimportant concepts。 Director: run backward, manage the all the scenes in the game like repl

原创 Codeforces Round #134 (Div. 2)B. Airport

由於人數不多,可以利用優先隊列。每次(每個人)選擇座位最多或最少的飛機。 時間複雜度:O(n*logm) 由於當時某個地方少輸入了一個分號,導致編譯器提出各種error,導致我很長時間以爲是自己的優先隊列寫錯了,耽誤了很久,導致第二題拿的

原创 vs2008一個著名的bug:error C2471: cannot update program database vc90.pdb

轉自:   http://hi.baidu.com/%BC%C7%C2%BC%B5%C4%BF%D5%BC%E4/blog/item/d9af9b8170d6269bf703a6fb.html 把一個VC6的工程轉換爲VS2008的工程

原创 Win7+Eclipse+Android+NDK+Cocos2dx

Feature: A. do not need cygwin. B. we could set breakpoint and debug the native C++ part code in Eclipse.   System and

原创 Eclipse配置NDK編譯Android工程

最近跟同事發現可以更簡單的配置Android開發環境。 要用eclipse編譯C++用到Android中只需要簡單幾步。 1.下載安裝Java環境:http://www.oracle.com/technetwork/java/javase

原创 關於Only the original thread that created a view hierarchy can touch its views的解決方案

轉自:http://www.cnblogs.com/king_dy/archive/2010/11/27/1889444.html         我表示很頭疼,碰到這個問題,絲毫不曉得哪裏出了問題。但問題必須得解決,硬着頭皮一點一點試,

原创 關於腳本

主要內容是關於腳本對文本的解析,都是些很實用的東西,涉及了很多先進的網絡方面的技術。先把名詞列出來:HTML,XML,JSP(JavaSeverPage),LSP(LuaSeverPage),Javascript,Lua,PHP,Seve

原创 使用cocos2d-x編程debug記錄

Debug Records 1.      Error when read data from xmlfile? Trace it I find: In file CCSAXParser.cpp          intresult

原创 Codeforces Round #134 (Div. 2)C. Ice Skating

並查集。 這麼久沒做題了,竟然快速的敲了個並查集出來還是蠻爽的。 這個題目我是把能夠彼此到達(中間可以通過其他點)的那些點歸納到一個集合中,最後統計集合的數目,需要新加的點就是集合的數目減1。 有個地方需要證明,就是不存在添加一個點可以同

原创 Codeforces Round #134 (Div. 2)A. Mountain Scenery

暴力。 #include <iostream> #include <string> #include <algorithm> #include <cmath> #include <map> #include <set> using na

原创 Cocos2dx內的座標系(Coordinate Systems In Cocos2dx)

窗口座標系:即openGL座標系,左下角爲原點,向右是x正方向,向上是y正方向。 紋理座標系:左上角爲原點,向右是x正方向,向下是y正方向。在使用圖集時,例如截取其中的某個矩形塊來創建一個sprite會用到此座標系。 Window Co

原创 VS2008下cocos2d-x工程配置

Cocos2dx Project settings in VS2008: First we should build the libcocos2d, because we will use the outputof the libco

原创 HDU1144 Prerequisites?

我承認我不是故意刷水題的,主要是難題都不會做了,熱熱身先。。。 本題:由於數據不大,加一個flag數組標記是否已選課程。然後,挨個檢查每種課程選的課數夠不夠就可以了。複雜度:O(m*c),10^4。 #include <iostream>

原创 ANDROID關於亮屏和暗屏還有解鎖的監聽事件http://blog.csdn.net/muskmelon123/article/details/7522023

轉自:http://blog.csdn.net/muskmelon123/article/details/7522023 package com.lock.muskmelon; import java.util.Timer; impo