Monday, December 31, 2012

Yet another year passed - Welcome New Year 2013

I have been keep on expecting the better India and better life of people in India every day. I have been written few posts in on my blog for the last two years by expecting good changes in the new year as below.

Thanks to 2011

As I was expecting good things for every year, but it has been shamed to see the bad things day by day. At the same time we seen few good achievements in this year. 

Every Indian knows that political changes being scrolled in India during 2012, I am not big interested to discuss more about the dram being happened during 365 days of 2012. I couldn't attracted towards that drama. 

From the sports point, India has won the notable amount of prizes in London Olympics, it makes every Indian to be proud. The cricket legends Sachin Tendulkar, Rahul Dravid, V V S Laxman have declared their retirement this year, it was a bad year for every one who likes cricket and these people.

It has been a great year for every gadget liker. We have seen wonderful gadgets this year with the legend Android operating system and they have reached to most of man's heart. I liked Samsung Galaxy note and Galaxy II. Android brought huge change in human's daily life and became a part of their regular activities. Thanks to Google for providing such a user friendly operating system in the Gadgets.

By the days passing, the corruption in India is keep on increasing and it be became a part of the most of the politicians. Even though 2011 ended by taking the corrupted year with the 2G scam, 2012 has been started with other major scams in India. I don't want to list them all, but every human in India shouldn't forget the corruption made in 2012 by the Indian political people and officers. Thanks to Anna Hazare for the successful anti corruption movement and Lokpal bill, Indian youth is behind you to make such movements more successful in upcoming days.

Finally, 2012 has been ended with the sad story. The 23-year-old girl gangraped on a bus in south Delhi with six men and she was died after valiantly fighting her injuries for 13 days. Whole India prayed for her to get cured from injuries but god has taken her back. This was the big incident in India for 2012. Keep expecting to not have such incidents further. 

As the clock is revolving, days will pass and years will come. What ever the situation may be, we have to invite the new year with new hopes. So, for 2013 I would expect to have great year in my life which I never see. I would expect see the no corruption in India, growth in all aspects and all the government facilities should reach to common people.

Thank you to one and all who are following my blog regularly and  keep on watching my posts continuously. Your support is boosting me to improve the quality of this site.

Finally, Yet Another year passed in my life. So, lets join with me to Welcome the new Year 2013.


Friday, December 28, 2012

Bull Fight at Ocean Park

Tuesday, November 27, 2012

Next version of IP address in India is IPv6

As every tech person has aware of that the IP address are getting ended. The current IP address format is XXX.XXX.XXX.XXX, each XXX is a numeric number between 1 to 256. There should be some other format of IP address for the computers to uniquely identify the individual network interface

So, Indian Registry for Internet Names and Numbers (IRINN) has started issuing next version of Internet addresses 'IPv6(Internet Protocol Version 6)', which would make it easy for security agencies to identify each Internet user. The Internet addresses under the present version IPv4, are limited and service providers often assign single IP address to many users, making it difficult to identify the end user. IPv6 version will increase the IP address pool to high level.

Increasing the IP address pool was one of the major forces behind developing IPv6. It uses a 128-bit address, meaning that we have a maximum of 2¹²⁸ addresses available, or 340,282,366,920,938,463,463,374,607,431,768,211,456, or enough to give multiple IP addresses to every grain of sand on the planet. So our friendly old 32-bit IPv4 dotted-quads don't do the job anymore; these newfangled IPs require eight 16-bit hexadecimal colon-delimited blocks. So not only are they longer, they use numbers and letters. At first glance, those mondo IPv6 addresses look like impenetrable secret code:


The more info about IPv6 can get from

Saturday, November 3, 2012

List of Java Frameworks

S. NoFramework NameURLRemarks

2Apache Click

3Apache Cocoon

4Apache Struts

5Apache Wicket



8Cclipse RAP


10Google Web Toolkit



12IT Mill Toolkit


14Java Server Faces


16JBoss Seam











27PicoContainer Web

















44Web Framewoks








Benefits of XML

