2011/11/26

Git ABC

Install Git on Mac
http://code.google.com/p/git-osx-installer/

Install Git on Windows
http://code.google.com/p/msysgit/

Git Doc
http://git-scm.com/documentation

Map on Android

A simple example:
http://developer.android.com/resources/tutorials/views/hello-mapview.html

About Drop a Pin to map:
http://stackoverflow.com/questions/6545027/how-to-drop-a-pin-on-google-map-and-how-to-get-current-address-in-dialog-box-on
http://stackoverflow.com/questions/3636702/how-do-i-drop-spots-on-google-map-in-an-android-app
http://stackoverflow.com/questions/2683287/drop-pin-on-default-google-maps-from-my-app-in-android

Find a location
http://androidcookbook.com/Recipe.seam?recipeId=1454

Find MD5 of my key:
keytool -list -keystore /Users/noguxun/.android/debug.keystore -alias androiddebugkey
The password is "android".

Sign the key:
http://code.google.com/android/maps-api-signup.html

Good Tutorial:
http://www.vogella.de/articles/AndroidLocationAPI/article.html

Distance:
http://stackoverflow.com/questions/3759680/android-how-to-detect-if-users-if-within-distance-of-geopoint-on-mapview
http://stackoverflow.com/questions/6283028/distance-of-two-geo-point-android

2011/11/22

Get Thread JNIEnv

This is an example shows how:

JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *jvm, void *reserved) { cached_jvm = jvm; /* cache the JavaVM pointer */ return JNI_VERSION_1_2; } static void Some_Function() { (*cached_jvm)->AttachCurrentThread(cached_jvm, &env, NULL); (*env)->MonitorEnter(env, callbackInst); jclass cls = (*env)->GetObjectClass(env, callbackInst); jmethodID id = (*env)->GetMethodID(env, cls, "callback", "(I)V"); (*env)->CallVoidMethod(env, callbackInst, id, (int)l); (*env)->MonitorExit(env, callbackInst); }

Post Code on Blogger

Simplest way to post code to blogger for me: <pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black;overflow-x:...