Data Science with Java – Part 2: CSV data into charts

A nice java library called opencsv allows you to import the csv file content and make charts out of it. Let´s consider for example unemployment in Germany since the reunification. We will use a csv file containing year, amount of people in germany, west and east (four columns) 1991,2602203,1596457,1005745 1992,2978570,1699273,1279297 1993,3419141,2149465,1269676 1994,3698057,2426276,1271781 1995,3611921,2427083,1184838 1996,3965064,2646442,1318622 1997,4384456,2870021,1514435 […]

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

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