In one of my projects, I needed to save file from a particular url. I found a groovier way of doing this using category. [java] class FileBinaryCategory { def static leftShift(File file, URL url) { url.withInputStream {is -> file.withOutputStream {os -> def bs = new BufferedOutputStream(os) bs << is } } } } [/java] Here, […]
Web Designing is nowadays not only just the way to promote our product & services, but is designed and coded to make the website user friendly. It guides user to learn and enjoy what they are doing which makes user to visit your website regularly and explore what you have to share. Here are few […]
Recently one of my colleagues went nuts over Git, he was trying to do a git commit through his IDE, and he encountered this “detached HEAD” warning. But he ultimately did that, and when he switched to master branch, there was no other branch and his commits were not on master branch either. This is […]
When customers sign in magento they will redirect to account’s dashbord page by default. There is no setting in magento which will let you to set your own landing page for customer after login. If you want to achieve this feature then you need to do some custom coding . First step is, create a […]
Recently I was working on a Facebook game application using Grails 2.0 and Postgres database. The use case was to show the game leaderboard with ranks of the players. Players with same score should be given same rank and next player rank should be incremented rank of last player. Here is the sample data for […]