Getting Started with React Native

Sandarenu's Blog
React Native is a framework that allows us to create Native Android and iOS applications using JavaScripts by Facebook. It is a extention of React JavaScript framework available for Web application development. With React-Native we can create native android or iOS applications without knowing much about native application development. It opens up the native application development to web developers who ...

Understanding Guava Lists.transform()

Sandarenu's Blog
Guava is a wonderful library by Google. Before Java 8 Guava was one of the best ways to use functional programming in Java. I’ve being using Guava in one of my projects and came accross an strance issue reasontly. I had a list of items and I wanted to convert them to different object and filter some of those items. ...

Experimenting new blog

Sandarenu's Blog
I'm experimenting a new blog powered by Hugo static site generation at http://sandarenu.github.io . Have a look and give your feedback.... Sandarenu's Blog

Simple Introduction to Scalaz

Sandarenu's Blog
Scalaz is a great library to make your Scala code more compact and to reduce some boilerplates. But getting started with it requires considerable effort. With its large collection of different operator and very functional nature most people are afraid to use it. Specially for people like me who are with more imperative programming background, it is not easy to ...

Trying out Eclipse Kepler

Sandarenu's Blog
Yesterday I downloaded the new version of Eclipse IDE; Eclipse Kepler.So far the experience is great. It is much faster than Juno. Main problem I had with Juno is that it is damn slow even with the updates provided later by eclipse to fix the slowness issue. But Kepler seems to have fixed all those issues properly.Most notable improvement for ...

Alternative for Google Reader, Feedly

Sandarenu's Blog
Google has announced that they are going to discontinue Google Reader from 1st of July 2013. It is really sad news since I use reader everyday to keep up-to-date with various blogs. After seeing this news, first thing I wanted to do was to find and alternative. First one I came across is Feedly. It is a web based reader ...

Changing System Time in Xen VM

Sandarenu's Blog
Yesterday I wanted to change the system time in one of our test servers. Server was a Xen VM running redhat linux. I used date --set="20 Dec 2012 00:30:00" command, but when I checked the date again it showed the previous date not the date I've set using date command. After doing some searching I found out that by default ...

Stubbing Asynchronous Http Services using Wiremock

Sandarenu's Blog
Wiremock is simple library which can be used to stub Http Services. It is a handy tool when you want to write unit tests against some Http service(eg: Http REST web service). It has direct support for JUnit using @Rule feature. We can write unit tests to stub different http requests and verify those requests and responses very easily.One weakness ...

Useful GIT Commands

Sandarenu's Blog
This is collection of useful GIT commands I use in my day today work. Just posting here to keep as my own reference.Revert changes made to your working copy:git checkout .Revert changes made to the index (i.e., that you have added):git resetRevert a change that you have committed, do this:git revert ...View commits not yet pushed to remote:git log --branches ...

Exclude resource files from jar file created with SBT

Sandarenu's Blog
I use SBT to build my scala projects. In addition to scala source files I have some resource files in my project. Those are some configuration files and localization resource files.When I build the jar file using SBT package command all of those resource files also get included in the jar file. When those resource files are included inside the ...

Solving no-interface issue in Wireshark on Ubuntu 11.10

Sandarenu's Blog
Recently I switched to Ubuntu 11.10 as OS in my development machine. Previously I was using Fedora 12. When I installed Wireshark in ubuntu and run it, wireshark didn't show any interfaces which can capture packets. I think it is because wireshark was not run as root user. In fedora when I start wireshark it ask to run as root ...

Creating Java Command Line Applications using jLine

Sandarenu's Blog
Most common way of writing a command line application in java is to use BufferedReader to read user input. But if you want more features like tab completion, you have to write code to handle it from the scratch in BufferedReader method.There is a nice library called jLine http://jline.sourceforge.net/ which can be used to write nice CLI apps without much ...

Another Tech Genius Passed Away...

Sandarenu's Blog
Dennis Ritche, co-author of C programming language and one of the creators of Unix operating system has passed away last week. His inventions changed the way how we do things in the computer industry.Thank You Dennis....It is really sad to see that two of the great minds in technology world passed away in a month... Sandarenu's Blog

Remembering Steve Jobs

Sandarenu's Blog
Steve Jobs, one of the greatest visionaries of our time has passed away on Wednesday(5th Oct 2011). He was 56.At 2005 Stanford address quated on his own mortality, saying:“Remembering that I’ll be dead soon is the most important tool I’ve ever encountered to help me make the big choices in life. Because almost everything — all external expectations, all pride, ...

How to Use Multiple GIT Accounts

Sandarenu's Blog
Yesterday at HMS we moved some of our projects to GIT from SVN repository. So in order to access that office GIT repository I had to create a new ssh key using my office email address. I already had a ssh key which I used to access my GitHub account. So once I created new key I was unable to ...

Using SoapUI for Web Service Testing

Sandarenu's Blog
SoapUI is a great tool which can be used to test web services. In this post I'll show you how to set up SoapUI project for WS testing.Create new project from File ->New SoapUI Project, and in "New Project Dialog" give name and the location of the WSDL file.You can find the sample wsdl file ...

Solving 'symbol lookup error' in new Eclipse 3.7 Indigo in Fedora

Sandarenu's Blog
When I downloaded and run the latest eclipse 3.7 Indigo release, it crashed with a strange error.symbol lookup error: /usr/lib/libwebkit-1.0.so.2: undefined symbol: soup_content_decoder_get_typeAfter some searching in the web I found out that it is due that I'm having an older version of libsoup library. I had libsoup-2.28.1-1.fc12.i686 in my fedora 12.Issue was solved by updating that library using yum.yum update ...

Hibernate HQL Select Query Based on Item in a One-to-Many Relationship

Sandarenu's Blog
Few days back I had a situation where I have to fetch some data based on a value of an item stored in one-to-many relationship. I my project I had two classes like below. I had to fetch all the Oders that has particular item.class Order { private List<Item> items; //more code ...}class Item { private String itemId; private String ...