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 up editing the WRONG file from the search results. I will be spending minutes trying to figure out why weren’t my changes taken place once they are redeployed to tomcat.

So I was finally annoyed enough to do some research on how I can stop Eclipse from searching in directories I do not care about.

  1. Go to the navigator view of your workspace.
  2. Right click on the directory you do not wish Eclipse to search. Click on Properties.
  3. Select attribute Derived.

That should be all you need. Do another search to verify that the files in that directory no longer show up.

Schedule for Las Vegas vacation

So the schedule is in. We will be in Las Vegas from May 27th – June 3rd.

Things we will be doing

Wow it’s gotta be the most elaborate trip Andy and I have ever taken. A very good start and hopefully many to come! :)

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

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 with <!– and –> block
  • property file value – comment with #

The following behaviors are tested in Eclipse version 3.6.

  • ctrl+/

    • source code: Toggles //
    • markup: No affect
    • property file value: Toggles #
  • ctrl+shift+/

    • source code: Only add but does not remove /* and */
    • markup: Only add but does not remove <!– and –>
    • property file value: No affect
  • ctrl+shift+c

    • source code: Toggles //
    • markup: Toggles <!– and –>
    • property file value: Toggles #

Pure-essence.net is back to wordpress

Now hosted on wordpress.com with the domain mapping upgrade and custom CSS upgrade.

Based on the support they provided, I really hope the guys here would know a lot more about wordpress hosting than my last generic web hosting company and I will have less headaches dealing with all of the down time. I’m just happy I can keep all of my blog entries at one location again. It contains 10 years of posts.

Fingers crossed that I found my long time new home :)

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.

  1. In your theme widget, add the socialvibe widget to your sidebar.
  2. Add the class “thickbox” in any of your links to an image. e.g.
    <a href="http://pe20110517.files.wordpress.com/2011/05/print1.png?w=480" class="thickbox">your link or image src</a>
    
  3. To use the gallery feature, use the same rel attribute for multiple image links. e.g.
    <a href="image1.jpg" class="thickbox" rel="gallery">image1</a> | <a href="image2.jpg" class="thickbox" rel="gallery">image2</a> 
    

    To see it in action, visit my layouts page.

Credits: sensicology, thickbox.

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 to me the direction of Spring is to go back to use genericized rowMapper e.g. RowMapper<T>. So for all of my new mappers, I will probably implement RowMapper<T> instead of ParameterizedRowMapper<T>.

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:

public static boolean doesColumnExist(String columnName, ResultSet rs) throws SQLException{
	ResultSetMetaData meta = rs.getMetaData();
	int numCol = meta.getColumnCount();
	for (int i = 1; i <= numCol; i++) {
		if(meta.getColumnName(i).equalsIgnoreCase(columnName)) {
			return true;

		}

	}
	return false;
}

ISL像一场重感冒

我知道我这样说最终会让别人误会。我现在的感受好似徐怀钰的那首《爱像一场重感冒》。不但像,要走时我还真生了一场重感冒 。如果说ISL是一场三个月的恋爱真不算夸张。我现在像刚和男友说了分手般心酸。人一生的感情真是微妙。事业和爱情原来可以相提并论。事业上的爱恨情仇也是可以刻骨铭心的。

分了或走了,甜蜜回忆却上心头。英语因该说是bittersweet。我知道雨过天晴后留下会是美好。一番人生体验。学习到了新的技术。交了好些新朋友。

哦,ISL,虽然我们未能一起走到最后。我会常常想念你。像想念我的初恋男友一样。

在这我留给读者在我脑中的歌词。

徐怀钰 《爱像一场重感冒》
词:姚若龙
曲:Eric Lee

写了封信给你 好像依依不舍
刚寄出去马上又后悔了
多希望邮差能把地址看错 或是弄丢了
因为你是真的 和别人不一样
不然我不会那么感伤
但是我已爱到不能爱 让到不能让
还能怎样 不如倔强
倒数三秒 我会开始努力把你忘掉
有时候爱情就像是一场重感冒 等烧退了就好
找一天将心情当房子好好地打扫
我喜欢每次丢掉多馀的东西 那种轻松美好