/var/log

Store mcrypt values from PHP in MySQL

The mcrypt functions return a binary string, so you can store it in a VARBINARY or BLOB field or as VARCHAR or TEXT if you first base64 encode it. When using the CBC (Cipher Block Chaining) mode, the input is divided into blocks of X bytes. The last block is then padded with NULL bytes […]

Android UI thread

I wanted to query a database on the onCreate method, but I ran into issues when doing this from another thread. First I tried to do it with the View.post() method, but it seems like the View is not always attached to the window, so the run() method of the Runnable was never called. Another […]