Monday, December 27, 2010

Bollywood Hits around 1990's.

2010 year end vacation time began with a complex plan in my mind on how to spend each of the holiday on the vacation.But according to the theorom 'always has to expect unexpected things',I went down with severe fever and need to rest for few days. Hence I had to look into another backup plan.
Thus as an item in the backup plan,I decided to continue on my school time hobby,listening to bollywood songs around 1990's.Finally I got the feeling,it's better if I could share some of them due to the beauty and attractiveness of those melodies.
Following are those selected hits.Listen to them and enjoyyy...

Film:Jo Jeeta Wohi Sikandar
Song:Pehla Nasha
Singer(s): Sadhana Sargam, Udit Narayan

Film: Qayamat Se Qayamat tak
Song: Ae Mere Humsafar
Singer(s): Alka Yagnik, Udit Narayan

Film:Raja Hindusthani
Song: Aaye Ho Meri Zindagi Main
Singer(s): Alka Yagnik, Udit Narayan

Song: Jadoo teri nazar
Singer(s):Udit Narayan

Monday, November 22, 2010

Learned a Lession

Install Ubuntu in Windows

When I had to install Ubuntu for the first time ,what I did was simply install it inside windows using wuby installer.
For that moment it seemed the easiest way to done so,but later I was realized how much of troubles it gave for me,while using my duel-boot laptop.According to my requirements I required high capacity in Ubuntu to do programming.But when ubuntu installed inside Windows OS in same partition,the amount of usable space for working in ubuntu is highly reduced.So the performance become highly decreased.Sometimes
machine got to stuck.
So by my own experience,I want to say if you are going to install ubuntu for a machine in which Windows already installed and going to start programming on ubuntu,always try to install Ubuntu in another seperate partition.It will take more time and feel much more complex during the installation period.But I'll guarantee it will results high performance to carry on your work on Ubuntu in later time.

Saturday, November 20, 2010

AJAX-XMLHttpRequest Part3

(Link with the post AJAX-XMLHttpRequest 2 )

Finally a function useHttpResponse need to be written which will establish when the server has completed our request, and do something useful with the data it has returned:

