geeky · java

Eclipse: stop it from searching certain directories

It’s always annoying when you do a search (ctrl+h) in Eclipse and it produces results from directories you do not care about. In my particular case, the project’s ant build expands the built war files into a directory named target. Since this directory duplicates the files in the regular WebContent directory, often times I end… Continue reading Eclipse: stop it from searching certain directories

geeky · personal · plug

I just finished going through 1111 total posts @ pure-essence.net

I’m just went through all of my 10 years of posts on pure-essence.net one by one to correct its syntax so I can use this super awesome sourcecode shortcode on wordpress.com. Yea I know I’m crazily obsessed with my blog. Sentiment from going through all of my posts I’m proud that my oriental wordpress theme… Continue reading I just finished going through 1111 total posts @ pure-essence.net

geeky · java

Eclipse 3.6 toggle comment findings

Despite of the usual convention of using ctrl+/, I found ctrl+shift+c is actually the way to go if you want it to work on everything. I care mostly about being able to toggle comment in the following file types: source code – comment with // or /* and */ block markup e.g. xml/html – comment… Continue reading Eclipse 3.6 toggle comment findings

geeky · wp hacks

WordPress.com lightbox/thickbox trick

Last I tried, this trick no longer works as of 9/16/2012. Not sure when it stopped working. Click for an example. In your theme widget, add the socialvibe widget to your sidebar. Add the class “thickbox” in any of your links to an image. e.g. To use the gallery feature, use the same rel attribute… Continue reading WordPress.com lightbox/thickbox trick

geeky · java

Spring row mapper

A coworker and I were chatting regarding spring rowMappers and I did a little more research and found the following: Spring’s simpleJdbcTemplate deprecated methods with parameterizedRowMapper in spring 3. The class ParameterizedRowMapper is not deprecated. Spring’s jdbcTemplate however only has methods that take RowMapper<T> so it will continue to work with parameterizedRowMapper. But it seems… Continue reading Spring row mapper

geeky · java

Spring: check if a column exist using resultset

If you have a strange requirement in the rowMapper to check if a column exists or not, you could try to catch a SQLException of invalid column name or you could try:

geeky · java

Dynamically invoke methods using spring config

A business rule at work requires some flexible configurations. I attempted to fulfill the need by create different spring batch steps/tasklets to execute each requirement based on a property value. For example, step 1 will need to execute methodOne on the class Repository with the appropriate parameters. The method signature & parameters are determined by… Continue reading Dynamically invoke methods using spring config

geeky · java

How to execute IN() SQL in spring jdbcTemplate

So for a long time, I wondered how you’d do the sql IN() using spring jdbcTemplate. Today I had an opportunity to work it out. Normally I used It’s not too friendly if you do If you wish to use the “where in” sql, there is a pretty elegant way to do it in spring… Continue reading How to execute IN() SQL in spring jdbcTemplate

geeky · non php code

Use modal windows for delete confirmations please

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… Continue reading Use modal windows for delete confirmations please

geeky · java

Spring loading properties from database with a twist

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… Continue reading Spring loading properties from database with a twist