ML in JAVA with WEKA (on Android)

WEKA can easily be used to perform some Machine Learning on Android. While developing a small project to classify data derived from wearables for activity recognition, I missed a short summary how to classify with WEKA on Android. (So this post serves as a memo to myself, or anyone who finds it usefull).

„ML in JAVA with WEKA (on Android)“ weiterlesen

CORS and NodeJS with Express

If you’re building an RESTfull API with NodeJS (and Express), you’ll probably need CORS.
Otherwise nobody will be able to user your public API via Browsers.
So this is important vor Third-Party JQuery, Angular, whatever… Clients.

With this small Piece of Code you could make your API public and answer the CORS (Preflight) Requests.

This small function can be used via:
var express = require('express');
var app = express();
app.use(allowCrossDomain);

Duff’s Device

Discovered some awesome piece of ANSI C Code using switch/case statements!

send(to, from, count)
register short *to, *from;
register count;
{
        register n = (count + 7) / 8;
        switch(count % 8) {
        case 0: do {    *to = *from++;
        case 7:         *to = *from++;
        case 6:         *to = *from++;
        case 5:         *to = *from++;
        case 4:         *to = *from++;
        case 3:         *to = *from++;
        case 2:         *to = *from++;
        case 1:         *to = *from++;
                } while(--n > 0);
        }
}

How is it working? Here’s the answer!

Managing Multiple WordPress Sites

If you have to manage different WordPress Sites at once, then you know how much time it could take to update around 20 blogs. WordPress supports since version 3.0 Site Networks. This WordPress feature is great, but has some limitations. So for example you have to run your Site Network on one Server. So I had to get something which allows me to manage blogs over different Webhoster. There are some Tools which can reduce the time to a get updates and that stuff to a minimum. „Managing Multiple WordPress Sites“ weiterlesen