Encode / Decode HTML Entities

Image credit:lloydi Have you been typing HTML entities by hand to include special characters in your blog post. For example to include < sign you will have to write "&lt;" in your post. It is fine if you have only few special characters in a post. But it quickly becomes cumbersome if your post is …

Colors by name with hex and RGB codes.

Today I stumbled upon a rather useful website. CSS Color Chart contains a neutral colors code chart and a general-purpose color code chart. You can easily toggle between Hex and RGB codes for the colors. In addition to the color code this site has the English name of every color. I’ve bookmarked the website and …

How to configure multiple handlers in a Spring MVC web application

In Spring MVC, DispatcherServlet relies on handler mapping to determine which controller the request should be sent to. All handler mapping classes in Spring implement org.springframework.web.servlet.HandlerMapping interface. Spring distribution contains following four implementation of HandlerMapping interface. BeanNameUrlHandlerMapping SimpleUrlHandlerMapping ControllerClassNameHandlerMappign CommonsPathMapHandlerMapping BeanNameUrlHandlerMapping is the simplest of all and DispatcherServlet looks for this mapping by default. You …

How to remove Ctrl-M (^M) from Unix files?

Sometimes when you upload or FTP files from a Windows system to a UNIX box you will see ^M at the end of each line. ^M is the UNIX equivalent of DOS line break. Not only does it not look pretty, this extra character may break all sorts of scripts that you try to run …