Friday, June 30, 2017

Core Java Course

 Contents

Introduction to Java
Language Features
First Step Towards Java Programming
Naming Conventions and Data types
Operators in Java, Control Statements in Java

Input and Output
Arrays, Strings, String Buffer and String Builder

Introduction to OOPS
Classes and Objects
Inheritance, Polymorphism, TypeCasting, Abstract Classes
Packages and Interfaces
Wrapper Classes
Exception Handling in JAVA
Collection Hierarchy
Generic Types
I/O in JAVA
Threads
Java Database Connectivity
Servlets

Saturday, March 3, 2012

Good sites for Competitive exams

  • eenadupratibha.net doubts to 'Ask the expert', Soft skills for online exams, Job notifications etc.,
  • www.onlinegkguide.com General knowledge, Current affairs, GK quizzes, career news, World current affairs and India current affairs
  • www.indiaacademic.com Colleges, Universities entrance exams, Education loans, Scholarships, CAT, ICET, GATE EAMCET Sample papers are available.
  • www.indiabix.com online exam sample tests, Interview tips, Sudoku, Number puzzles, Missing letters, Clock puzzles; Programming C,C++,Java lessons are also available. In interview part, Group discussions, HR interview, Technical interview, Body language tips are also available.
  • www.win4exams.com For competitive exams, Pre material tab ---> Bank clerk, Bank PO, NTSE, SSC, BEd exam materials are available and also downloadable by login to site.
  • www.bankingexams.com Competitive exams, results, online book stores, interview tips, boooks, forum details are available
  • www.competitionmaster.com Competitive exams, notifications, essays, model papers, Mock test, preparation tips; MBA, CAT, MAT NDA,CDS Civil services, UPASC, bank po details are available; Career planning, For IQ test www.wiziq.com/tests/ services. It's online teaching community
  • http://examcrazy.com For GATE, CAT AIEEE, IAS, DRDO exams: How to prepare? What are the books to read, doubts etc.,
  • http://aptitude9.com For Aptitude, Reasoning, Computer knowledge, IBPS quizzes, Sample tests to know our knowledge.

Sunday, June 12, 2011

Steps to configure Tomcat


Main configuration file for Tomcat is TOMCAT_DIR/conf/server.xml

According to javasoft standards we can create any no of web app's and run on a
single servlet container.

A web application is defined as a hierarchy of directories and files in a standard layout.
Such a hierarchy can be accessed without packing, or in a "packed" form known as a
Web ARchive, or WAR file.

There are many ways of deploying our servlets on tomcat.

1) create web application directory according to standard format under
TOMCAT_HOME/webapps directory.

2) copy war file under TOMCAT_HOME/webapps directory.

3) use tomcat admin tool to deploy a webapp.

4) Add a entry in the TOMCAT_HOME//conf/server.xml configuration file


Directory layout for web apps

Under the document root. we can place html , jsp and other files.

/WEB-INF/web.xml is the configuration file of our application.

/WEB-INF/classes/ to place java classes required for our application.

/WEB-INF/lib/ to place jar files required for our application.


Tomcat specific.

TOMCAT_HOME/common/lib

---------------JAR files placed here are visible both to web applications and internal Tomcat code.

TOMCAT_HOME/shared/lib

---------------JAR files placed here are visible to all web applications, but not to internal Tomcat code.


Wednesday, June 8, 2011

Building jar file using Ant

Steps for building a jar file using ant tool:

1. Open a terminal and go to c:\ (say) and set the path as

set PATH=C:\bea\weblogic92\server\bin;%PATH% if the ant.bat is in this location.

2. Create ant folder in c:\ and go to c:\ant and create src folder in the directory ant.

3. Copy all your java source project files in src directory.

4. Create a file “build1.properties” as

BUILDDIR = build

CLSDIR=${BUILDDIR}/classes

LIBDIR=${BUILDDIR}/lib

SRCDIR=src

5. Create a file “build.xml” as

Trying to reach cdirs target

Trying to compile the files

6. In the above Xml, where Main-Class is the main class of the project.

7. Now you can compile in the terminal as

c:\ant>ant

For rebuild c:\ant>ant rebuild

8. You can see the app.jar file in c:\ant\build\lib directory


M.Tech CSE II year
Project
: Cloud Computing

CLOUD computing is an emerging computing paradigm which combines the technologies like grid computing utility computing, virtualization and clustering to provide a set of services to the cloud customer. Cloud is a higher level abstraction, where the underlying hardware and software details are hidden from the user. The end user can avail the various services provided by the cloud to build his/her applications.
The services that can be provided from the cloud includes Software as a Service (SaaS), Platform as a Service (PaaS) and Infrastructure as a Service (IaaS). Software as a Service rent applications functionality from the service provider so that the client can avoid purchasing, installing and running the software necessary for the application. Salesfroce.com is one such company which is providing the service of this type. In Platform as a Service, the idea is to provide the necessary platform for developing and executing the client application. Google and Microsoft are two major players in providing PaaS. In PaaS, the services provided include database management, security, Work flow management, application serving. The computational power and storage space required for the application are also offered as a service from the cloud which is known as Infrastructure as a Service.

Problem Statement

