Sunday, February 20, 2011
Command line tools to install RPMs on OpenSUSE?
The command-line tools rug (on SLES and SLED 10) and zypper for openSUSE
Shell Script: : remove files and directories
#!/bin/bash
#########################################################
# File Name : sy_2_g
# Author: : Suresh Yadagiri
# Date : August 10,2010
# Descriptiom :
# write a Bourne shell script that takes a file name and
# a directory name as command line arguments and removes
# the file if it is found under the given directory and
# is a simple file. If the file(the first argument) is a
# directory, it is removed (including all the files and
# subdirectories under it).
#
#########################################################
function printusage(){
echo -e "\nusage:\n$0 filename directoryname"
echo " or "
echo -e "$0 directoryname directoryname"
exit 1
}
if (( $# < 2 || $# > 2 ))
then
echo "Invalid arguments"
printusage
fi
if [ ! -d $2 ] ; then
echo " $2 is not a directory or exists"
printusage
fi
if [ ! -d "$2/$1" ] && [ ! -f "$2/$1" ]
then
echo "\"$1\" is not a directory or a file inside \"$2\"."
printusage
fi
if [ -d "$2/$1" ] ; then
echo "\"$1\" directory removed from $2"
rm -r "$2/$1"
else
echo "\"$1\" file removed from $2"
rm -f "$2/$1"
fi
#########################################################
# File Name : sy_2_g
# Author: : Suresh Yadagiri
# Date : August 10,2010
# Descriptiom :
# write a Bourne shell script that takes a file name and
# a directory name as command line arguments and removes
# the file if it is found under the given directory and
# is a simple file. If the file(the first argument) is a
# directory, it is removed (including all the files and
# subdirectories under it).
#
#########################################################
function printusage(){
echo -e "\nusage:\n$0 filename directoryname"
echo " or "
echo -e "$0 directoryname directoryname"
exit 1
}
if (( $# < 2 || $# > 2 ))
then
echo "Invalid arguments"
printusage
fi
if [ ! -d $2 ] ; then
echo " $2 is not a directory or exists"
printusage
fi
if [ ! -d "$2/$1" ] && [ ! -f "$2/$1" ]
then
echo "\"$1\" is not a directory or a file inside \"$2\"."
printusage
fi
if [ -d "$2/$1" ] ; then
echo "\"$1\" directory removed from $2"
rm -r "$2/$1"
else
echo "\"$1\" file removed from $2"
rm -f "$2/$1"
fi
Shell Script: Sum of squares
#!/bin/bash
#######################################################
# File Name : sy_1_g
# Author: : Suresh Yadagiri
# Date : July 27,2010
# Descriptiom :
# This script takes integer numbers as
# the command line arguments and displays
# a list of their squares amd the sum
# of numbers in the list of squares
#####################################################
printusageinfo(){
echo "Usage: $0 number-list"
exit 1
}
function is_integer() {
printf "%d" $1 > /dev/null 2>&1
return $?
}
if [ $# = 0 ]
then
echo "Usage: $0 number-list"
exit 1
fi
index=0 #Running sum initialized to zero
sumofsquares=0 #sum of squares
count=0 #To count number of arguments
while [ $# != 0 ]
do
if is_integer $1; then
# "$1 is an integer"
numbers[$index]=`expr $1`
let square=`expr $1*$1`
squares[$index]=$square
sumofsquares=`expr $sumofsquares + $square`
count=`expr $count + 1`
shift # Shift the counted number out
index=`expr $index + 1`
else
echo "$1 is not an integer"
printusageinfo
fi
done
#displaying numbers and their squares
echo "Number Square"
index=0
while [ $index -lt $count ]
do
echo " ${numbers[$index]} ${squares[$index]}"
index=`expr $index + 1`
done
#displaying sum of squares
echo "The sum of squres is $sumofsquares ."
exit 0
#######################################################
# File Name : sy_1_g
# Author: : Suresh Yadagiri
# Date : July 27,2010
# Descriptiom :
# This script takes integer numbers as
# the command line arguments and displays
# a list of their squares amd the sum
# of numbers in the list of squares
#####################################################
printusageinfo(){
echo "Usage: $0 number-list"
exit 1
}
function is_integer() {
printf "%d" $1 > /dev/null 2>&1
return $?
}
if [ $# = 0 ]
then
echo "Usage: $0 number-list"
exit 1
fi
index=0 #Running sum initialized to zero
sumofsquares=0 #sum of squares
count=0 #To count number of arguments
while [ $# != 0 ]
do
if is_integer $1; then
# "$1 is an integer"
numbers[$index]=`expr $1`
let square=`expr $1*$1`
squares[$index]=$square
sumofsquares=`expr $sumofsquares + $square`
count=`expr $count + 1`
shift # Shift the counted number out
index=`expr $index + 1`
else
echo "$1 is not an integer"
printusageinfo
fi
done
#displaying numbers and their squares
echo "Number Square"
index=0
while [ $index -lt $count ]
do
echo " ${numbers[$index]} ${squares[$index]}"
index=`expr $index + 1`
done
#displaying sum of squares
echo "The sum of squres is $sumofsquares ."
exit 0
Friday, February 18, 2011
Oracle documentation sites?
Oracle 10g Release 2 (10.2)
http://www.oracle.com/pls/db102/homepage
Oracle 11g Release 1 (11.1)
http://www.oracle.com/pls/db111/homepage
http://www.oracle.com/pls/db102/homepage
Oracle 11g Release 1 (11.1)
http://www.oracle.com/pls/db111/homepage
Can you suggest partion sizes of Ubuntu on 40GB harddisk?
/ : 5 GB : 4998 MB
/usr : 4 GB : 4198 MB
/tmp : 4 GB : 4500MB
/var : 1GB : 1000MB
/boot: 300MB : 300 MB
swap : 1025MB (for 1GB RAM) :
/home : 15000MB
/opt : 12079 MB
/usr : 4 GB : 4198 MB
/tmp : 4 GB : 4500MB
/var : 1GB : 1000MB
/boot: 300MB : 300 MB
swap : 1025MB (for 1GB RAM) :
/home : 15000MB
/opt : 12079 MB
Thursday, February 17, 2011
How to add java to path in Ubuntu Linux?
export JAVA_HOME=/usr/SharedVB/jdk1.6.0_24
export PATH=$PATH:$JAVA_HOME/bin
export PATH=$PATH:$JAVA_HOME/bin
Tuesday, February 15, 2011
How to mount a shared folder(virtual box) in solaris ?
bash-3.00# mount -F vboxfs Client_and_Server /usr/SharedVB
bash-3.00# ls /usr/SharedVB/
pc861_linux_em64t.tar
bash-3.00# ls /usr/SharedVB/
pc861_linux_em64t.tar
Friday, February 4, 2011
How to know block size in OS?
syadagir@ubuntuLinux:~$ sudo dumpe2fs /dev/sda1 | grep -i 'Block size'
dumpe2fs 1.40.8 (13-Mar-2008)
Block size: 4096
dumpe2fs 1.40.8 (13-Mar-2008)
Block size: 4096
How do you create private datanase link in Oracle?
CREATE DATABASE LINK EDW_SURESH CONNECT TO SURESH IDENTIFIED BY suresh123 USING 'EDN_TNS_ENTRY';
Tuesday, February 1, 2011
Find you oracle mode (In cluster? procted with standby?streams c
SQL> select parallel from v$instance;
PAR
---
NO
SQL> select protection_level from v$database;
PROTECTION_LEVEL
--------------------
MAXIMUM PERFORMANCE
SQL> select * from dba_streams_administrator;
no rows selected
SQL>
PAR
---
NO
SQL> select protection_level from v$database;
PROTECTION_LEVEL
--------------------
MAXIMUM PERFORMANCE
SQL> select * from dba_streams_administrator;
no rows selected
SQL>
Write About sun certifications?
Currently there are eight Java certification exams
The Associate exam, the Programmer exam, and the Developer exam are all associated with the Java Standard Edition.
The Web Component exam, the Business Component exam, the Web Services exam, and the Enterprise Architect exam are all associated with the Java Enterprise Edition.
The Mobile Application exam is associated with the Java Micro Edition.
The Associate, Programmer, Web Component, Business Component, Web Services, and Mobile Application exams are exclusively multiple-choice and drag and-drop exams taken at a testing center
while the Developer and Architect exams also involve submitting a project.
The Associate Exam (CX-310-019)
================================
Sun Certified Java Associate (SCJA)
The Associate exam is for candidates just entering an application development or a software project management career using Java technologies. This exam tests basic knowledge of object-oriented concepts, the basics of UML, the basics of the Java programming language, and general knowledge of Java Platforms and Technologies. This exam has no prerequisites.
The Programmer Exams (CX-310-065)
=================================================
Sun Certified Java Programmer (SCJP) for Java 6
The Programmer exam is designed to test your knowledge of the Java programming language itself. It requires detailed knowledge of language syntax, core concepts, and a number of common application programming interfaces (APIs). This exam also tests intermediate knowledge of object-oriented design concepts. It does not test any issues related to architecture, and it does not ask why one approach is better than another, but rather it asks whether the given approach works in a particular situation.
This exam has no prerequisites.
As of May, 2008, two older versions of this exam are still available, the 1.4 and the 5.0.
The Developer Exam (CX-310-252A, CX-310-027)
===============================================================
Sun Certified Java Developer (SCJD)
The Developer exam picks up where the Programmer exam leaves off. Passing the Programmer exam is required before you can start the Developer exam. The Developer exam requires you to develop an actual program and then defend your design decisions. It is designed to test your understanding of why certain approaches are better than others in certain circumstances, and to prove your ability to follow a specification and implement a correct, functioning, and user-friendly program.
The Developer exam consists of two pieces: a project assignment and a follow-up essay exam. Candidates have an unlimited amount of time to complete the project, but once the project is submitted, the candidate then must go to a testing center and complete a short follow-up essay exam, designed primarily to validate and verify that it was you who designed and built the project.
The Web Component Developer Exam (CX-310-083)
=========================================================
Sun Certified Web Component Developer for Java EE Platform (SCWCD)
The web developer exam is for those who are using Java servlet and JSP (Java Server Pages) technologies to build Web applications.
It's based on the Servlet and JSP specifications defined in the Java Enterprise Edition (Java EE).
This exam requires that the candidate is a Sun Certified Java Programmer.
The Business Component Developer Exam (CX-310-091)
==========================================================
Sun Certified Business Component Developer for Java EE Platform (SCBCD)
The business component developer exam is for those candidates who are using Java EJB technology to build business-tier applications.
The exam is based on the EJB specification defined in the Java Enterprise Edition (Java EE).
This exam requires that the candidate is a Sun Certified Java Programmer.
The Web Services Developer Exam (CX-310-220)
=======================================================
Sun Certified Developer for Web Services for Java EE Platform (SCDJWS)
The web services exam is for those candidates who are building applications using Java EE and Java Web Services Developer Pack technologies.
This exam requires that the candidate is a Sun Certified Java Programmer.
The Architect Exam (CX-310-052, CX-310-301A, CX-310-062)
================================================================
Sun Certified Enterprise Architect for J2EE Technology (SCEA)
This certification is for enterprise architects, and thus does not require that the candidate pass the Programmer exam.
The Architect exam is in three pieces: a knowledge-based multiple-choice exam, an architectural design assignment, and a follow-up essay exam. You must successfully pass the multiple-choice exam before registering and receiving the design assignment.
The Mobile Exam (CX-310-110)
=============================================================
Sun Certified Mobile Application Developer for Java ME (SCMAD)
The mobile application developer exam is for candidates creating applications for cell phones or other Java enabled devices. The exam covers the Java Technology for Wireless Industry (JTWI) specification, the Wireless Messaging API, and Mobile Media APIs. This exam requires that the candidate is an SCJP.
The Associate exam, the Programmer exam, and the Developer exam are all associated with the Java Standard Edition.
The Web Component exam, the Business Component exam, the Web Services exam, and the Enterprise Architect exam are all associated with the Java Enterprise Edition.
The Mobile Application exam is associated with the Java Micro Edition.
The Associate, Programmer, Web Component, Business Component, Web Services, and Mobile Application exams are exclusively multiple-choice and drag and-drop exams taken at a testing center
while the Developer and Architect exams also involve submitting a project.
The Associate Exam (CX-310-019)
================================
Sun Certified Java Associate (SCJA)
The Associate exam is for candidates just entering an application development or a software project management career using Java technologies. This exam tests basic knowledge of object-oriented concepts, the basics of UML, the basics of the Java programming language, and general knowledge of Java Platforms and Technologies. This exam has no prerequisites.
The Programmer Exams (CX-310-065)
=================================================
Sun Certified Java Programmer (SCJP) for Java 6
The Programmer exam is designed to test your knowledge of the Java programming language itself. It requires detailed knowledge of language syntax, core concepts, and a number of common application programming interfaces (APIs). This exam also tests intermediate knowledge of object-oriented design concepts. It does not test any issues related to architecture, and it does not ask why one approach is better than another, but rather it asks whether the given approach works in a particular situation.
This exam has no prerequisites.
As of May, 2008, two older versions of this exam are still available, the 1.4 and the 5.0.
The Developer Exam (CX-310-252A, CX-310-027)
===============================================================
Sun Certified Java Developer (SCJD)
The Developer exam picks up where the Programmer exam leaves off. Passing the Programmer exam is required before you can start the Developer exam. The Developer exam requires you to develop an actual program and then defend your design decisions. It is designed to test your understanding of why certain approaches are better than others in certain circumstances, and to prove your ability to follow a specification and implement a correct, functioning, and user-friendly program.
The Developer exam consists of two pieces: a project assignment and a follow-up essay exam. Candidates have an unlimited amount of time to complete the project, but once the project is submitted, the candidate then must go to a testing center and complete a short follow-up essay exam, designed primarily to validate and verify that it was you who designed and built the project.
The Web Component Developer Exam (CX-310-083)
=========================================================
Sun Certified Web Component Developer for Java EE Platform (SCWCD)
The web developer exam is for those who are using Java servlet and JSP (Java Server Pages) technologies to build Web applications.
It's based on the Servlet and JSP specifications defined in the Java Enterprise Edition (Java EE).
This exam requires that the candidate is a Sun Certified Java Programmer.
The Business Component Developer Exam (CX-310-091)
==========================================================
Sun Certified Business Component Developer for Java EE Platform (SCBCD)
The business component developer exam is for those candidates who are using Java EJB technology to build business-tier applications.
The exam is based on the EJB specification defined in the Java Enterprise Edition (Java EE).
This exam requires that the candidate is a Sun Certified Java Programmer.
The Web Services Developer Exam (CX-310-220)
=======================================================
Sun Certified Developer for Web Services for Java EE Platform (SCDJWS)
The web services exam is for those candidates who are building applications using Java EE and Java Web Services Developer Pack technologies.
This exam requires that the candidate is a Sun Certified Java Programmer.
The Architect Exam (CX-310-052, CX-310-301A, CX-310-062)
================================================================
Sun Certified Enterprise Architect for J2EE Technology (SCEA)
This certification is for enterprise architects, and thus does not require that the candidate pass the Programmer exam.
The Architect exam is in three pieces: a knowledge-based multiple-choice exam, an architectural design assignment, and a follow-up essay exam. You must successfully pass the multiple-choice exam before registering and receiving the design assignment.
The Mobile Exam (CX-310-110)
=============================================================
Sun Certified Mobile Application Developer for Java ME (SCMAD)
The mobile application developer exam is for candidates creating applications for cell phones or other Java enabled devices. The exam covers the Java Technology for Wireless Industry (JTWI) specification, the Wireless Messaging API, and Mobile Media APIs. This exam requires that the candidate is an SCJP.
Subscribe to:
Posts (Atom)