Weekendul asta m-am jucat putin cu SDK-ul de Android. Ca test am facut o aplicatie pentru cautarea codurilor postale din romania, dupa adresa. Aplicatia poate fi descarcata de pe Android market de aici: Coduri Postale Romanesti . Aplicatia nu necesita conexiune la Internet, vine cu baza de date in ea (SQLite). Enjoy!
Could not create the Java virtual machine. error adding brasil.gov.br/brasil.gov.br.crt
If you are getting these kind of errors when you try to install java on debian under a virtual machine, then you perhaps need to increase the available memory.
How to programmatically dump the threads list of a running java process in bash
It seems that jdb cannot accept commands from command line, so we must use expect. I created the following expect script dumpthreads You can use it like: dumpthreads java_process_pid #!/usr/bin/expect set pid [lindex $argv 0]; spawn jdb -connect sun.jvm.hotspot.jdi.SAPIDAttachingConnector:pid=$pid; expect “>”; send “threads\n”; expect “>”; send “quit\n”;
How to convince the SmartGWT ListGrid to automatically fetch from the server only the data it displays
Since I was looking all over the net how to do this and I only found pieces of information, here is an example: [java] public class OperationsGrid extends ListGrid{ OperationsGrid(){ super(); TreeGridField accNoField = new TreeGridField(“accountNo”, 150); TreeGridField commentField = new TreeGridField(“comment”, 150); setFields(accNoField,commentField); setHeight100(); setWidth100(); setAutoFetchData(true); setAlternateRecordStyles(true); setDataSource(OperationsDS.getInstance()); setShowFilterEditor(true); } } [/java] [java] public…
MySQL Java SQLException error codes enum
Because I had this problem and I could not find a list of MySQL error codes on the Internet, I’ve decided to implement my own MySQL error codes enum. It is based on MySQL 5.1.35 sources, include/mysqld_ername.h file. Now I can do something like this: [java] catch (SQLException e) { if(e.getErrorCode() == MySQLExceptionCode.ER_DUP_ENTRY.getErrorCode()){ r =…
GWTpedia
As I started to look at GWT and its related widgets, tutorials and utilities, I thought that it might be an idea to put the information together into a Wiki site. This way, GWTpedia.com was born. Everyone is free to edit.
Word generator
Here is a python script to generate words using Markov chains. The archive also contains some dictionaries (English, Romanian, Romanian names). This is similar with http://www.fourteenminutes.com/fun/words/ but you have the possibility to use your own word dictionaries.
CentOS _dl_sysinfo_int80 deadlock
Are you using a CentOS or CentOS derived distribution and you experience deadlocks in dl_sysinfo_int80 function like this?: #0 0x00ace7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 #1 0x00cb248b in __read_nocancel () from /lib/tls/libpthread.so.0 #2 0x080bdf39 in el_push () #3 0x080bdfda in el_getc () #4 0x080bde50 in el_push () #5 0x080be11b in el_gets () #6 0x080a6f59 in…
Using libGD to manipulate jpeg images in C
Yesterday, for a small project of mine, I needed to implement a small utility to deform jpeg images from command line. The idea was to use texture mapping for deformations, so I needed a way to manipulate the jpeg images at the pixel level. The first thing I tried was the imagemagik utility. I’ve browsed…