Git GUI checkout single file command

January 31, 2011

To checkout a single file using Git GUI, go to the Tools menu and add the following command
git checkout $REVISION -- $FILENAME
Now select the file to checkout and run the command .

See Stack overflow post about this here –


Difference between Div and Span tag

January 27, 2011

Good article in the link below about this

Simple point to keep the difference in your mind is Div tag adds new line , Span tag does not

Convert JSON Object to String javascript

January 26, 2011

you can user browser native function JSON.stringify to do this

var foo = {}; = "new property";
foo.baz = 3;

var jsonString = JSON.stringify(foo);

And IE8 also supports it –

jQuery Template plugin html in variables

January 25, 2011

If you pass html content in the template variables, you have to use {{html ..}} format to make sure that the html content gets converted into real html elements.

See this Stack overflow post

And this documentation –

Javascript code equivalent to java i18n MessageFormat

January 25, 2011

Here is a Stack overflow post with javascript regex solution for this problem.

Handling cookies with java URLConnection

January 17, 2011

Same way you can set other headers like Content-Type, Accept to the HTTP request using the setRequestProperty method of URLConnection

Firefox addon to build HTTP request

January 17, 2011

This needs comes up when you cannot test build HTTP GET or POST request requiring special request headers like content type = application/json;