Tuesday, June 30, 2009

transient keyword

How do you serialize an object of a class that contains a non-serializable class as a field?
Like a Thread object

What about a field that you don't want to to serialize?
Mark them with the transient keyword

The transient keyword prevents the data from being serialized
Serialization does not care about access modifiers

such as private -- all nontransient fields are considered part of an object's persistent state and are eligible for persistence

List of Free Open Source Educational Software for Academic use


List of Free Open Source Educational Software for Academic use


For Chemistry

Kalzium
A periodic table of the elements
Kalzium is a program which shows you the Periodic Table of Elements. You can use Kalzium to search for information about the elements or to learn facts about the periodic table.
http://edu.kde.org/kalzium

gchemcalc
GChemCalc is a simple calculator for chemists
http://www.nongnu.org/gchemutils


GChemPaint
GChemPaint is a 2D chemical structures editor
http://www.nongnu.org/gchempaint



gElemental
gElemental is a periodic table viewer that provides detailed information on the chemical elements
http://www.kdau.com/projects/gelemental/


gperiodic 2.0.10
This program shows the periodic table of elements and information about these elements
http://www.frantz.fi/software/gperiodic.php

KAtomic
KAtomic is both fun and educational game built around molecular geometry. It employs simplistic two-dimensional looks at different chemical elements. Elements are disassembled into separate atoms and scattered around the play field. Player is expected to reassemble the molecule, thus completing current level and moving up to the next one


For Languages

Kanagram
Kanagram is a game based on anagrams of words: the puzzle is solved when the letters of the scrambled word are put back in the correct order. There is no limit on either time taken, or the amount of attempts to solve the word. Included with Kanagram are several vocabularies ready to play, with many more available from the Internet.

KHangMan
KHangMan is a game based on the well-known hangman game. It is aimed at children aged six and over. The game has several categories of words to play with and among them: Animals (animals words) and three difficulty categories: Easy, Medium and Hard. A word is picked at random, the letters are hidden, and you must guess the word by trying one letter after another.

KLettres
KLettres is an application specially designed to do help the user to learn alphabet in a new language and then to learn to read simple syllables. The user can be a young child aged from two and a half or an adult that wants to learn the basics of a foreign language.
Seventeen languages are available at the moment: Arabic, Brazilian Portuguese, Czech, Danish, Dutch, English, French, German, Hebrew, Italian, Kannada, Low Saxon, Luganda, Romanized Hindi, Spanish, Slovak and Telugu and but only English, French and your language if it is among those are installed by default.

KWordQuiz
KWordQuiz is a tool that gives you a powerful way to master new vocabularies. It may be a language or any other kind of terminology.

Parley
Parley is a vocabulary trainer. It helps you to memorize your vocabulary, for example when you are trying to learn a foreign language. Parley is not limited to language learning but supports a multitude of subjects.

Ktouch
KTouch is a program for learning to touch type. KTouch provides you with text to train on and adjusts to different levels depending on how good you are. It displays which key to press next and the correct finger to use.




For Mathematics


KBruch
KBruch is a small program to practice calculating with fractions. Therefore 4 different exercises are offered.
Fraction Task - in this exercise you have to solve a given fraction task. You have to enter numerator and denominator. This is the main exercise.
Comparison - in this exercise you have to compare the size of 2 given fractions.
Conversion - in this exercise you have to convert a given number into a fraction.
Factorization - in this exercise you have to factorize a given number into its prime factors.
In all different exercises KBruch will generate a task and the user has to solve it. The program checks the input and gives a feedback about it.

KIG
Kig is an application for Interactive Geometry. It's intended to serve two purposes:
Allow students to interactively explore mathematical figures and concepts using the computer.
Serve as a WYSIWYG tool for drawing mathematical figures and including them in other documents.

KPercentage
KPercentage is a small math application that will help pupils to improve their skills in calculating percentages.
There is a special training section for the three basic tasks. Finally the pupil can select a random mode, in which all three tasks are mixed randomly.




For Science