There are many benefits of using XML on the Web:
  •  Simplicity- Information coded in XML is easy to read and understand, plus it can be processed easily by computers.
  • Openness- XML is a W3C standard, endorsed by software industry market leaders.
  • Extensibility - There is no fixed set of tags. New tags can be created as they are needed.
  • Self-description- In traditional databases, data records require schemas set up by the database administrator. XML documents can be stored without such definitions, because they contain meta data in the form of tags and attributes.
  • Contains machine-readable context information- Tags, attributes and element structure provide context information that can be used to interpret the meaning of content, opening up new possibilities for highly efficient search engines, intelligent data mining, agents, etc.
  • Separates content from presentation- XML tags describe meaning not presentation. The motto of HTML is: "I know how it looks", whereas the motto of XML is: "I know what it means, and you tell me how it should look." The look and feel of an XML document can be controlled by XSL style sheets, allowing the look of a document to be changed without touching the content of the document. Multiple views or presentations of the same content are easily rendered.
  • Supports multilingual documents and Unicode-This is important for the internationalization of applications.
  • Facilitates the comparison and aggregation of data - The tree structure of XML documents allows documents to be compared and aggregated efficiently element by element.
  • Can embed multiple data types - XML documents can contain any possible data type - from multimedia data (image, sound and video) to active components (Java applets, ActiveX).
  • Can embed existing data - Mapping existing data structures like file systems or relational databases to XML is simple. XML supports multiple data formats and can cover all existing data structures.
  • Provides a 'one-server view' for distributed data - XML documents can consist of nested elements that are distributed over multiple remote servers. XML is currently the most sophisticated format for distributed data - the World Wide Web can be seen as one huge XML database. 

Received Pen drive from Indiblogger

Hi All.....

I have received pen drive from Indiblogger for the contest …it's your time to visit Melbourne NOW.

It is 4 GB and contains woderful pics of the Melbourne

Below are the pics of the pendrive... and my post for the contest is

Monday, October 8, 2012

Single Sign In Web User ID

The time mail reached my mail box on Innovation, my mind has been wondering with the different ideas needs to be present on this… But, routine things came up, busy with daily deliverable and project items. I was searching for some free time to be part of Innovation. So, finally I got some time to share my new idea with all of you now. Hope, this looks small but make you feel interesting.
What is the Problem we are facing in regular days?
We are regularly accessing many number of web sites with different user credentials i.e. different user id and passwords. Some sites accepts few characters as user id, some sites uses email id as user id and some sites require the user id with special characters. As a human being with small mind with a larger body, it is too hard to remember a password along with user Id for a long period of time. It holds good for me but I don’t know about you?
What would be the solution for this?
User  to be registered in a single web site with a user id & password and that would be the reference for other web sites registration, where ever he registers on another web site on the Internet. I require a single step to register on another website instead of filling multiple fields on the web form. Don’t you….?
How to Implement this in real Scenario?
For Example, if user has Gmail ID with all his valid personal data (It should be personally verified and validated by Gmail Team). The other websites should have a look up facility to capture his personal data from the Gmail ID and upon providing gmail id & looks up, it should populate user data into the fields. And, user can simply submits the registration form. The registered web site should use the gmail Id as the user’s login id and gmail pwd would be the password for this website.
(If possible, we can go for Not to store the users personal data  at new website end i.e. The personal data of the user should be stored at Gmail)
How the security will be implemented?
Along with the user Id and password, all the sites which use single step web forms should send a security code to the user’s mobile number which is to be entered by user into a field, hence his credentials will be validated. Hope, user will have more security with pwd and secure code.
What are the Advantages?
1. User can have only one user id for all the websites he register.
2. There no way to use his big brain to remember the passwords for different sites.
3. It is more comfortable for the users and web site managers to have single data on all the websites.
It is looks simple but implementation would be complex.
Let’s bring all the websites into a single tree….

Monday, October 1, 2012

Copy an Array into another Array in Java

The contents of one array can be copied into another array by using the arraycopy() method of the System class in Java.
The arraycopy() method accepts source array, source length, destination array and destination length.
The following program shows the use of arraycopy() method to copy the contents of one array to another.

package com.Test;

