Wednesday, May 22, 2013

Java servlet with eclipse

For quick reference to learn Java servlet with eclipse, check out the following references: 1. from http://www.javatpoint.com/creating-servlet-in-eclipse-ide 2. http://theopentutorials.com/examples/java-ee/servlet/how-to-create-a-servlet-with-eclipse-and-tomcat/ 3. http://java.keicode.com/lang/web-tomcat.php 4. http://www.srccodes.com/p/article/3/Tomcat-Hello-World-Servlet-using-Eclipse-IDE

Sunday, November 18, 2012

Data Wharehouse Project Development memo

We need Request For Proposal document Data Wharehouse Project Proposal Business assumptions Technical assumptions Technology assumptions http://www.google.co.jp/url?sa=t&rct=j&q=sample%20data%20warehouse%20project%20proposal&source=web&cd=1&cad=rja&ved=0CBwQFjAA&url=http%3A%2F%2Fcoitweb.uncc.edu%2F~wwu18%2Fitcs6163-sp09%2Fprojects%2Fproposals%2FData%2520Warehousing%2520Project%2520Proposal.ppt&ei=c-SoUNLiHePkmAXG8ID4Dw&usg=AFQjCNFFb_8zImNU0Uzv7ZXrW6IR9SsG1Q http://www.ibm.com/developerworks/data/library/techarticle/dm-0506gong/ http://www.executionmih.com/data-warehouse/project-plan.php https://docs.google.com/viewer?a=v&q=cache:NhRrKHvyogAJ:www.sccgov.org/sites/mhd/Mental%2520Health%2520Services%2520Act/Capital%2520Facilities%2520-%2520Technological%2520Needs%2520(CFTN)/Documents/SCVHHS-MHD-Enterprise-Data-Warehouse-Enclosure-3.pdf+data+warehouse+project+proposal&hl=en&gl=jp&pid=bl&srcid=ADGEESh17lO3g179-b9yzqMNi9lZSPfTtKr-Q3dk2tmGNMoLLWGtGiUCuO7Ff8kJWyjShVc1m1J5hDeOa7CV9mxz9eKDOTv8NG2N0_VzvaboRkM_Y1CwrBuq4HHYI5XpwLfLRUEGjOxP&sig=AHIEtbT7f9gRJ3ett6oADUmuNqXtJYXHHw http://epublications.marquette.edu/cgi/viewcontent.cgi?article=1118&context=theses_open&sei-redir=1&referer=http%3A%2F%2Fwww.google.co.jp%2Furl%3Fsa%3Dt%26rct%3Dj%26q%3Dsample%2520data%2520warehouse%2520project%2520proposal%26source%3Dweb%26cd%3D4%26cad%3Drja%26ved%3D0CDAQFjAD%26url%3Dhttp%253A%252F%252Fepublications.marquette.edu%252Fcgi%252Fviewcontent.cgi%253Farticle%253D1118%2526context%253Dtheses_open%26ei%3Dc-SoUNLiHePkmAXG8ID4Dw%26usg%3DAFQjCNEU6Iyxy5mh0fKybhsaDg8Dw_0UKQ#search=%22sample%20data%20warehouse%20project%20proposal%22

Friday, November 16, 2012

Java Map Interface