KGeography
KGeography is a geography learning tool for KDE. Right now it has seven usage modes:
Browse the maps clicking in a map division to see its name, capital and flag
tells you a map division name and you have to click on it
tells you a capital and you have to guess the division it belongs to
tells you a division and you have to guess its capital
shows you a map division flag and you have to guess its name
tells you a map division name and you have to guess its flag
shows an empty map and you have to place divisions on it one by one


KStars
KStars is a graphical desktop planetarium for KDE. It depicts an accurate simulation of the night sky, including stars, constellations, star clusters, nebulae, galaxies, all planets, the Sun, the Moon, comets and asteroids. You can see the sky as it appears from any location on Earth, on any date. The user interface is highly intuitive and flexible; the display can be panned and zoomed with the mouse, and you can easily identify objects, and track their motion across the sky. KStars includes many powerful features, yet the interface is clean and simple, and fun to use.


Marble
Marble is a geographical atlas and a virtual desktop globe which lets you quickly explore other places on our home planet. You can use Marble to look up places, to easily create maps, measure distances and to retrieve detail information about locations that you have just heard about in the news or on the Internet. The user interface is clean, simple and easy to use.


Step
Step is an interactive physical simulator. It allows you to explore the physical world through simulations. It works like this: you place some bodies on the scene, add some forces such as gravity or springs, then click Simulate and Step shows you how your scene will evolve according to the laws of physics. You can change every property of the bodies/forces in your experiment (even during simulation) and see how this will change evolution of the experiment. With Step you cannot only learn but feel how physics works!

Monday, June 29, 2009

To Startup tomcat :- settings

Edit
conf/tomcat-users.xml

Need to add manager role for the user


Sunday, June 21, 2009

Where is file stored when a file is checked in ?

In UCM , when a file is checked in . It is checked in the basis of

Security group and Type
By default the files will be stored in the following hierarchy

/UCMInstallfolfer/weblayout/groups/secouritgroupname/document/typename/filename





For eg



If I am doing a check -in for a file name "sajiNotes.pdf" in Security Group "Dieshop" of type "HR" then the checked file will be on the following location by default

"/oracle/ucm/server/weblayout/groups/dieshop/documents/hr/sajiNotes.pdf"

Thursday, June 18, 2009

UCM:- To run a stand along UCM-application

To run a stand-alone administration application on a UNIX operating system:
1. Navigate to the /bin/ directory.
2. Executable applications are listed. Enter /application_name, where
application_name is the name of one of the executable files. If an application is not
listed, it can be entered as a parameter to the IntradocApp application, as in this
example:
%%/bin/intradocApp workflow
3. Press Enter.

Dynamic Page Retrieval in UCM

A dynamic web page is assembled at the time of the web server request, using content server services and templates to determine the content and formatting. For example, each user’s portal design page is generated using a content server service called GET_PORTAL_PAGE and a template called PNE_PORTAL_DESIGN_PAGE.

GET_PORTAL_PAGE and a template called PNE_PORTAL_DESIGN_PAGE.

URL exaplanation of Content Server Requests

When a content server web page is requested, all of the necessary information can be sent to the content server through the URL. The following is a typical content server URL; in this case, it is the URL for the Home page:

http://192.168.21.223/idc/idcplg?IdcService=GET_DOC_PAGE&Action=GetTemplatePage&Page=HOME_PAGE&Auth=Internet

* http://192.168.21.223 and instancename is the web address of the content server instance.
* idcplg is the path to the web server filter.
* IdcService=GET_DOC_PAGE tells the content server to execute the GET_DOC_PAGE service.
* Action=GetTemplatePage tells the content server to return the results using a specified template page.
* Page=HOME_PAGE tells the content server which template page to use.
* The question mark (?) indicates the end of the web server path and the beginning of content server instructions.
* Ampersands (&) are used as separators between content server instructions.
* Auth=Internet explains it is authenticated through browser

Thursday, June 11, 2009

To Check which dir uses more space

du -h / --max-depth=1

This will display the directory with the space occupied

To use Oracle Apps 11.5.10.2 in Linux

