-
Recent Posts
- Follow softwarecave on WordPress.com
Archives
- December 2021 (1)
- October 2021 (2)
- April 2018 (1)
- March 2018 (3)
- February 2018 (1)
- February 2017 (4)
- December 2014 (3)
- November 2014 (2)
- August 2014 (1)
- July 2014 (2)
- June 2014 (2)
- May 2014 (2)
- April 2014 (5)
- March 2014 (9)
- February 2014 (11)
- January 2014 (6)
- September 2011 (1)
Categories
Author Archives: Robert Piasecki
Default and static methods in interfaces in Java 8
Before Java 8 interfaces could only contain static fields (usually simple constants) and abstract methods. Java 8 provided the ability to define concrete (default and static) methods in interfaces. This new language feature is used extensively in Java core packages. … Continue reading
Database schema creation in JPA using SQL scripts
Recent versions of JPA provide a feature to automatically create the database objects (like tables, sequences or indexes), load initial data into database on application deployment; and also remove them after the application is undeployed. All that is needed is … Continue reading
Reading text file line by line in Java
Reading text files from hard disk is quite common task in software development practice. Usually we are interested in processing it line by line. In this article I would like to present few popular ways how to do it easily … Continue reading
Iterating through Java list backwards
The most natural method of iterating through a list in Java is to start from the first element of the list and then move forward until the last one is reached. While this is the most common, it is sometimes … Continue reading
Usage of serialVersionUID in Java serialization
Java run-time associates with each serializable class a special version number known as serialVersionUID. This number is later used during deserialization process to verify if the application which performed the serialization and the application which is doing the deserialization have … Continue reading
Creating executable jar file with Maven
Building an executable jar file with maven-jar-plugin is fairly easy. However, it has one disadvantage that the Maven dependencies are not packaged together inside the resulting jar file but have to be stored separately on the file system and added … Continue reading
Customizing HTML file input style
Styling an HTML file input control is very cumbersome and the number of available options is quite limited. Moreover, each web browser renders this control differently which makes it difficult to have consistent view of the application between browsers. Here … Continue reading
Primary key generation in JPA
Generation of primary key values is a very important functionality of relational database management systems. The main idea is to let RDBMS automatically calculate and assign primary key value to the row being inserted into the database table. This not … Continue reading
Charts with jqPlot, Spring REST, AJAX and JQuery
One of the most notable features of HTML5 is Canvas API which provides a rectangular region for custom drawing. There are several uses of it like: building games, image compositions, animations but this time we will see how to use … Continue reading
Accessing local files from a web browser using HTML5 File API
HTML5 introduced a standard interface called File API which lets programmers access meta-data and read contents of local files selected by a user. The selection is typically done using input element but the recent browsers also allow using drag and … Continue reading