Single line of HTML crashes IE 6

A Japanese blogger who goes by the name Hamachiya2 has discovered a single line of HTML and CSS that crashes IE 6. The line is:

<style>*{position:relative}</style><table><input></table>

If you’re brave, you can click here to try it out. The code is rendered correctly in Firefox, Safari and Opera (didn’t get a chance to try any other browsers, but presumably they work too). But in IE 6 it raises a fatal error in mshtml.dll.

Deep Linking How to avoid

A deep link is a direct link to a web site’s resource without accessing the main page of the site. For example your site is http://www.abc.com and your contact page is at http://www.abc.com/contactus/contact.html. If a user types the 2nd link without going though the main page, he is called as The Deep Linker.

It becomes a problem for many of the sites which display ads on their first page(the index page). The HTTP protocol doesn’t bother if the user is asking for a resource via a deep link or via a normal link. After all, the request which goes to the server is something like this :

GET /contactus/contact.html

for both cases 1. When you access it through a deep link or 2. When you access it normally via first page’s link.

So, how to avoid people from linking deep?
Here’s a small trick:

1. Check for a cookie at each deep link. If it doesn’t exist, redirect to index page.
2. On the index page insert a cookie which gets killed when the browser is closed.

Anyone knowing a non cookie based solution to this problem do post it in the comments

BarCamp the night before

And so finally it comes – BarCampPune3.

My desktop is cleaned(less icons),
My wallpaper is set to its logo!
My Slides are almost done!

and I feel good about it!

There are some really cool sessions which I’m really looking forward to attend:

Wishlist includes:

MySQL using JRuby – Priyank Kapadia
Microsoft Silverlight, A new dimension to build rich UI applications by Aditya Thatte
Indian Technology Laws, Indian laws on cyberspace, copyright, trademark and patents by Gokul Narayan
Self Hosting – Is it the future ? by Milind Pandit

I’m disappointed I’ll miss sessions by Abdul Qabiz. I don’t know why he has cut his name!

So see you guys tomorrow at BarCampPune3!

Free Software Song by RMS

Recently I found the lyrics of The Free Software Song by Richard Stallman.

Before the lyrics here a short history of the song: Richard Stallman was attending some get together where everyone had to either sing or perform something. He knew his turn was coming so he quickly scribbled this song. He also thought of the tune that very moment. When he sung the song, people said it sounded like an anthem and one lady said that he should show it to Richard Stallman. He replied that he was Richard Stallman!

Join us now and share the software;
You’ll be free, hackers, you’ll be free.

Hoarders may get piles of money,
That is true, hackers, that is true.
But they cannot help their neighbors;
That’s not good, hackers, that’s not good.

When we have enough free software
At our call, hackers, at our call,
We’ll throw out those dirty licenses
Ever more, hackers, ever more.

Join us now and share the software;
You’ll be free, hackers, you’ll be free


Original Posting : http://www.gnu.org/music/writing-fs-song.html
Wikipedia Entry : http://en.wikipedia.org/wiki/Free_Software_Song

Add external deployable files to Java EE projects on netbeans

Ever wondered how you’d deploy external CSS/JavaScript with servlets or JSPs?
This article will guide you on how to add a CSS/JavaScript (.css, .js) or any file in your project so that it gets inside your .WAR file too!

Here’s how to:

1) Start your netbeans: I am using 5.5
2) Goto Tools>Template Manager
3) Select or Expand “Other”
4) Click “Add…” and select the file which you want to include.
5) After selecting the file will appear in your “Others” list
6) In your project navigator, add a new file of this type.
7) Give a name to this file and feel excited!