Monday, February 8, 2010

Difference between String,Stringbuffer and Stringbuilder


String plays major role in Java applications. Below table differentiates the String, StringBuffer and StringBuilder classes. And also address which class is suitable for which scenarios. StringBuilder is a class introduced in java 1.5 and we will see how it differs from String and StringBuffer.

Sunday, February 7, 2010

How to define hostname in Solaris

Hostname is assigning a user defined name to a computer. When the computer is connected to the network, other devices in the network can easily identify and communicate with the computer using the hostname.

To define hostname,
STEP 1:  Login as root user

STEP 2: Open the /etc/hosts file and add the ip address of the machine followed by hostname. Multiple host names can be added for the same ip.
Example:
 $ ping 25.26.27.28
 25.26.27.28 is alive

 $ su - root

 $ vi /etc/hosts
 # Add the ip follwed by hostname(s)
 25.26.27.28      www.techpages.org      TechPages      localhost
STEP 3: Test if the hostname works
Example:
 $ ping www.techpages.org
 www.techpages.org is alive

 $ ssh  user@Techpages
 password:

Saturday, February 6, 2010

How to allocate memory for structure pointer using new operator in C++

1) Lets declares a structure.
struct Example_st
{
   int a;
   string b;
};
2) Declare a pointer of structure type Example_st, allocate memory and use it
..
/* Declare the structure pointer and assign it to NULL */
struct Example_st *struct_1 = NULL;

/* Allocate the memory using "new" */
struct_1 = new struct Example_st;
/* This statement allocates memory in the heap and assigns the starting
address to the structure pointer */

/* Access the structure members */
struct_1->a = 10;
strcpy(struct_1->b, "Allocate memory for structure pointer using new operator in C++");

PrintScreen(struct_1);

/* Remember to unallocate the memory allocated for the structure after using it */
delete struct_1;
..

Wednesday, February 3, 2010

How to Plumb an IPV6 interface in Solaris


STEP 1: Check for the available interfaces. The network card connected to the computer may have 2 or more network ports. To see the network port information go to /dev and search for the assigned interface names.
Example: If the network interface port is of type bge and if there are 4 ports available, then there would exist bge0, bge1, bge2 and bge3

Tuesday, February 2, 2010

How to Compare Current date year with Previous date year in Oracle

Pl/SQL Procedure to compare current year with previous year in oracle.

Free Installer for Windows Applications


Free Installer for Windows Programs
This article explains about how to create setup file I mean installer program for windows applications. Inno setup is a Free windows installer, we can create setup files for most of the windows application. Inno setup is very easy to use and it has lot of inbuilt configuration setup.

Some important features are below.
Inno setup supports all versions of Windows
It supports creation of a single EXE.
It also creates registry and .INI entries.
Easy uninstall capabilities.
It’s also supports creation shortcuts anywhere.
Check below url it helps you find installers for your application.

TFTP Configuration


Trivial File Transfer Protocol (TFTP) is a very simple file transfer protocol, with the functionality of a very basic form of FTP.

            Since it is so simple, it is easy to implement in a very small amount of memory, an important consideration at that time.TFTP is based in part on the earlier protocol EFTP, which was part of the PUP protocol suite. In the early days of work on the TCP/IP protocol suite, TFTP was often the first protocol implemented on a new host type, because it was so simple.
           
            To conifgure the TFTP, edit the /etc/xinetd.d/tftp file and ensure the file contains the following.

Recent Comments

About This Blog

http://www.kamat.org/community/profile.asp?BlogURL=http://www.kamat.com/picturehouse/aperture/

  © Blogger template Webnolia by Ourblogtemplates.com 2009

Back to TOP