Java thread can be a native thread.
JavaScript is single thread.
Although Python thread is a native thread, but due to GIL, CPython can not leverage multicore hardware.
Read this:
http://www.dabeaz.com/python/GIL.pdf
or
http://fcamel-life.blogspot.tw/2010/03/multi-coremulti-thread-java-python.html
The next thing to find is how to do in JavaScript and Python.
Wednesday, June 13, 2012
Thursday, May 24, 2012
[vmware] how to enable network in windows7 or window8
To enable default intel network adpater in vmware player,
you have to manually modify the vmx file. Shutdown the system, add a line to the last of xxx.vmx:
Then in options tab, change "Guest operating system" to "Microsoft Windows" "Windows 7".
Network will be ok after restarting.
ethernet0.virtualDev = "e1000"And select "Bridged" in the network adapter option from GUI.
Then in options tab, change "Guest operating system" to "Microsoft Windows" "Windows 7".
Network will be ok after restarting.
Wednesday, June 29, 2011
android:launchMode
[Android] android:launchMode (standard、singleTop、singleTask、singleInstance)
http://jiunway.blogspot.com/2010/10/android-androidlaunchmode_26.html
standard, no reuse activity
singleTop, reuse activity if the same as the toppest activity
singleTask, reuse the same activity on the activity stack
singleInstance, reuse the same activity across multiple processes
http://jiunway.blogspot.com/2010/10/android-androidlaunchmode_26.html
standard, no reuse activity
singleTop, reuse activity if the same as the toppest activity
singleTask, reuse the same activity on the activity stack
singleInstance, reuse the same activity across multiple processes
Monday, April 11, 2011
[Android] ndk stl build
終於知道如何用ndk-build stl
doc中說可以在Android.mk[x]中設定變數, 不過不成功.
--> 原來是看錯檔名 應該是Application.mk才對
--> 加一個Application.mk就可以build
[x] 後來下在command中:
[x] ndk-build APP_STL=stlport_static
其中 APP_STL 可以有幾個選擇
system -> Use the default minimal C++ runtime library.
stlport_static -> Use STLport built as a static library.
stlport_shared -> Use STLport built as a shared library.
gnustl_static -> Use GNU libstdc++ as a static library.
gnu多了exception.
doc中說可以在Android.mk[x]中設定變數, 不過不成功.
--> 原來是看錯檔名 應該是Application.mk才對
--> 加一個Application.mk就可以build
[x] 後來下在command中:
[x] ndk-build APP_STL=stlport_static
其中 APP_STL 可以有幾個選擇
system -> Use the default minimal C++ runtime library.
stlport_static -> Use STLport built as a static library.
stlport_shared -> Use STLport built as a shared library.
gnustl_static -> Use GNU libstdc++ as a static library.
gnu多了exception.
Tuesday, January 18, 2011
[Android] remote debug android process
Wednesday, January 12, 2011
Android中的LIKELY和UNLIKELY
這篇解釋的不錯
http://blog.csdn.net/DroidPhone/archive/2010/11/03/5984255.aspx
if(LIKELY(exp)) 就是告訴compiler這個if branch較常執行, 可以針對他作優化
if(UNLIKELY(exp)) 相反則是以else branch為優化的對象.
http://blog.csdn.net/DroidPhone/archive/2010/11/03/5984255.aspx
if(LIKELY(exp)) 就是告訴compiler這個if branch較常執行, 可以針對他作優化
if(UNLIKELY(exp)) 相反則是以else branch為優化的對象.
Tuesday, January 4, 2011
[Android] Surface Flinger
article about SurfaceFlinger
Android Display System --- Surface Flinger
http://blog.csdn.net/yili_xie/archive/2009/11/12/4803527.aspx
Android GUI更新过程
http://www.limodev.cn/blog/archives/1582
Android中的FrameBuffer
http://www.limodev.cn/blog/archives/1586
Android Display System --- Surface Flinger
http://blog.csdn.net/yili_xie/archive/2009/11/12/4803527.aspx
Android GUI更新过程
http://www.limodev.cn/blog/archives/1582
Android中的FrameBuffer
http://www.limodev.cn/blog/archives/1586
Subscribe to:
Posts (Atom)

