TO THE NEW Blog PAGES

Technology

Multiple Bootable OS in Single USB

Recently I have been knee deep into Linux installations. Installing through  USB is great process, there is no hassle of CD and its faster too. But problem is first we need bootable USB. Up till now I used “Start Disk Creator”, which is bundled in Ubuntu and is great for creating bootable USB, major problem with it is […]

Grails

Handling corrupted references through ignoreNotFound database mapping in Grails

Hi,   Recently i had a use-case where we have the legacy database and it contains the corrupted references of a non existent record in many-to-one relationship, and i have to populate a grid that contain info also from referenced record. As referenced record doesn’t exist, So when we refer to the certain record will […]

Grails

Integrating Grails with Weceem

Today, I’ll be talking on how to go about integrating the Weceem CMS into a grails-app. It is extremely simple and with a couple of steps you would have a CMS that can render traditional as well as custom content merged into your grails application. Ok … First things first … What is Weceem ? Weceem […]

Technology

Clear Time function for MySQL

Hi all, Here is a simple function that can allow you to clear time from the DATETIME field of your database table [sql] DROP FUNCTION IF EXISTS cleartime; delimiter // CREATE FUNCTION cleartime(dt datetime) RETURNS DATETIME NO SQL DETERMINISTIC BEGIN DECLARE t varchar(15); — the time part of the dt DECLARE rdt datetime default dt; […]

Grails

Dealing with immutable collections in Java

Perhaps, you know it before or just skipped it after going through Java API. But I really found it very helpful at this point.   Recently, I had a requirement in an open-source project, where users can iterate through the objects saved in collections (esp. List). But the problem was, we really didn’t want users […]

Salil
Salil
Read

Grails

Duplicate headers received from server issue on chrome

Hi,   Recently, in my project while downloading some files(not on all files) i am getting exception on chrome, that say :   Duplicate headers received from server Error 349 (net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION): Multiple Content-Disposition headers received. This is disallowed to protect against HTTP response-splitting attacks.   But when i download the same files on IE, Firefox […]

Grails

Setting default layout in Grails application

Grails uses Sitemesh for adding layout to the views. Layouts are located in layouts folder and to add layouts to the view we generally add any of the following line in head [java] <g:applyLayout name="layoutName"/> or <meta name="layout" content="layoutName" /> [/java] But most of the time we have single layout, so why we repeat the […]

Grails

Importing Domain Constraints

Following DRY is at the heart of grails. While saving domain objects in our project, we used to copy the domain class constraints to the Command Objects (pretty ugly as it is), until we found that we can import constraints directly from the domain classses using importFrom() method in Grails 2.0 [java] class VenueCO { […]

Services