Blog
Git Feature : Squash
10 Sep, 14

Git Feature : Squash

Hi welcome. This blog is one of the git cool feature “Squash”. Note : Because this is an advance feature of git, I am expecting that you have basic knowledge of git like push, commit, checkout, branching etc. When we shall hear Squash first time, we would get three...
Configure tomcat to support SSL / https
9 Sep, 14

Configure tomcat to support SSL / https

Hello Everyone, following are the simple steps to configure tomcat to support SSL / https locally. 1. Generate Keystore First, uses “keytool” command to create a self-signed certificate. During the keystore creation process, you need to assign a password and fill in...
Getting Started with LESS
9 Sep, 14

Getting Started with LESS

I am back with a new post titled “Getting Started with LESS”. We have often used CSS for designing layout of our web pages but there is a new buzzword in the web designing industry which is LESS. Less is a dynamic stylesheet language which offers various...
PERFORMING HIBERNATE LOCKING
8 Sep, 14

PERFORMING HIBERNATE LOCKING

Hibernate provides two strategies of locking for performing secure read/write operations. Hibernate achieves this by database locking mechanism and abstains locking object in memory. So, basically hibernate locking depends on database for there operations. The two...
Date manipulation using SQL query
8 Sep, 14

Date manipulation using SQL query

I have written some useful query. When you need some customization in date format and find some prior date using SQL then below query might be useful for you. Find prior/future date from the current/given date: SELECT now()::date + 2 AS date1, current_date -1 AS date2...
Custom sorting in sql
5 Sep, 14

Custom sorting in sql

Order by with a particular value on TOP or Custom sorting in order by clause. ORDER clause can be used to sort the results returned by SELECT statement in SQL Server. It orders the result set by specified column list. When used with character data type columns it...
Command Object And Its Benefits
4 Sep, 14

Command Object And Its Benefits

Today, I am going to explain how to use command object in grails application to validate the client information without using domain class. You will see the benefits of using command object in this blog. The command object’s purpose is to bind the data from web-form...
AC Power Measurement
3 Sep, 14

AC Power Measurement

Introduction A whole house energy monitor measures the energy used by appliances connected to the house mains. To understand how it does this work, it is useful to know something about how appliances interact with the electrical system. Not all appliances interact...
Grails app static resource on https
2 Sep, 14

Grails app static resource on https

In my recent project I have setup ssl and deployed it on server. All the applications page were being served over https but some static contents were being served from http and it showed that the application is not secure. After lot of searching I found the solution....
Loops In Groovy
1 Sep, 14

Loops In Groovy

There are several types of loops in groovy. Following are some of the ways: List list = [4, 2, 9, 6, 7, 8, 2] for loop: for (int i = 0; i < list.size(); i++) { print list.get(i) } output = 4296782 for (int i : list) { print i } output = 4296782 for (int i...
SSL on Nginx
1 Sep, 14

SSL on Nginx

Last week i was installing SSL certificate on an Nginx server which was acting as front-end for tomcat and the basic set up was that our Grails WAR file was deployed in tomcat which was running on port 8080 and Nginx server was running on port 80. We ordered SSL...
Sort List In Groovy
31 Aug, 14

Sort List In Groovy

If we have a simple list like [code]List list = [4, 2, 9, 6, 7, 8, 2][/code] 1 [code]List list = [4, 2, 9, 6, 7, 8, 2][/code] We can easily sort this list using [code]assert list.sort() == [2, 2, 4, 6, 7, 8, 9][/code] 1 [code]assert list.sort() == [2, 2, 4, 6, 7, 8,...