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: …

Intro to Responsive Web Design

This weekend I was invited to have a remote presentation on Responsive Web Design with students from the Autonomous University of Queretaro (UAQ) in Mexico. Introductory concepts are presented in code, so you have the chance to apply them immediately. The video is in spanish. Happy coding.

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 …

Installing Java 1.6 on CentOS 6

Nowadays more and more Java applications require at least a 1.6 JVM to run. However, the default CentOS 6 repositories still take you to the 1.5 version. By following this step by step tutorial you’ll be able to get version 1.6 running on your system.

WordPress Snippets

As a WordPress developer I have collected / created / curated many snippets that I’ve used in my projects. I hope you find them useful.   General HTML / WordPress tags Get your template’s directory <link href=”<?php echo get_template_directory_uri(); ?>/style.css” rel=”stylesheet” media=”screen”>   Check if this is the home page <?php if (is_home()) { … …