Recently, I was trying to install RhoMobile suite on my ubuntu11.10 machine. And faced some issues for installing ‘rhosync’ package. This blog tells how to fix these issues (as they worked for me). I am assuming ruby and gem are already installed on your machine. Note: if you are on older version of ruby […]
Sometimes there is need to get some default value in place of null values from a list, that was the reason I came across: withLazyDefault and withEagerDefault methods. My use case consisted of a list of user names with possibility of null elements, hence wherever the element was null, I wanted to return “unknown”. Although […]
Very often, we all need to access a remote database for debugging or any other related stuff. The simplest thing that comes to mind is to take the dump of remote database and bring it to the local and run the application using that data. We can avoid that, if we can connect our local […]
AngularJSFront End Development
Let’s implement text suggestions functionality using AngularJS. It provides suggestions while we type into the text field. For example, if we have a list of fruits and the user types ‘ap’, it will show all fruit names that contain these letters. [html] <!Doctype html> <html ng-app> <head> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.1/angular.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> <script type="text/javascript"> […]
In one of my recent project, i want to use grails web-flow with ajax call. It’s very easy to implement the web-flow with ajax call. Grails web-flow always track the actions on the basis of eventId & flow execution key. So, to implement ajax call in web-flow, we have to pass the event id & […]
JQuery mobile provides set of features which are supported on almost all smartphones such as touch UI, ajax navigation, animated page transitions. Building jQuery mobile page is very simple, here’s how: A jQuery Mobile site must start with an HTML5 ‘doctype’ to take full advantage of all of the framework’s features. First of all you […]
AngularJSFront End Development
I hope you found my previous blog helpful which was about Updating a Label Dynamically with User Input on AngularJS and this blog uses the concept of MVC. Let’s consider the following example : [java] <!doctype html> <html ng-app> <head> <script type="text/javascript"> function FruitsController($scope){ $scope.name="Anonymous" $scope.fruits=[‘apple’,’mango’,’banana’]; $scope.addFruit=function(){ $scope.fruits.push($scope.newFruit); } } </script> </head> <body> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.1/angular.min.js"></script> […]
Hi, Recently one of my friend asked me whether there is a mechanism in grails to handle the use-case where we have different packages but having same domain name. Here we are having duplicate domain class names in different package and by default the domain classes are auto-imported in HQL queries which doesn’t required to […]
Recently in my project I had to implement one page in which an image and the related text had to be shown side by side using the DIV tags, where the text needed to be centered vertically with respect to the image. Example : Let’s take a scenario where we cannot use vertical-align with DIV […]
In one of the shell scripts I was reading I saw a usage of mutt text-based command line email client. Mutt can be used to send out the emails from the production machines or any other servers where you do not have access to the browsers or UI based email clients. Sometimes it is essential […]
Today I found two very interesting methods: takeWhile and dropWhile. The names itself reveals their work i.e. takeWhile (consider while some condition is true) and dropWhile (ignore while some condition is true). Although, these methods have been added to Groovy 1.8.7, but for character sequence, these methods are supported in Groovy 2.0 only. The takeWhile […]
AngularJSFront End Development
After the basic introduction of AngularJS, we are all set to write code for implementing a simple functionality. Let us consider a simple scenario. There is a textbox, and whenever the text in it changes we need to update a label dynamically. Traditional way of doing this in Javascript is to bind the change event […]