Donnerstag, 29. Januar 2015

Pointers to Functions with Swig

http://web.mit.edu/svn/src/swig-1.3.25/Examples/java/funcptr/index.html
http://stackoverflow.com/questions/4313004/registering-java-function-as-a-callback-in-c-function

http://stackoverflow.com/questions/12210129/how-should-i-write-the-i-file-to-wrap-callbacks-in-java-or-c-sharp

void* als jobject:
http://stackoverflow.com/questions/26110908/swig-typemap-java-object

Mocking singletons....


 public class LicenseDataLocator {
private static LicenseData licenseData;

    public static synchronized LicenseData getLicenseData() {
        if (licenseData == null) {
            licenseData = new LicenseDataLocator().readLicenseData();
        }
        return licenseData;
    }
   

// here you can insert your mock.
    public static void setLicenseData(LicenseData licenseData) {
        LicenseDataLocator.licenseData = licenseData;
    }

Donnerstag, 23. Mai 2013

Tips and tricks for little ubuntu admins



command line tools collection
hot : http://www.pixelbeat.org/scripts/


cleaning up your ubuntu installation:
http://typethinker.blogspot.ch/2013/02/uninstalling-old-kernels-in-ubuntu.html

uname -r; sudo apt-get remove $(dpkg --get-selections 'linux-image-*' | grep '\binstall' | head -n-3 | cut -f1)