function useHttpResponse() {
if (http.readyState == 4) {
var response = http.responseText;


Note here that the function checks for a readyState value of 4 - there are various numbered states describing the progress of such a request, but only value of 4 indicates that the request is complete and we can use the returned data.

In this case, the information has received as simple text via the responseText property of our XMLHTTPRequest object. Information can, however, be returned as XML ,JSON or as properties of a predefined javascript object.


AJAX-XMLHttpRequest Part2

(Link with the post AJAX-XMLHttpRequest 1)

First, need to know how to create an XMLHTTPRequest object.
With IE(The way of creating the object depend on the web browser), the request looks like:

http=new ActiveXObject("Microsoft XMLHTTP");

whereas in a standards-compliant browser object can be instantiated as:

http = new XMLHttpRequest();

Then an event handler which will be called via some event on user's page need to be written and it will handle sending the request for data to the server.

In the following example event handler called updateData ,a request of the server is made by using a GET method to an appropriate server-side script.A XMLHTTPRequest object has created and called it http:

function updateData(param) {

var myurl = [here I insert the URL to my server script];"GET", myurl , true); //This is to open the connection with the server.

http.onreadystatechange = useHttpResponse;


} method: The Http request of the XMLHttpRequest object initialize through the open method. This method invoke prior to the actual sending of a request to validate the request method and URI user information to be used for the request. This method does not assure that the URL exists or the user information is correct.

The first parameter of the method is a string indicating the HTTP request method to use. It can be either a GET,POST,PUT,DELETE or HEAD.The second parameter of the method is another string, this one indicating the URL of the HTTP request.

The third parameter, a boolean value indicating whether or not the request will be asynchronousAn asynchronous request ("true") will not wait on a server response before continuing on with the execution of the current script. It will instead invoke the onreadystatechange evnt listner of the XMLHttpRequest object throughout the various stages of the request.

A synchronous request ("false") however will block execution of the current script until the request has been completed, thus not invoking the onreadystatechange event listener.

AJAX-XMLHttpRequest Part1

I'm totally new to AJAX technology.Since I got an AJAX related task on my job,I had to carry out a research on it and get a clear understanding on it.Following is the knowledge I gained from that research.

Before talking about XMLHttpRequest, I'll describe what is AJAX.
Ajax (Asynchronous Javascript And XML) is a technique to submit server requests and return information from the server to the user without the necessity of waiting for a page load.

An Ajax script makes a request of a server by using the Javascript XMLHTTPRequest object,instead of using a a normal HTTP POST or GET request.XMLHTTPRequest retrieves information from the server in an invisible manner without using a page refresh.
(Link with the post AJAX-XMLHttpRequest 2)

Sunday, November 7, 2010

Convert an InputStream to XML

For that we can use DocumentBuilder class in java. By using the method parse(InputStream) ;A new DOM Document object will return.

InputStream input;

DocumentBuilderFactory factory
= DocumentBuilderFactory.newInstance();
DocumentBuilder parser = factory.newDocumentBuilder();
Document dc= parser.parse(input);

In the above code segment,by using the created Document object,the corresponding XML file for the inputStream can be accessed.


Hashmap with random key values in java

Random r = new Random();
int i = r.nextInt();
HashMap store = new HashMap();
store.put(i, values);//Here values need to be retrieved.

Convert a ByteArrayInputStream to a XML file

InputStream input;
OutputStream out = new FileOutputStream("file location");
int read=0;
input = registry.get(Path).getContentStream();

byte[] bytes = new byte[1024];

while((read =!= -1){
out.write(bytes, 0, read);
out.write( '\n' );


System.out.println("New file created!");


  • How to retrieve a value for a parameter included in a request?
String Url=req.getParameter("url"); //get the value for the parameter url

  • How to set a value for any attribute in a request?
req.setAttribute("key", 123); //set the value 123 for the attribute 'key'

JSON-JavaScript Object Notation

JSON is a syntax for passing around objects that contain name/value pairs, arrays and other objects.
It is a lightweight text-based open standard designed for human-readable data interchange.
And it is language-independent, with parsers available for virtually every programming language.The JSON format is often used for transmitting structured data over a network connection.
JSON is primarily used to transmit data between a server and web application, serving as an alternative to XML.

JSON Format
  • An object is an unordered set of name/value pairs.
  • An object begins with { (left brace) and ends with } (right brace).
  • Each name is followed by : (colon).
  • The name/value pairs are separated by , (comma).
  • An array begins with [ (left bracket) and ends with ] (right bracket). Values are separated by , (comma).
The following example shows the JSON representation of an object that describes a employee.
The object has string fields for first name and last name, a number field for age, contains an object representing the person's address, and contains a list (an array) of phone number objects.
"firstName": "John",
"lastName": "Smith",
"age": 25,
"streetAddress": " Street",
"city": "New York",
"type": "home",
"number": "212 555-1234"
"type": "fax",
"number": "646 555-4567"


Saturday, October 9, 2010

Jefe Research Papers published + ICter Conference

The two research papers compiled out during our final year project Jefe (The Ultimate Software Development Workflow Managemnt Solution) has been selected for the International Conference on Advances in ICT for Emerging Regions - ICTer2010 held on 29 September 2010 to 1 October 2010 .It's really happy that we could able to successfully published both papers.yepeeeeeeee............

The better part of this was we had to present our two research papers to the ICTer Conference audience.One was done by me.It was rather a funny experience with race conditions how I came to Cinamon Lakeside hotel to do it on time.
But during the presentation,it was a GREAT experience to present our research work to a well experienced IT audience for the first time in my life as a new comer to the IT industry.

So thank you my team members for doing the project work as a team and giving me this great opportunity and then thank you our dearest supervisors Shahani Madam and Sulochana madam for encouraging us during project work.

First Three Weeks at WSO2

Though leaving the uni life and uni friends and switching to the career life feels very sad ,
I would like to say it was an awesome time period ,I was able to experience during my first three weeks at WSO2.
I started my career from 13th of September 2010.

The first week at WSO2 was full of different experiences including Introduction program,Two-days WSO2 conference,Discussion about products with customers and the fabulous WSO2 birthday party.
The second week began with dividing new comers to teams.I was allocated to GS (Gadget Server)team.
Our team is for developing a web based portal as a dashboard solution to integrate WSO2 back-end products and more as gadgets.

At the first day of WSO2,we were given laptops and the first thing that I was done as a task ,is installing Ubuntu.Since I'm new to Ubuntu environment,I had to get familiarized with friends' support.

Then I started to get the Carbon product to my machine.First I checked out the Carbon product from the trunk and then built it successfully.Though it took couple of days to finish by fixing some build errors.
Since my Product Manager was getting study leave from my second week at WSO2,he gave me a task to do during that time.For that as the initial step, I got familiarized with jQuery,Json,JSP and JavaScript technologies.
During working on this task,I was able to participate some training sessions and get a better idea about OSGI framework,Create OSGI bundles, Importance of OSGI bundles,about Axis2,about WSDL and Web services,Create web services in different ways,etc.

Finally I would say,it's really a great opportunity to start my career from WSO2 and wants to ensure myself as a permanent member of WSO2 family after probation period. :)

Monday, September 20, 2010

End of ...Uni Life

After a joyful,busy,happy,sad,enjoyable,fantastic,hard,etc..of four years duration,finally I'm out from the university.
It's very sadful coz I'm really going to miss a lot of good friends.Thank you very much dear friends for being with me in both sad and happy moments in my four years of uni life.

Now it's time to change my life style from uni life to job life.

Tuesday, June 29, 2010

Setup a Mercurial Repository in Windows

Installing Mercurial Server on windows

As the first step download Tortoise Hg from the below link and install it. Before download you need to select the compatible tortoise Hg installer according to your PC/Laptop’s number of bits (32 or 64).

Get Tortoise Hg:

Tortoise Hg works as a front end UI to Mercurial and always installs the latest version of each.

Configure Tortoise Hg

First step should be to make sure that you are correctly identified to TortoiseHg. You do this by opening the global settings dialog. Right click on the desktop background and

select TortoiseHg -> Global Settings.

Select the Commit page and enter a name in the Username field.

Note:If you neglect to configure a username TortoiseHg will ask you to enter one when you try to commit, which is the first time a username is actually required.

You can do more configuration changes in tortoise Hg. For further details refer this web site;

Create a new Repository with Tortoise Hg

Right click on the selected folder as the root of the project and select Create Repository Here. Thus Mercurial users have to create repositories in each of their working folders.

It’s better to keep Add special files (.hgignore, ...) checked, and do not check Make repo compatible with Mercurial 1.0 unless you have a strong reason to do so.

After pressing Create, Mercurial creates a subdirectory in your project folder named .hg. This is where Mercurial keeps all its version data. It is called the repository or store, while the directory containing the source files is called the working directory. You never need to specify the .hg directory when running commands, you only need to specify the working directory root.

Saturday, May 1, 2010

An approach to integrate applications in to a portal engine

Displaying existing web interface of an application

Creating a portlet with a more granular level without relying on JSR 168 portlet API is done by embedding the web interface of an application to an IFrame (Inline Frame) portlet.

An IFrame portlet invokes an URL inside an IFrame within the portlet window. It gets content referenced by an URL and displays it in a portlet. IFrame portlets can be downloaded freely or else they can be found already integrated in many web portals. Thus a user can use a portlet integrated to a portal or either create a custom IFrame portlet. Basically these portlets contain following jsp pages:

--configuration.jsp (for edit mode) -This is for adding configuration values such as source URL of directing web page, look and feel attributes and authenticating attributes.

--view.jsp (for view mode) - This makes possible to view the embedded web page inside the current portal page with the help of the functions in the portlet namespace.

--proxy.jsp- This facilitates passing timeout values and authentication values.

Following custom configurations can be done to a default IFrame portlet.

--It is possible to configure the embedded URL by limiting the ‘iframeSrc’ portlet preferences attribute to a custom URL instead of adding the URL of embedded web page several times at each time the IFrame portlet is added to a portal page.

--It can be changed the portlet name by changing the parameter ‘portlet-name.value’ in the portlet.xml file.

--It is possible to manage session timeouts of an IFrame with Ajax using a XMLHttpRequest call to refresh the content inside the portlet without having to refresh the entire portal page[6].

--It can be configured to retrieve the user name and password of the current user, who is viewing the page using the ‘getUser’ method of the ‘PortalUtil’ class and that will be used to authenticate against the embedded web page.

Thursday, March 18, 2010

Environmental Threats- Computer Security


To gain high secure, a system must be concerned about the interference of natural matters too. The natural matters which affect the security of a computer system are called as ‘Environmental Threats’. Some of the examples for environmental threats can be categorized as extreme cold,heat,humidity,dust,rainfalls,earthquakes, floods, fires, hurricanes, snow, ice, mud slides and sink holes.

Methods of mitigating Environmental Threats

· Air filters should remove fine dust particles because outdoor dust is brought in on clothes and shoes

· Air filters must be cleaned or replaced in a regular schedule.

· Periodically air heating equipment should be turned on, even it isn’t needed. This is to incrementally burn off that would other wise accumulate and be converted to an appreciable amount of smoke, when the equipment is activated for the first time after a long time period.

· Water detectors should be placed above and below a raised floor to monitor the rise of water level.

· An automatic power shutdown should be triggered by a sensor that is lower than the lowest energized wire.

· Any equipment that produces strong magnetic fields should be kept in a room separate from any media that is not scheduled to erase.

· Computers should be kept away from sources of vibrations, including printers. If this can’t be arranged, vibration absorbing mats can be placed under the computer or offending device.

· A dependable and redundant system of air conditionings and humidity controls need to be implemented, monitored continuously and issued alerts when problems occurred.

· If possible the use of a humidifier and dehumidifier should be used to keep a proper humidity levels as climate area and air conditioners can affect greatly the proper levels of humidity in this controlled environment.

· Routers and switches should be placed in an equipment rack with the proper spacing between devices to allow for proper airflow. Typically you will want to allow one “rack unit” or RU between the equipment within the rack.

· Automatic fire detectors should be placed on the ceilings of the rooms as well as hidden spaces (Eg.below raised floors and above suspended ceilings).These fire detectors must be able to function during a power outage.

· An alarm triggering a HI or LOW temperature parameter should be sent to a remote monitoring facility, emailed, text messaged, or paged to the proper personnel.

· As a backup plan, fans should be stored nearby for use in an emergency, as they could mean the difference between keeping equipment online and functioning and being destroyed by the heat if a failure was to occur.

· Long term preservation of data should be stored in magnetic or optical format to keep those data in perpetuity.

· The important and necessary data of the system should be kept as backups in magnetic or optical format to keep for a long time.


  1. The paper 'The Changing Face of Network Security Threats'
  2. The book 'Internet Encyclopedia,Volume 03'