Getting started with Java Threads – Part 2 : join() and sleep()

The thread class provides some methods to define the threads behavior. Two important methods to consider are: – join(), to make the other instanced threads to wait for it to day. You can provide a timeout as parameter. – sleep(); The sleep() method throws a checked exception called “InterruptedException”,each time the thread receives an interrupt […]

Convert audiofiles on Ubuntu by the command line with soundconverter

If you need to convert audio files in another format you can use the tool called “soundconverter”, that you can simply install: ~$ sudo apt-get install soundconverter Then simply run a command like: ~$ soundconverter -b -m “audio/mpeg” -s “.mp3″ /home/laura/cd-wav/*.wav “-b” stands for batch type “-m” to specify the mime format. “-s” to specify […]

Install Apache web server on Windows

To install apache on Windows, you can download the binary from: Then you need to edit the httpd.conf file to change the path to the server root (SRVROOT). It should be something like: Define SRVROOT “C:\Users\laura\httpd-2.4.12-x86-r2\Apache24” If you are running Skype (that listens on the port 80), there will be a conflict In this […]

Wildfly Standalone clustering

To set up a cluster of standalone servers you have two possibilites: nodes running on different machine (horizontal scaling) or running on the same machine (vertical scaling). To make a wildfly standalone cluster with 2 nodes on the same machine you can follow the steps below: 1) copy the standalone folder and rename it to […]

Ubuntu 14.04 : NO_PUBKEY issue when running apt-get update

Launching sudo apt-get update you might get the NO_PUBKEY issue. Something like: W: GPG-Fehler: trusty Release: Die folgenden Signaturen konnten nicht überprüft werden, weil ihr öffentlicher Schlüssel nicht verfügbar ist: NO_PUBKEY EFD5FA852F20733F Well it´s very simple. Just execute the following (specifying the missing public key): [email protected]:~$ sudo apt-key adv – –recv-keys EFD5FA852F20733F And then […]

MySQL CHECK constraint alternative: triggers!

Yesterday I discovered the powerful hibernate check constraint (@org.hibernate.annotations.Check) , which can be directly added in your entity class like this: Unfortunately, as you can read in the official MySQL docs, “the CHECK clause is parsed but ignored by all storage engines”. Yesterday I found out that MySql 5.X doesn´t support the SQL CHECK constraint. […]