public class ArrayCopyTest{

public static void main(String[] args){
int[] src = new int[] {1, 2, 3, 4, 5};

int[] dest = new int[src.length];

System.arraycopy(src, 0, dest, 0, src.length);

for (int i = 0; i < dest.length; i++){

Wednesday, September 5, 2012

Melbourne - Dream place to visit

Melbourne is one of major cities in Australia and it very beautiful, greenery and specially for me it is more lovable place in the world. Even I couldn't get chance to visit Melbourne till today, I have observed many places in the web sites and TV channels and I loved it.

If I could get the chance to visit, the fist place I like to visit is the Cricket Ground. It is one of the biggest stadiums in the world with 100,000 seating capacity. Apart from the Cricket, it is very famous for the Foot ball. It's my dream place to visit since I habituated with watching and playing cricket.

The next place I would like to visit is the historical market i.e. QUEEN VICTORIA MARKET. I would like to taste the all the verities of Australian sea food items, vegetable food items and different fruits available in Australia and complete the shopping on lovable items.

One of my most lovable thing which I can't say by my mouth but just understand from below. Like to have one pe......g in Melbourne.

From childhood days I am hearing about 'Penguin', reading in books and watching in movies. So, I would like see the Penguins in Penguin Island and enjoy the moments.

You may have different taste than me or my like other things when compared to my interests. If you want to know more about Melbourne just visit :

Once you know more about Mebourne, I am sure you definately like to visit Melbourne and it will become a dream place to you. Finally I would like to say, "Melbourne is a city that knows how to live".


…it's your time to visit Melbourne NOW!!!

Create XML File in JAVA using DOM

package com.test;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
public class CreateXMLInJava {
public static void main(String argv[]) {
        CreateXMLInJava createXml = new CreateXMLInJava();
public void createXML() {
    try {
         DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
         DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
        // root elements
        Document doc = docBuilder.newDocument();
        Element rootElement = doc.createElement(“Company”);
       // staff elements
       Element staff = doc.createElement(“Dept”);
       // set attribute to staff element
       Attr attr = doc.createAttribute(“id”);
       // can be written as
       // staff.setAttribute(“id”, “1″);
       // firstname elements
      Element firstname = doc.createElement(“Firstname”);
      // lastname elements
      Element lastname = doc.createElement(“Lastname”);
        // salary elements
      Element salary = doc.createElement(“Salary”);
      // write the content into xml file
      TransformerFactory transformerFactory = TransformerFactory.newInstance();
      Transformer transformer = transformerFactory.newTransformer();
      DOMSource source = new DOMSource(doc);
      StreamResult result = new StreamResult(new File(“D:\\test.xml”));
     // Output to console for testing
     // StreamResult result = new StreamResult(System.out);
       transformer.transform(source, result);
      System.out.println(“File saved!”);
   } catch (ParserConfigurationException pce) {
  } catch (TransformerException tfe) {

Monday, September 3, 2012

Read .xls file in JAVA using POI API

import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

import java.util.Iterator;

public class ReadExcelFileUsingPOI {
public static void main(String[] args) throws Exception {
String filename = "D:\\test.xls";

FileInputStream fis = null;
try {
fis = new FileInputStream(filename);

HSSFWorkbook workbook = new HSSFWorkbook(fis);
HSSFSheet sheet = workbook.getSheetAt(0);

Iterator rows = sheet.rowIterator();
while (rows.hasNext()) {
HSSFRow row = (HSSFRow);
Iterator cells = row.cellIterator();
while (cells.hasNext()) {
HSSFCell cell = (HSSFCell);

int type = cell.getCellType();
if (type == HSSFCell.CELL_TYPE_STRING) {
System.out.println("[" + cell.getRowIndex() + ", "+ cell.getColumnIndex()+"] = STRING; 
                        Value = " + cell.getRichStringCellValue().toString());
} else if (type == HSSFCell.CELL_TYPE_NUMERIC) {
System.out.println("[" + cell.getRowIndex() + ", "+ cell.getColumnIndex()+"]=NUMERIC;
                      Value = " + cell.getNumericCellValue());
} else if (type == HSSFCell.CELL_TYPE_BOOLEAN) {
System.out.println("[" + cell.getRowIndex() + ", "+ cell.getColumnIndex()+"]=BOOLEAN; 
                      Value = "+ cell.getBooleanCellValue());
} else if (type == HSSFCell.CELL_TYPE_BLANK) {
System.out.println("[" + cell.getRowIndex() +", "+cell.getColumnIndex()+"]=BLANK CELL");
} catch (FileNotFoundException e) {
} finally {
if (fis != null) {

Sunday, September 2, 2012

Percentage calculation Example in Java


public final class Percent {

public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(;
System.out.println("enter the total no.of sub");
int n = Integer.parseInt(br.readLine());
int marks[] = new int[n];
int i, tot = 0;
for (i = 0; i < n; i++) {
System.out.println("enter ur marks");
marks[i] = Integer.parseInt(br.readLine());
tot = tot + marks[i];
System.out.println("total marks: " + tot);
System.out.println("percentage of marks: " + (float) tot / n);

Thursday, August 30, 2012

Create Excel File in Java using POI API


import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

public class CreateExcelFile {
public static final String FILE_NAME = "D:\\test.xls";

public void createExcelFile(String filename) {
try {
HSSFWorkbook hwb = new HSSFWorkbook();
HSSFSheet sheet = hwb.createSheet("Sheet1");

HSSFRow rowhead = sheet.createRow((short) 0);
rowhead.createCell((short) 0).setCellValue("S.No.");
rowhead.createCell((short) 1).setCellValue("Emp ID");
rowhead.createCell((short) 2).setCellValue("EMP Name");
rowhead.createCell((short) 3).setCellValue("Dept");

rowhead = sheet.createRow((short) 1);
rowhead.createCell((short) 0).setCellValue("1");
rowhead.createCell((short) 1).setCellValue("EMP1");
rowhead.createCell((short) 2).setCellValue("Mallik");
rowhead.createCell((short) 3).setCellValue("Java");

FileOutputStream fileOut = new FileOutputStream(filename);
System.out.println("Your excel file has been generated!");

} catch (Exception ex) {
public static void main(String[] args) {
CreateExcelFile excelFile = new CreateExcelFile();

Thursday, July 26, 2012

Get Answers for mathematical equations from Google Search

Every one know that Google is always coming up with the new inventions and trying to make the Google as life to the user in future. Below is one of the new invention from the Google.

Google has just released a new 34-button scientific calculator in the Google serch options. Go ahead and enter an equation into Google Search. Try 2+2. Now, instead of simply coming up with the answer, Google presents you with a full, 34-button scientific calculator. You can also find the answers for Trigonometric functions and 'Pi' functions

You can also access the calculator with Desktop Voice Search. Just click the little microphone icon in the search bar, speak your equation out loud and wait a split second for your answer. A pared-down version of the calculator also appears during mobile searches.

Today I have tested the calculator with the mathematical equations, triganometric functions and others..., it is amazing for me.

So, why to wait? start searching mathematical equations or mathematical functions in google.... Hope you will enjoy

Tuesday, July 24, 2012

Are you waiting for Windows 8 to use?

If you are eagerly waiting for new versions of windows with more features, this is the time to know about the windows 8. Every one knows that Microsoft gave a wonderful OS with Windows 7, but still people want more comfort level in using the Computers than earlier. 

Microsoft has released a new version of Windows called Windows 8 with excellent features and functionalities. You can upgrade to new version of Windows  or you can also purchase as a DVD copy from the stores and pricing will be different for different cases.

Friday, July 20, 2012

Convert charr array to String in Java

1. We can convert char array to String by passing the array to String constructor.
public void convertCharArrayToStringOption1() {
    char[] charArray = new char[] { 'a', 'b', 'c', 'd' };
    System.out.println("The new String Array is : "+new String(charArray));

2. We can also pass the char array to 'valueOf()' static method of String class:
public void convertCharArrayToStringOption1() {
    char[] charArray = new char[] { 'a', 'b', 'c', 'd' };
    System.out.println("The new String Array is : "+