PlayFramework – Java

So far I have really liked this concept. The only con is that some times is difficult to find full examples that use the latest version. Installing sbt We need sbt for compiling and running Play applications. brew install sbt@1 Executing a first application Check the tutorials page to see how to create a first …

Quick lessons on working with Java’s BigDecimal

Today I bring an example of the different results you can expect when using Java’s BigDecimal class. From instantiation to applying different arithmetic operations, it is important to understand how they affect the resulting instances. The following program shows different scenarios and results applied to BigDecimal’s. package test; import java.math.BigDecimal; import java.math.RoundingMode; public class Test …

Solution: Netbeans 8 not working on Ubuntu 15.10

Netbeans is one of my beloved day to day applications. Yesterday, when I installed Ubuntu 15.10 (Wily Werewolf) on my computer, Netbeans started to hang on the startup screen, specifically at the Loading Modules phase. It took me hours looking for solutions on the internet; and reinstalling different versions of the Java Development Framework didn’t …

Compiling and Debugging Oracle's Pro*C files in OS-X / Xcode

Part of my work as a Web/UNIX developer includes maintenance and development of tools using Oracle’s Pro*C. In text interfaces, VIM is a pretty decent tool for creating source code and their companion make files. If you created the right make file, compiling is also a breeze. However things get kind of tricky when you …

The Rationale behind the Creation of a Model-View-Controller Framework: Fantastic

Important: This is a work in progress document. The Model-View-Controller is a software pattern frequently used for web development. As its name states, it is composed by three components: A Model or domain representation of a problem. It receives commands, processes them and modifies its state according to the input provided. A View whose main …

Oracle Snippets

This post will be updated with snippets for Oracle. I hope you find it useful.   1. Change the default date format Most useful snippet of the year! 😉 ALTER SESSION SET NLS_DATE_FORMAT = ‘MM/DD/YYYY HH24:MI:SS’; select sysdate from dual; 2. Escape single quotes and ampersands on strings Single quotes: select ‘D”Angelo”s’ from dual; Ampersands: …

Create a connection to MySQL in Java

This time we are going to create a basic connection to MySQL in Java and pull some data from it. // Compile it: // javac Mysql.java // // Try it: // java -classpath mysql-connector-java-5.1.27-bin.jar:. MySQL import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Properties; public class MySQL { public Connection getConnection() throws …