Java Call Center example: threads synchronization with Semaphore and CyclicBarrier

To learn about Java threads and concurrency I have decided to represent a Call Center. The customers making the phone calls to a call center can be represented as threads. To simulate the real world scenario I will use Semaphores and a Cyclic Barrier to simulate the standby situation. It´s a simple Producer/Consumer scenario. The […]

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 […]