-
Manage session creation timestamp in Lift
Lift framework lacks the ability to fetch a session creation timestamp by default. This post will provide a short example of how one can do this while working with Lift. Note: This example uses org.joda.time.DateTime class for working with date.…
-
Get image dimensions with ng-flow
This note shows how to get the width and height of an image inside of an AngularJS controller with the help of ng-flow library. First of all, you can get image dimensions by using the Image element constructor and…
-
Launch Ionic app with a web or email link
Custom URL scheme PhoneGap Plugin is a cool plugin for Cordova that is designed to allow to launch apps by clicking on a link in an email or on a web page. Bellow is an example of how…
-
How to set request throttling on a dispatch HTTP client
Let’s consider the ability to limit the number of HTTP requests being handled by an application simultaneously. For example, the throttling of HTTP requests being sent by the application could be enabled, among other, by the following…
-
How to trigger a method with the keyboard shortcut in AngularJS
If you are, for example, working on a chat application, one of the features that the user expects is an ability to send a message with a keyboard shortcut. The example of a directive below shows how…
-
Get a base64 encoded image using ng-flow in AngularJS
Here is an example of how you can get a Base64 encoded image using the ng-flow for the image upload, for instance,if you need to send the image in a JSON request. As you may have noticed,…
-
Table existence check using Slick
I’m using Slick library in my project and need to ensure that all required MySQL tables are created on application start. The common approach of creating DDL statements for a table in Slick is calling its ddl method that…
-
How to update entire database record using Slick
Slick documentation says how to perform update operation for specific column, but doesn’t contain any examples of updating entire record. Below is tiny example of how to do that. Let’s assume we have a mapped table that…
-
Pagination and sorting in many-to-many relationship
This example shows how to use pagination and sorting with many-to-many relationship in Grails. Suppose you have two domain classes: Author, Article and you want to display all articles of some author in a page with pagination. Domain classes: The…
-
Painless Groovy Concurrency
Gpars (Groovy Parallel Systems) is the best solution for your concurrency problems with mutable objects.Gpars gives you a number of high-level abstractions for writing concurrent and parallel code in Groovy (map/reduce,fork/join, asynchronous closures, actors, agents, dataflow concurrency…
-
Dump a specific table or few rows (MySQL)
The ‘mysqldump’ command is used to dump databases managed by MySQL. Let’s consider three the most useful cases of MySQL database dumping. 2. Sometimes, there’s a need to dump a single table from your database. You can…
-
How to deploy Grails (Tomcat 7) application to Cloud Foundry
I had an issue with deploying my Grails project to Cloud Foundry with using cloudfoundry-grails-plugin. My application was using Tomcat 7 unlike Cloud Foundry, which use Tomcat 6. In other words, to have a Grails application with…
Boost your business with custom software
Tell us about your business needs and we’ll suggest a solution
Thank you!
We have received your request and will get back to you within 1 business day.











