A few days back, I was on a server wherein I had to find the location of a file in the file system. Naturally like most newbies, I instantly hit the ‘find’ command. Something like [shell]sudo find / -name someFileName.ext[/shell] Naturally the command took a lot of time to find the file (Local to server relay […]
In Groovy you can use “()” with any object which in turn is same as calling call() method on that object. You can write code which are more human readable using this groovy feature. This is somewhat overriding “()” operator. The blog adds Microsoft VB array access like syntax to Java List.
Recently i upgraded my laptop to increase the productivity and to make it butterSmooth to work on even with the most demanding applications. so here is what i did: 1) New High Speed Solid State Hard Drive 2) Increased RAM. . why SSD??? CPUs and GPUs thrive on being fed massive amounts of data in […]
While working on Git with a big team, there are chances that a situation might arise when you want to set some other branch as master branch.Recently we were in a same situation. Several of branches were merged to master branch. And unfortunately one of the branches merged was created from an unstable branch. Making […]
Grails console plugin is one of those which I always add to my projects. It really gives you a very handy way of debugging things and also run some quick fixes. Whenever you hit the console action you always gets a predefined message on it about the available variables, which is really good when you […]
Recently i Found this cool thing(Zen Coding) which is also supported by IntelliJ IDEA. Long story short, Zen Coding is a shorthand notation for writing HTML/CSS, Few Examples are as Follows: Ex-1 Writing a nested Markup Quickly Now in IDEA lets open any gsp/html page and write: [html] div#mainDivId>p+h1+p.classForP (After Writing this press TAB) [/html] […]
Hi, In one of my recent grails project, i needed to set System property from command line while running the grails application. I looked for it and found a simple solution to do so and found it worth sharing. Suppose we want to set any property, say app.property=”propertyValue”, then the command to set the property […]
Hi guys, Recently while working on a project, I needed to get the table names associated with a particular domain as I needed to perform complex join operations on a particular table. The database that my team was working on was a legacy database. The domains that were created were mapped to particular tables to […]
Reading the grails docs is like my habit, they always enhances your learning. Today I was going through the grails docs again and I found a very good way of showing some custom error messages. As I saw it I found the use case in one of my project that could be refactored by this […]
I have been working on Linux for almost 3 years now and have grown to love it a lot. As with every linux user, the .bashrc file becomes cumbersome and difficult to maintain over a period of time, since there are a lot of project specific aliases, paths, etc So after working on a couple […]
Annotations really provides a whole new view of programming things. Groovy also provides some of its own annotations one of them is Category. Lets take an example of using it. We create a IntegerUtil class and annotate it with Category. [java] @Category(Integer) class IntegerUtil { List<Integer> multiples(Integer upto) { (1..upto).collect {this * it} } } […]
Hi All, Today i found how to specify default package for all Grails artefacts, would like to share with you. By default when we create any domain, controller or any other artefact, It takes application name as default package. If you want to change that just define grails.project.groupId property in your Config.groovy. [code] grails.project.groupId = […]