To make Oracle Apps 11.5.10.2 in Linux you need to have sun jre 1.5_12 installed in your system. The jre version should be exactly 1.5_12 , by default Linux distributions does not come with sun jre . You need to download it and install it . It can be downloaded from “http://java.sun.com/products/archive/j2se/5.0_12/index.html”
Follow the following steps
1> Download jdk or jre from http://java.sun.com/products/archive/j2se/5.0_12/index.html
2> move the downloaded file to /opt directory
3> chmod +x jdk-1_5_0_12-linux-i586
4> ./jdk-1_5_0_12-linux-i586
this will istall jdk in opt directory
Now what we need to create a “soft link” for the firefox browser
5> cd /usr/lib/mozilla/plugins/
6> from “/usr/lib/mzilla/plugins” give “ln -s /opt/jdk1.5.0_12/jre/plugin/i386/ns7/libjavaplugin_oji.so”
Above command makes a soft link to javaplugin

Now we need to change the path parameter so that java executable is the path
7> “cd /etc/profile.d/ “
8> create any file , I created “myjavapath.sh” . You can create with any name
inside the file it should have the following
# !/bin/sh

export JAVA_HOME=/opt/jdk1.5.0_12
export PATH=/opt/jdk1.5.0_12/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin


Now after restarting or log off and log-in will make the path parameters reflected and you will be able to use Oracle Apps 11.5.10.2

Wednesday, June 10, 2009

What is a vector in Java?

Vector is a type of collection object that Java has.
Vector is a class that implements the AbstractList class and is often used as an alternative to arrays since it automatically extends the length of the list unlike arrays.
A Vector can contain a collection of objects of any type. But it has fallen out of use due to the rise of the more convenient ArrayList class, but Vectors are still used for their security in multi threaded environment.

Vectors are thread safe but array lists are not.
An important fact to note is that Stack extends the Vector class.

Tuesday, June 9, 2009

ODDC release to UCM success

While trying to release for ODDC to UCM I came across this experience that my images from ODDC is not getting release to UCM .
The mistake what I have done is that in the connection url I had given
“http://192.168.21.223/idc/idcplg “
It should have been
“http://192.168.21.223/idc/idcplg&AUTH=INTERNET “

To create a selection menu : -

To create a selection menu : -
Today I had tired out to learn how to create a CheckMenu. I am writing it down for my future refernce
Step 1
First I decided to create a frame and display it

The class which I create will be using "JFrame" Class and "ActionListener" interfaces
imported packages , I
"
java.awt.GridLayout;
java.awt.event.ActionEvent;
java.awt.event.ActionListener;
javax.swing.JFrame;
javax.swing.JPanel;

"


Now in the constructor I created Jpanel and Gridlayout
and in the Constructor I had done the following steps
Created a instance of the class
then I set the size
Then To made it visible

Now my Constructor have
"
JFrame frame = new Main();
frame.setSize(150, 200);
frame.setVisible(true);

"

Now my MyRadioCheckMenu.java has the following code

"
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import javax.swing.JPanel;


public class Main extends JFrame implements ActionListener {

public MyRadioCheckMenu(){
//Create a JPanel and GridLayout
JPanel p = new JPanel();
p.setLayout(new GridLayout(8, 1));

}

public static void main(String[] args) {
JFrame frame = new MyRadioCheckMenu();
frame.setSize(150, 200);
frame.setVisible(true);


}

public void actionPerformed(ActionEvent e) {
throw new UnsupportedOperationException("Not supported yet.");
}

}

"

##
Now when you run the Main.java file you could see a window .This is the first step now we will see to add check boxes
###################################################################################
Now my aim is to create a radio button and display it
For this what I have to do ?
# Create a method for adding all radio buttons to a Button Group and then add the button group to JPanel


For this first I did define JradioButtons such as

private JRadioButton butterChicken;
private JRadioButton chillyChicken;
private JRadioButton friedRice;
private JRadioButton chickenNoodles;
private JRadioButton tandoriRoti;
private JRadioButton lassiDrink;





I have method for retruning radio button as

private JRadioButton addRadioButton(String s, ButtonGroup g, JPanel p) {
JRadioButton button = new JRadioButton(s, false);
button.addActionListener(this);
g.add(button);
p.add(button);
return button;
}


