Technology

Modify promt to make it GIT specific.

We use git a lot, and one of the most used commands is “git branch”. Few Months back we found a script that enabled us to modify our prompt so that it shows our current branch. We have modified it further to add extra functionality, and our modified script enables prompt to show number of […]

Hitesh Bhatia
Hitesh Bhatia
Read

Grails

MetaProgramming with MetaClass

As we all know that groovy is a dynamic programming language, so we can add any method to any class at runtime. First, let’s see a small and simple example of metaProgamming given below, in which we are adding a method (isEvent) into an Integer class. [groovy] Integer.metaClass.isEven = { -> // only (->) sign […]

Amit Kumar
Amit Kumar
Read

Grails

Parsing tweet for Hashtags, Usernames and URLs in Java

Hi, As i am working on Twitter integration in my current project, i needed to display the searched tweets from twitter API, on my view layer. When we query the Twitter API, it returns tweets text in the form of simple string which contains HashTags, Twitter usernames and links to external resources. While displaying them […]

Vishal Sahu
Vishal Sahu
Read

Technology

Git Bisect : Find that DAMN Commit!!!

While working on a project with a team, there is a chance that once in a while erroneous pieces of code (bad programming, wrong conflict resolution etc) creep in. Now wading thorugh individual commits looking for a specific line in a file that looks suspicious can be hard work and takes a lot of time. I was in […]

Manoj Mohan
Manoj Mohan
Read

Grails

Grails pageProperty tag

In my current project, I tried to call a javascript function on onload event of body tag of gsp page: [html] … [/html] But this onload event was not fired, because Grails picks the body tag from layout and not from the view. So I added the following line in body tag of my layout […]

Amit Kumar
Amit Kumar
Read

Technology

Creating database in Phonegap

Currently I am building a mobile app using Phonegap. In my project I need to store the data into the database and refresh it with server time to time. Phonegap have the Storage API to do this. Storage API is based on the W3C HTML5 webdatabase. So we just need to create the database and […]

Grails

Implementing Login With Facebook

Hi, In my recent grails project i had a requirement to allow an user to login into my site using his Facebook credentials To achieve it , here is what is required to be done : 1) Create an application in facebook : Create an application in facebook from the application dashboard (https://developers.facebook.com/apps). 2) Provide […]

vineet
vineet
Read

Technology

WordPress Signatures: Adding signatures to your blog posts

The number of blogs on our website have seen a significant rise in the recent times and it became somewhat of a necessity to have the functionality of adding user-specific signatures akin to email signatures. It eliminated the process of individually adding signatures to each blog post allowing authors to skip the signature part.   […]

Roni C Thomas
Roni C Thomas
Read

Grails

Accessing remote data through cross-domain ajax call in jquery

While developing a mobile app using phonegap ( or otherwise also 🙂 ), we can access remotely hosted mysql database using jquery ajax calls. But this interaction between jquery and mysql database cannot happen directly. We will need to specify a server side script (in PHP terminology) or a controller action (in Grails Terminology) that […]

raj
raj
Read