Latest Entries »

Coming Soon!!!

When working with jboss on eclipse and encounter the ClassNotFoundException on startup or deployment. Stop the server and clean the build using

1. disable Project –>Build Automatically
2. Project –> Clean

Then, get back to your usual way of deployment.


Whenever we are developing an application that deals with money or financial things, we should be careful about the datatype we use for storing the values. We can use double but it has its owns limitations in terms of precision. An error of 0.0000001 may not seem to be making a difference but as you go forward, like 2 yrs down the line or you app getting lots and lots transactions, especially large amounts, the difference that seemed not to make a difference may turn out into a big one.

So, what datatype is big enough and accurate enough?

An alternative to double is, BigDecimal (java.math.BigDecimal). BigDecimal has a higher precision levels and hence will give better accuracy than double. You can find the javadoc of BigDecimal here.

Now, we want to store it in database, for double we have a type in sql as double. For bigDecimal we can use the type Decimal(M,D) where M is the maximum number of digits(1 to 65) and D is the number of decimal places we want (the amount of accuracy required). Find out more on Decimal

For using a .properties file in java. properties file is a collection of key-value pairs. Here, it is being used in a java based web application using jsf.

First add an entry into the faces-config.xml as follows


This will allow you to use the properties file inside your jsf pages. Use it as


Using the properties file in a java bean file.

public String getCurrentPage() throws IOException {
HttpServletRequest rq = (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();
String help;
currentPage = rq.getRequestURI();
currentPage = currentPage.substring(1);
currentPage = currentPage.replace(‘/’, ‘_’);
currentPage = currentPage.replace(‘.’, ‘_’);
ResourceBundle rb = ResourceBundle.getBundle(“com.pi.helpdata”);
return help;
return “Help to be added soon”;


hope this helps in the future!

Download the ns2.34 version.
Follow the instruction from here

then in-between you get errors in file and
line 219 : ‘GammaRandomVariable::’ has to be removed in order to make it a local call
line 219 : return GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);

line 183,185
make the calls local rather than using scope resolution operator
line 183 to 187
if (int_m == m) {
resultPower = ErlangRandomVariable(Pr/m, int_m).value();
} else {
resultPower = GammaRandomVariable(m, Pr/m).value();

Sachin – The God of Cricket


Stay hungry Stay foolish

Secure online banking

We need to be very careful while we are doing any banking transaction online. In the recent years netbanking is becoming very popular as it is very easy and convenient to do bank transactions on your system instead going to the bank and waiting in the long queues. As always wherever there is a treasure there are thieves, here we call them hackers. In the recent time, there have been many cases that people have found that their bank accounts are being altered without their knowledge or they have lost all of their hard earned money. This happened due to the stealth of people’s bank account details by the hackers. Since there is risk in netbanking we cannot say NO to it. Perhaps it wont be an appropriate reason for moving away from it. If we consider risk, risk is everywhere, even while crossing a road there is risk of being hit by a vehicle but because of that we dont stop using roads..
The solution is the same what we do for risks on the roads, take precautions. Below are some of the precautions that you can keep in mind while using netbanking.

1. Always check the url in the address bar of your browser, it should have a https rather than http. And verify its the correct url.
2. Avoid using public systems for netbanking like cyber cafe,etc. if you need to use make use of the virtual keyboard provided by the bank’s site.
3. Never respond to any mails asking you to send your netbanking id’s and passwords. On receipt of such mails contact your bank’s branch.
4. Have a strong password (having capital letters, numbers,etc), most of the banks ask for such passwords.
5. Always have your anti-virus updated.
6. Never ignore the warnings given by browser.
7. Use anti-phishing tools like netkraft.
8. Always browse in safe mode of the browser. Mozilla firefox provides a feature called ‘private browsing’ can also be used.

Netbanking is convenient and also secure if you be a little careful while using it.

happy online banking:-)

What motivates us??