Then I again I added in the constructor

ButtonGroup g = new ButtonGroup();
butterChicken = addRadioButton("Divide By Zero",g,p);
getContentPane().add(p);

Now my constructor looks like

public MyRadioCheckMenu(){
//Create a JPanel and GridLayout
JPanel p = new JPanel();
p.setLayout(new GridLayout(8, 1));
ButtonGroup g = new ButtonGroup();
butterChicken = addRadioButton("Butter Chicken",g,p);
getContentPane().add(p);

}




and my code for displaying one radio button is



package mycheckmenu;

import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ButtonGroup;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JRadioButton;


public class MyRadioCheckMenu extends JFrame implements ActionListener {
private JRadioButton butterChicken;
private JRadioButton chillyChicken;
private JRadioButton friedRice;
private JRadioButton chickenNoodles;
private JRadioButton tandoriRoti;
private JRadioButton lassiDrink;


public MyRadioCheckMenu(){
//Create a JPanel and GridLayout
JPanel p = new JPanel();
p.setLayout(new GridLayout(8, 1));
ButtonGroup g = new ButtonGroup();
butterChicken = addRadioButton("Butter Chicken",g,p);
getContentPane().add(p);

}

private JRadioButton addRadioButton(String s, ButtonGroup g, JPanel p) {
JRadioButton button = new JRadioButton(s, false);
button.addActionListener(this);
g.add(button);
p.add(button);
return button;
}

public static void main(String[] args) {
JFrame frame = new MyRadioCheckMenu();
frame.setSize(150, 200);
frame.setVisible(true);


}

public void actionPerformed(ActionEvent e) {
throw new UnsupportedOperationException("Not supported yet.");
}

}


###################
Now let me try out to display more radio button
in the constructor I added more buttons
At present my constructor looks like

public MyRadioCheckMenu(){
//Create a JPanel and GridLayout
JPanel p = new JPanel();
p.setLayout(new GridLayout(8, 1));
ButtonGroup g = new ButtonGroup();
butterChicken = addRadioButton("Butter Chicken",g,p);
chillyChicken = addRadioButton("Chiily Chciken", g, p);
friedRice = addRadioButton("Fried Rice", g, p);
chickenNoodles = addRadioButton("Chicken Noodles", g, p);
tandoriRoti = addRadioButton("Tandoori Roti", g, p);
lassiDrink = addRadioButton("Sweet Lasi", g, p);
getContentPane().add(p);

}


and my code look like


###



package mycheckmenu;

import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ButtonGroup;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JRadioButton;


public class MyRadioCheckMenu extends JFrame implements ActionListener {
private JRadioButton butterChicken;
private JRadioButton chillyChicken;
private JRadioButton friedRice;
private JRadioButton chickenNoodles;
private JRadioButton tandoriRoti;
private JRadioButton lassiDrink;


public MyRadioCheckMenu(){
//Create a JPanel and GridLayout
JPanel p = new JPanel();
p.setLayout(new GridLayout(8, 1));
ButtonGroup g = new ButtonGroup();
butterChicken = addRadioButton("Butter Chicken",g,p);
chillyChicken = addRadioButton("Chiily Chciken", g, p);
friedRice = addRadioButton("Fried Rice", g, p);
chickenNoodles = addRadioButton("Chicken Noodles", g, p);
tandoriRoti = addRadioButton("Tandoori Roti", g, p);
lassiDrink = addRadioButton("Sweet Lasi", g, p);
getContentPane().add(p);

}

private JRadioButton addRadioButton(String s, ButtonGroup g, JPanel p) {
JRadioButton button = new JRadioButton(s, false);
button.addActionListener(this);
g.add(button);
p.add(button);
return button;
}

public static void main(String[] args) {
JFrame frame = new MyRadioCheckMenu();
frame.setSize(150, 200);
frame.setVisible(true);


}

public void actionPerformed(ActionEvent e) {
throw new UnsupportedOperationException("Not supported yet.");
}

}



###
Next is to trigger some actions or activity when we click the check menu