Java Map Interface is an object that maps keys to values. A map cannot contain duplicate keys: Each key can map to at most one value. It models the mathematical function abstraction. The following program generates a frequency table of the words found in its argument list. The frequency table maps each word to the number of times it occurs in the argument list. import java.util.*; public class Freq { public static void main(String[] args) { Map m = new HashMap(); // Initialize frequency table from command line for (String a : args) { Integer freq = m.get(a); m.put(a, (freq == null) ? 1 : freq + 1); } System.out.println(m.size() + " distinct words:");

Wednesday, November 14, 2012

Declaring a Variable to Refer to an Array

Like declarations for variables of other types, an array declaration has two components: the array's type and the array's name. An array's type is written as type[], where type is the data type of the contained elements; the square brackets are special symbols indicating that this variable holds an array. The size of the array is not part of its type (which is why the brackets are empty). An array's name can be anything you want, provided that it follows the rules and conventions as previously discussed in the naming section. As with variables of other types, the declaration does not actually create an array — it simply tells the compiler that this variable will hold an array of the specified type.
Similarly, you can declare arrays of other types:
byte[] anArrayOfBytes;
short[] anArrayOfShorts;
long[] anArrayOfLongs;
float[] anArrayOfFloats;
double[] anArrayOfDoubles;
boolean[] anArrayOfBooleans;
char[] anArrayOfChars;
String[] anArrayOfStrings;
You can also place the square brackets after the array's name:
// this form is discouraged
float anArrayOfFloats[];
However, convention discourages this form; the brackets identify the array type and should appear with the type designation. Below is an example of converting a date string into Integer Array.
string date_str = "2012/11/06";
String str_arr[] = date_str.split("/");
int[] int_arr = new int[4];
int_arr[0] = Integer.valueOf(str_arr[0]);
System.out.println(int_arr[0]);

Monday, November 12, 2012

Arrays in Java

An array is a container object that holds a fixed number of values of a single type. The length of an array is established when the array is created. After creation, its length is fixed. Each item in an array is called an element, and each element is accessed by its numerical index. As shown in the above illustration, numbering begins with 0. The 9th element, for example, would therefore be accessed at index 8. The following program, ArrayDemo, creates an array of integers, puts some values in it, and prints each value to standard output.
class ArrayDemo {
    public static void main(String[] args) {
        // declares an array of integers
        int[] anArray;

        // allocates memory for 10 integers
        anArray = new int[10];
           
        // initialize first element
        anArray[0] = 100;
        // initialize second element
        anArray[1] = 200;
        // etc.
        anArray[2] = 300;
        anArray[3] = 400;
        anArray[4] = 500;
        anArray[5] = 600;
        anArray[6] = 700;
        anArray[7] = 800;
        anArray[8] = 900;
        anArray[9] = 1000;
  System.out.println("Element at index 0: "
                           + anArray[0]);
        System.out.println("Element at index 1: "
                           + anArray[1]);
        System.out.println("Element at index 2: "
                           + anArray[2]);
        System.out.println("Element at index 3: "
                           + anArray[3]);
        System.out.println("Element at index 4: "
                           + anArray[4]);
        System.out.println("Element at index 5: "
                           + anArray[5]);
        System.out.println("Element at index 6: "
                           + anArray[6]);
        System.out.println("Element at index 7: "
                           + anArray[7]);
        System.out.println("Element at index 8: "
                           + anArray[8]);
        System.out.println("Element at index 9: "
                           + anArray[9]);
    }
} 
The output from this program is:
Element at index 0: 100
Element at index 1: 200
Element at index 2: 300
Element at index 3: 400
Element at index 4: 500
Element at index 5: 600
Element at index 6: 700
Element at index 7: 800
Element at index 8: 900
Element at index 9: 1000

Sample Cover letter

Name of Employer
Address of Employer
Email: employer email address

Thursday, October dd, yyyy
Subject: Post to apply

Dear Sir/Madam,
I am applying for the position for the above subject as recently advertised at [job announcement site].

As you will note from my resume attached, I am currently working as system and software engineering to develop the [ICT-D system] for [Company A].
Beside the experiences of system and software engineering, I also had experience in establishing and maintaining good working relations with people of different national and cultural background through the cooperated project with [International company B] to Research and Develop the Application Specific Integrated Circuit (ASIC) for [Company C].
From my experiences, I have worked on various projects related to Information and Communication Technology, system integration research and development for more than 9 years of professional working  in network using a variety of operating systems (OS) and platforms.
My experience and expertise in ICT makes me confident that I have the necessary traits to manage and provide best IT technical support to user community, and that my ability to work in challenging assignments and places will stand me in good stead when handling the responsibilities associated with a position in the area of IT.
Thank you for your consideration.
Yours Sincerely
You Name

Sample posting:
http://partner.jica.go.jp/recruitdetail?id=a0T10000002uDLcEAM&mode=DETAIL

Sunday, October 28, 2012

Setup the Java Servlet development environment tutorial


This tutorial provides step by step instructions to setup the Java development environment required to test various servlet examples given throughout all the tutorials. This tutorial will also be helpful when you start practicing servlets yourself.

List of required softwares:

  1. Java Software Development Kit (JAVA SDK)
  2. Tomcat
  3. Eclipse for Java

Note: this tutorial explains how to install required software on your windows based PC only.
First of all you need the Java software development kit (JAVA SDK) to be installed.

Checking if JAVA is already installed in your system

Follow this step to check if Java software development kit (JDK) is already installed in your system.
To determine if JAVA SDK is already installed in your system, run the following command from command prompt.

> Java –version
If  JAVA platform is already installed, it will display the version of the JAVA SDK. Below screen shows JAVA version 1.6 running on a windows system. If command executes successfully and shows JAVA version 1.6, you can skip the next step. Otherwise download and install the Java SDK as explained in next step.









Install JAVA SDK

First thing you need to install is Java software development kit (Java SDK) . Download the Java development kit 7 (JDK 7) from Sun Java SE Download site. Current latest version is JDK 7 update 7.

Set up the JAVA_HOME environment variable

Once the JAVA SDK is installed follow this step to set the JAVA_HOME environment variable. If JAVA_HOME variable is already set, you can skip this step.

Right click on My Computer icon on your desktop it will open a popup menu, click on properties, it will open the system properties window, then click on advanced tab.


Click on environment variables button, it will open the environment variables window as shown in figure below. Initially there will be no JAVA_HOME environment variable set as shown in figure.



Click on new button to add new system variable JAVA_HOME.



In the variable name filed, enter JAVA_HOME. Specify the path to root directory of JAVA installation in variable value field and click OK button. Now JAVA_HOME will appear under user variables.

Next you need to add bin directory under the root directory of JAVA installation in PATH environment variable.Select the PATH variable from System variables and click on Edit button.

Add: ;%JAVA_HOME%\bin; at the end of variable value field and click OK button.

Now verify that everything is correct by following the step: Checking if JAVA is already installed in your system. It should show the version of the installed JAVA SDK.