Want to be a Mac Developer? Well, OS X and Xcode makes it easy to start hacking your ideas into Apple applications. I started to ‘write’ a Hello World program using Xcode. In less than five minutes and no coding at all I was able to create what I had in mind: #import <Foundation/Foundation.h> int [...]
In a previous post I went over Groovy closures. In this post I will show how you can extend a Java class so as to use it to construct a closure in a Groovy script. I’ll start by defining a plain old Java class with an array of data. public class Sentence { public String[] [...]
Posted in Java, TechKnow |
I recently migrated one of our MySQL 3 databases to MySQL 5. I needed to export data from MySQL 3 and import it to MySQL 5. To export the data I had to do the following: mysqldump -u username -ppassword database_name > FILE.sql FILE.sql is just a ascii file with create and insert SQL statements. [...]
Posted in SQL, TechKnow |
When working with a database sometimes you will want to look up all the available database tables. To show the available tables in SQL Server you can do the following: select * from information_schema.tables; In Oracle you can use any of the following statements: select * from user_tables; select * from all_tables; In MySQL I [...]
Posted in SQL, TechKnow |
Many people might be familiar with the File class. You need a File object for many of Java’s IO operations. In this Class High Lite article I cover some of the File’s least known methods and fields. Please note that in all cases be sure to read the Java documentation, as it is the best [...]
Posted in Java, TechKnow |
One of the database vendors that my company supports is Sybase. We have a Sybase database which we hit from JUnit tests but every once in a while a Sybase specific JUnit test will just freeze. I found out that the JUnit test would freeze because the Sybase transaction log would fill up and need [...]
Posted in SQL, TechKnow |