Pure-Essence.Net

Archive for the ‘geeky’ Category

Use modal windows for delete confirmations please

Posted by: pureessence on: March 1, 2011

While reviewing an existing project at work, I notice it has many delete confirmation pages. In my opinion, delete confirmation PAGES should really just retire from the face of the earth. Seriously, why do we need to create a http request & html for the mere purpose of asking “Are you sure you wish to [...]

Spring loading properties from database with a twist

Posted by: pureessence on: February 10, 2011

Watched the spring framework 3.1 webinar today and it was pretty interesting. Anyway, at work we are trying to possibly load property values from a database to resolve some tension between the developers and system specialists. I played a little bit at home as how we would set this up. This is not a new [...]

itext page number (page x of y)

Posted by: pureessence on: November 14, 2010

I was looking for a complete example of how to dynamically generate the page numbers when you create the pdf using iText and I couldn’t find one. This is based on the example in the iText in Action book but I added my “refactoring” if you will. I hope this helps someone. If not, it [...]

Java instaniate an abstract class… sort of…

Posted by: pureessence on: August 27, 2010

At work I had to create some test data for a junit test. The function I’m testing expects a super abstract class to be passed in and I need to test the same function for bunch of child classes. I wish I could just pass in the parent class but since it’s abstract I cannot [...]

Setting private property without setter in Java

Posted by: pureessence on: August 25, 2010

Not really a new trick but I had to look for the syntax today to use reflection to set a private property on an object to use it in a junit test.

writing an ajax app for Sequence

Posted by: pureessence on: August 2, 2010

Yesterday I attended Ted Neward‘s game design session at nofluff. It inspired me to begin to implement the game sequence in an ajax app. It will be a private app since I only plan to play it with some friends. But it will be hosted somewhere on my website so it can be accessed from [...]

WordPress 3.0 is out

Posted by: pureessence on: June 17, 2010

Tags:

Oracle number data type

Posted by: pureessence on: June 4, 2010

I don’t know why I’m always confused. I need to write this down so the next time I wouldn’t be. You may optionally specify the precision/length and scale of the number data type in Oracle i.e. number(9,2). I remembered it as “leading” & “trailing” (the decimal point) which is INCORRECT. As discussed here: Precision = [...]

Windows 7 – middle click to close program

Posted by: pureessence on: May 3, 2010

I upgraded my laptop to Windows 7 Ultimate yesterday (Andy bought it as a student for $10). Since I’ve been using Vista for over a year, switching to Windows 7 really wasn’t that big of deal. Switching from XP to Vista was a lot more painful. A few things annoyed me however. I have always [...]

Java: BETTER way to traverse a map

Posted by: pureessence on: March 12, 2010

While reviewing the findbugs report (WMI_WRONG_MAP_ITERATOR) for a new project at work, I learned a better way to traverse a map in Java. In fact, since the first day I started coding in Java, I never thought twice about how to traverse a map. You always traverse the keys and use the key to get [...]


My most adorable Pomeranians

Categories

Archives

SocialVibe


Follow

Get every new post delivered to your Inbox.