|
|
Roger Cuddy - Posted on July 16th, 2011
Perl 5.10 added a new class of variables ‘state’ that are similar to ‘my’ in scope but are only initialized once. Even inside of a subroutine a state variable will only be initialized on the first call to the subroutine and will maintain it’s last value between calls. A simple example is the easiest [...]
Roger Cuddy - Posted on July 11th, 2011
JDK 7 has several enhancements to the try-catch construct. Try with resources allows for ensuring that resources are closed and freed up without the need to explicitly call the close function. Any class implementing java.lang.AutoCloseable can be automatically closed without the need for a finally section in the try block.
The syntax is a [...]
Roger Cuddy - Posted on July 9th, 2011
JDK 7 adds the ability to use String objects as the case in switch blocks. It’s not exactly an earth shattering addition but I find it quite useful in avoiding long if-then chains. Plus the release docs claim that using a switch is more efficient.
At the bottom of this post is a small [...]
Roger Cuddy - Posted on July 9th, 2011
Build 147 for JDK 7 is now available with the goal of a generally available release later this month. Some good resources are: Oracle’s Java 7 wiki Java 7 project page Get the release from the download page Oracle’s Java SE 7 documentation
As I test out the release I’ll do some posts on [...]
Roger Cuddy - Posted on July 8th, 2011
As of version 5.12 perl now supports using each with arrays and hashes both. For our pm project we should get in habit of using it. No need to rewrite any old code.
In practice it’s very much the same as use with hashes. each still returns 2 results with the first one being [...]
Roger Cuddy - Posted on December 6th, 2010
The question of how to do a local install of PERL comes up now and then. The truth is it’s quite simple if you have a normal set of build tools installed. GCC, make, etc. I will walk through the steps here on doing the build and install.
Decide where you wish to [...]
Roger Cuddy - Posted on November 11th, 2009
We’re still a bit undecided on whether to use the library website to post items intended only to the dev team. For now dev items will be posted on my SourceForge site and at Poor’s site both.
Poor and I have tried to structure the build process to minimize special requirements on any [...]
Roger Cuddy - Posted on November 9th, 2009
Can you really run a functioning WordPress blog on Source Forge’s user space? We’re going to find out. My first thought about installing was admittedly ‘this is going to hurt!’. Once setup it will be accessible at Rog’s SF Notes
<edit>The install went well. You can read about it at the follow up post [...]
Roger Cuddy - Posted on April 29th, 2009
Recently there have been several occasions where I have needed an application to use an embedded driver but also needed to allow for the occasional login to the database externally while the application is executing. Derby works wonderfully for this and starting a server within the application is exceedingly simple. Here I will give [...]
Roger Cuddy - Posted on February 17th, 2009
The Singleton Pattern is quite simple but at the same time extremely useful. If you have done any serious programming then there is a good chance that you have fudged the behavior into a class or forced a class to act as a singleton without knowing the pattern. In this very short article we will examine the common method to construct a singleton.
Continue reading Brief introduction to Java Singleton Classes
|
|