To achieve semantic interoperability between web applications (such as JSP, PHP) using XML. Development of algorithms for prototype implementation to test the methodology specifically by converting JSP to PHP and PHP to JSP using XML as an intermediate representation.

For more details:
http://sites.google.com/site/cloudcomputingfamily/


Programming Skills
Every body knows C/C++ basically. I have very much fond of Java.




Linux Basics

1. Creating Linux Partitions

After booting the installation media, run fdisk by typing

fdisk <drive>

where drive is the Linux device name of the drive you plan to add partitions. For instance, if you want to run fdisk on the first SCSI disk in your system, use the command fdisk /dev/sda. /dev/hda (the first IDE drive) is the default if you don't specify one.

If you are creating Linux partitions on more than one drive, run fdisk once for each drive.

veeresh@veeresh-desktop:~$ sudo fdisk /dev/hda

Command (m for help):

Here fdisk is waiting for a command; you can type m to get a list of options.

Command (m for help): m
Command action
a toggle a bootable flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
p print the partition table
q quit without saving changes
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help):p

Disk /dev/hda: 16 heads, 38 sectors, 683 cylinders
Units = cylinders of 608 * 512 bytes

   Device Boot  Begin   Start     End  Blocks   Id  System
/dev/hda1 * 1 1 203 61693 6 DOS 16-bit >=32M
Command (m for help):
In this example, we have a single MS-DOS partition on /dev/hda1, which is 61693 blocks (about 60 megs).This partition starts at cylinder number 1, and ends on cylinder 203. We have a total of 683 cylinders in this disk; so there are 480 cylinders left to create Linux partitions on.

To create a new partition, use the n command. In this example, we'll create two primary partitions (/dev/hda2 and /dev/hda3) for Linux.

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p

Here, fdisk is asking the type of the partition to create: extended or primary. In our example, we're creating only primary partitions, so we choose p.

Partition number (1-4):

fdisk will then ask for the number of the partition to create; since partition 1 is already used, our first Linux partition will be number 2.

Partition number (1-4): 2
First cylinder (204-683):

Now enter the starting cylinder number of the partition. Since cylinders 204 through 683 are unused, we'll use the first available one (numbered 204). There's no reason to leave empty space between partitions.

First cylinder (204-683): 204
Last cylinder or +size or +sizeM or +sizeK (204-683):

fdisk is asking for the size of the partition to create. We can either specify an ending cylinder number, or a size in bytes, kilobytes, or megabytes. Since we want our partition to be 80 megs in size, we specify +80M. When specifying a partition size in this way, fdisk will round the actual partition size to the nearest number of cylinders.

Last cylinder or +size or +sizeM or +sizeK (204-683): +80M

Warning: Linux cannot currently use 33090 sectors of this partition

If you see a warning message such as this, it can be ignored. fdisk prints the warning because it's an older program, and dates before the time that Linux partitions were allowed to be larger than 64 megabytes.

Now we're ready to create our second Linux partition. For sake of demonstration, we'll create it with a size of 10 megabytes.

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (474-683): 474
Last cylinder or +size or +sizeM or +sizeK (474-683): +10M

At last, we'll display the partition table. Again, write down all of this information---especially the block sizes of your new partitions. You'll need to know the sizes of the partitions when creating filesystems, later. Also, verify that none of your partitions overlap.

Command (m for help): p

Disk /dev/hda: 16 heads, 38 sectors, 683 cylinders
Units = cylinders of 608 * 512 bytes

   Device Boot  Begin   Start     End  Blocks   Id  System
/dev/hda1 * 1 1 203 61693 6 DOS 16-bit >=32M
/dev/hda2 204 204 473 82080 81 Linux/MINIX


/dev/hda3 474 474 507 10336 81 Linux/MINIX

As you can see, /dev/hda2 is now a partition of size 82080 blocks(which corresponds to about 80 megabytes), and /dev/hda3 is 10336 blocks (about 10 megs).

Finally, we use the w command to write the changes to disk and exit fdisk.

Command (m for help): w

Thus Linux partitions are created successfully.


2. How to setup Internet connection in linux environment?
All of us know about setting ipaddress details in Network connections icon which is on system tray. To setup permanently follow the steps:
open the terminal:
veeresh@veeresh-desktop:~$ sudo su
[sudo] password for veeresh: *****
veeresh@veeresh-desktop:~$ gedit /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.3.182
netmask 255.255.255.0
gateway 192.168.3.1
auto eth0
veeresh@veeresh-desktop:~$ gedit /etc/resolv.conf
search localdomain
nameserver 192.168.254.2
nameserver 192.168.254.3
veeresh@veeresh-desktop:~$ /etc/init.d/networking restart
Note: In fedora use setup command on the terminal to configure the ipaddress.

3. Tool for CD/DVD R/W k3b (like Neuro 7 in Windows)
K3b is a CD and DVD writing ('burning') application.

Key Features
  • KDE-friendly application
  • Write data disks
  • Write audio disks
  • Write 'images' to disk (e.g. Linux distributions)
  • Copy disks
Installation
open the terminal:
veeresh@veeresh-desktop:~$ sudo apt-get install k3b
After successful installation
veeresh@veeresh-desktop:~$ k3b