My article about pretty basic, but important concept in Java: do-s and don’t-s when implementing the equals() method on objects
Definitely a thing every good developer must know
My article about pretty basic, but important concept in Java: do-s and don’t-s when implementing the equals() method on objects
Definitely a thing every good developer must know
Simple and quick one today – what if we need to print stack trace into a String?
[java]
…
catch (Exception e) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
pw.flush();
String stackTraceString = sw.toString();
//use the stackTraceString as you need…
}
…
[/java]
Common usage pattern for Beehive Jdbc control is:
The above works fine. But what happens if we would like to use our DB control class from within JSP page which is not part of our Beehive application and has no access to our controller?
The following text presents one possible approach.
I needed to directly modify pixel values of several images in a special way. First, I looked into Gimp’s Script-Fu functionality, but this seemed too complicated for what I needed so I decided to write such one-off utility in Java.
It simply reads all GIF images in specified directory, does some custom transformation of pixels, and then writes images back onto disk. It is really quick’n’dirty so be warned
Source code: ImageManipulation.java
Reading and writing CLOBs and BLOBs from/to Oracle database via Spring’s JdbcTemplate might be a little bit confusing as it significantly differs from dealing with other types. Interested? Read on…
I ran into several issues during the development of an application which is to be run in OC4J 10.1.3.1 and needs to use SOAP web services and Oracle AQ (Advanced Queueing) messaging:
If anyone encountered such problems, read the rest of the article for tips and solutions.
Have you ever wondered how to:
If the answer to any of these questions is yes, be sure to read on!
XOM parser is a great piece of code. I was missing just one feature – to be able to get position of element in source file (line and column). So I did a quick and dirty hack resulting in two new nu.xom.Element methods: getLineNumber() and getColumnNumber().
Complex systems usually need some kind of asynchronous messaging and caching for better performance. And yes, that’s pretty much what this article is about. Let’s dive into the following issues: