PROGRAMMINGScoping can be thought of as “the extent of information hiding.” In other words, scoping tells you where variables and methods can be seen from. Java has a neat approach to this that is both expressive and organized. All variables are associated with a scope. Any single scope can be called a namespace. The use
By Joe Purcell
September 06, 2011
PROGRAMMINGOne of the powerful features of the PDF file specification is the support for transparency in the Canvas. When an image is drawn on the page, the image can have an alpha setting which defines how transparent the image is. The value is between 0 and 1 (where 0 is totally invisible and 1 has
By Mark Stephens
August 16, 2011
PROGRAMMINGAnti-aliasing is the processes of making the edges of lines on shapes or text less jagged. This is done by fooling the eye – intermediate pixels are added to smooth the color transition. So you might add some grey pixels between a black and a white point. It is very common in computer applications and
By Mark Stephens
August 02, 2011
PROGRAMMINGAccess to PDF files can be secured so that not anyone can open them. This is achieved by encryption – the bytes int PDF file are actually scrambled using a unique key – you will need a key to convert the PDF data back into something which can be opened. This is a clever way
By Mark Stephens
July 19, 2011
PROGRAMMINGOne great question on StackOverflow is essentially, “What is method overloading for?” Method overloading, or function overloading, is a feature in some programming languages that allows multiple methods to be made with the same name, but each able to handle different types of input. Method overloading can add expressiveness, conciseness, and awesomeness to any script.
By Joe Purcell
July 07, 2011
PROGRAMMINGWe have a few different examples packaged up in JPedal that can be started by setting system properties with the -D flag from the command line. I thought it would be interesting to get these to run in the same way as you expect other programs to run with installers, continue buttons and all that good stuff. In this article I’m going to package up JPedal with a view to run the ContentExtractor example.
If you want the ContentExtractor to run from the command line you type java -jar -Dorg.jpedal.ContentExtractor jpedal.jar. The JVM then knows to call the main method in that class as opposed to the one specified in the jars manifest. I’m going to get it to run as a Mac package.
By Mark Stephens
June 13, 2011
PROGRAMMINGJetbrains have released version 10.5 of their commercial Java IDE. I currently use version 10.0 so was intrigued to see what a 0.5 update meant. I downloaded it to try. Here are my first impressions:- 1. Speed is better. In the days of IDEA 5.0 it was the quickest tool around but since then performance
By Mark Stephens
May 31, 2011
PROGRAMMINGOne of my favourite features of the PDF file format is it’s flexibility. It goes way beyond a document format, it offers lots of interactive features, Javascript, and you can actually use it to develop alsorts of flexible applications. With PDF readers very ubiquitous, it offers a rather useful cross-platform solution. Here are some examples
By Mark Stephens
May 17, 2011
PROGRAMMINGWhen you run a Java application, there is usually a fixed maximum amount of memory which is available. This is usually 64 megabytes of memory. So if you run a java program from the command line like this, the program can use a maximum of 64 megabytes of memory (this is the default). java -jar
By Mark Stephens
May 03, 2011
PROGRAMMINGDrools Planner is a sub project of the Drools project that started 4 years ago as Drools Solver. Drools Planner is focused on “NP complete” planning problems where a solution is hard to find, but easy to prove feasible once found. Examples include scheduling, bin packing and timetabling for instance. Drools Planner is particularly good at larger ones with lots of constraints, such as a staffing/roster problem where they are many roles and constraints as to who can be scheduled when. Drools Planner has a number of live projects and over 2,000 downloads of the 5.1 release (probably a lot more). It is not currently “productized”, meaning you can use it (under the open source Apache License) but you cannot buy “official” support from Red Hat yet (unlike for Drools BRMS for instance).
By James Taylor
April 19, 2011