Posts

Showing posts from 2012

Configure Netbeans for Apache TomEE and OpenJPA

Image
Apache TomEE is a nice small fully certified JavaEE 6 web profile container. In this blog I will show you how to configure netbeans IDE 7.3 beta 2 to work with TomEE Web Profile 1.5. To learn more about TomEE and to download the server you can visit the following link http://tomee.apache.org/apache-tomee.html And you can get the latest version of Netbeans from its site at http://netbeans.org Now first of all I would like to tell you both TomEE works great Netbeans. There are couple of posts which shows about creating things like EJB and CDI beans in TomEE and Netbeans. But what I could not found in the web is a guide to how to make JPA work in TomEE with Netbeans. So I would try to demonstrate the same in this post. So to begin lets just create a Java Web project in Netbeans (I am assuming you have basic working knowladge with netbeans and you know how to create and run a web project in netbeans). In the server screen we can add TomEE like the given screenshot below. Scre

My Experience with Airtel

My experience with Airtel - Was trying to do a online recharge. it did not do recharge from ING Vysha. So tried doing it from my Credit Card. The transaction was done and when redirecting to airtel the site just shows a time out error. and the fun begins. I tried calling 121. But could not make any head or tail how to get hold of a customer care executive. Then looked into their site and found they have something called a 198 service. So called them and after struggling through a list of menus finally I got hold of the final golden combination to talk to a customer care executive. Man I am sure Einstein was not more happier then me when he found theory of relativity. Finally after hearing jo tera hai woh mera (Ah. really surely they took my money and did not recharged my mobile)  for a reaaaal loooong time in a flanky voice  mixed with the word that my call is important to them, finally i got hold of a customer care executive. He started speaking something in some weird language. I ask

FizzBuzz in ruby in one line

Some days back I came accross this blog which says about writing the classic fizzbuzz program in one line using Haskell. So that inspired me about writing a single line FizzBuzz program in Ruby. So here you go. This is the code that I came out with. puts (1..100).map{|i|i%3*i%5==0?(i%3==0?"Fizz":"")+(i%5==0?"Buzz":""):i.to_s}.join(",") Do let me know if you can come out with something even smaller