Code, Strings, and Keys

    • About Thomas Powell
    • Account
    • It’s been [0] days since [program] last updated
    • Login
    • Password Reset
    • Pianist / Accompanist / Music Director Resume
    • Reading List 2025
    • Register
    • Running Gear – Shoes, Treadmill, and Bandages
    • Site Map
Illustration of a bird flying.
  • Link to Random Image Password Generation

    Captchas.net

    February 14, 2007
  • Reducing redundant code by wrapping JNI functions.

    My HelloWorldNative.c, with the “nativePrintObject” function reduced by wrapping the object and integer field retrieval: JNIEXPORT void JNICALL Java_helloworld_Main_nativePrintObject(JNIEnv *env, jobject ths, jobject wsv){ jint ipAddress; jstring jPageVisited; char *pageVisited; jstring jRefererURL; char *refererURL; jobject ipObject; ipAddress = getIntegerField(env, wsv, “ipAddress”); printf(” wsv.ipAddress = %d.%d.%d.%dn”, ( ipAddress & 0xff000000 ) >> 24, ( ipAddress &…

    February 10, 2007
  • Passing an object including java Objects to a C library.

    Very similar to including Java Strings:The passed object, WebSiteVisit: package helloworld;/**** @author thomas*/public class WebSiteVisit { /** URL of the web page that linked user to this one */ public String refererURL; public String pageVisited; public int ipAddress; IPAddress ipAddr; /** Creates a new instance of WebSiteVisit */ public WebSiteVisit() { } public WebSiteVisit(String referer,…

    February 10, 2007
←Previous Page
1 … 288 289 290 291 292 … 310
Next Page→

Code, Strings, and Keys

Proudly powered by WordPress