Home » FAQ [ New question ]

There are several domain registrar form where you can purchase a domain name of your wish.
The best place to get a domain is Godaddy.com
Here you can get a domain of your choice with best other features like web-hosting, email,privacy and security features.

Alternatively you can purchase a domain at domains.ucoz.com as well.
You can also get .in or others domains like .tk domain for free for unlimited period.

Now you can make your computer speak anything that you want.
Its very simple. You just have  to create a small VB script file.
  • Open Notepad.
  • Put the below code in the text editor
Set speech=wscript.CreateObject("sapi.spvoice")
msg=inputbox ("Enter what you want your computer to speak","Speaking PC")
speech.Speak msg
  • Save the file as anyname.vbs
  • Run the file. It will prompt you to enter the message.
  • Enter the message and press OK""
  • Thats it.... Your PC spoke what you said...
  • Enjoy... :)


Added by: Shankar (shanky)

Difference between an Application Server and a Web server

1. Webserver serves pages for viewing in web browser, application server provides exposes business logic for client applications through various protocols 

2. Webserver exclusively handles http requests.application server serves business logic to application programs through any number of protocols.

3. Webserver delegation model is fairly simple,when the request comes into the webserver,it simply passes the request to the program best able to handle it(Server side program). It may not support transactions and database connection pooling.

4. Application server is more capable of dynamic behaviour than webserver. We can also configure application server to work as a webserver.Simply application server is a superset of webserver.

5. Web Server serves static HTML pages or gifs, jpegs, etc., and can also run code written in CGI, JSP etc. A Web server handles the HTTP protocol. Eg of some web server are IIS or apache.

6. An Application Server is used to run business logic or dynamically generated presentation code. It can either be .NET based or J2EE based (BEA WebLogic Server, IBM WebSphere, JBoss).

7. A J2EE application server runs servlets and JSPs (infact a part of the app server called web container is responsible for running servlets and JSPs) that are used to create HTML pages dynamically. In addition, J2EE application server can run EJBs - which are used to execute business logic.

8. An Application server has a 'built-in' web server, in addition to that it supports other modules or features like e-business integration, independent management and security module, portlets etc.

   tomcat("web server”)

robots.txt is a publicly available file related a website. It is a text file which contains rules to allow or disallow robots to crawl or index a website.
Suppose you want to restrict a particular user agent eg. googlebot to look into your website or a part of your website, you shoud write a robots.txt file and put it on the root directory of your website. The robots.txt should be located at:
Note:- If you dont want any user agents or robots to disallow to your site, you dont need a robots.txt at all.
We will see several examples of robots.txt and their meaning.
User-agent: *
Disallow: /
Each two lines in this file is considered as one entry. Now we will see the meaning of first line.
User-agent: *
This line indicates the User agenst or robots that will look into the website. "*" here means it is applicable to all the
user agents/robots. The second line "Disallow: /" indicates the url you want to block.i.e. here to  disallow the entire directory "/" of your website.
In short, if a robots.txt contains above lines, your website is fully restricted from any crawler or bot to look into your website.
Suppose you have a /videos folder on your website that you dont want to be indexed by google's robot, you have to put below lines in the file:
So, the above file will tell the robots that is GoogleBot in this case, to index or look into all but the folder "/videos".
Now suppose there is one file /videos/demo.avi that you want to be searched and no other things. Then your robots.txt will look like:
Here, note that the directories are case sensitive. So, if the robots.txt has a line like:
It will disallow the file abc.html but will not restrict Abc.html to be indexed/searched.
Suppose we want to create a robots.txt which will block the entire site to be indexed but the google ads shoud be searched from your site then it should look like this:
User-agent: *
Disallow: /
User-agent: Mediapartners-Google
Allow: /

If you get an error message like this:

'telnet' is not recognized as an internal or external command,
operable program or batch file.

It means that your system is not configured to use telnet service
For this you need to enable telnet feature from control panel.

Go to your control panel --> Programs and features

Click on "Turn windows features on or off" Follow the figure.

From the list of features, check the 
"Telnet server" :- To connect to your system remotely using using telnet

"Telnet client" :- To use telnet to connect to any other remote machine.

Click OK . This may take some time.

Now go to your command line and type "telnet". you should get this prompt.

Welcome to Microsoft Telnet Client
Escape Character is 'CTRL+]'
Microsoft Telnet>

Done. You are good to go.
Now if you want to check if you can connect to a telnet server, type  "o news.thundernews.com" inside telnet prompt.

You will get a welcome message like this:

200 Welcome (fx27.iad)

That's it.Telnet is working fine.Now type "quit" to exit.

Suppose you have a C program and you want to compile and run it.

1.To compile:

gcc filename.c
gcc is compiler in Linux operating system. This command will compile the C program and creates an o/p file with a default file named as a.out. If you want to give specific name to the output exe file, use below command.
gcc -o exename filename.c    
The above command will  create an o/p file with name 'exename'

2. To run:
If you have used the default name for output simple give below command to run it.
If you have given a name to your output exe file, then use below command to run.

Kaushik, you can upgrade to upgrade to the latest software available for
your phone, and enjoy enhancements like extra speed, improved functionality,
 OS upgrade and fixed for any bug.
For this you need to download a software called Kies and through Kies you can install new updates into your phone.
  1. Download Kies from here.
  2. Install Kies software on your Computer.
  3. Connect your phone with your computer using a USB cable
  4. Kies will guide you to install new updates on your phone
  5. You can download several updates for your phone here.
Added by: Kaushik Chatterji

Downloading a youtube video is very simple.

1.Just add "ss" in the URL of your youtube video. Eg. 
   If the youtube video URL is http:/youtube.com/watch?v=KR9zjWkfldw    or  http:/www.youtube.com/watch?v=KR9zjWkfldw
make it  http://ssyoutube.com/watch?v=KR9zjWkfldw

2.You are done. Now put this modified URL in your browser.

3.Click download button.

4.The video is on your computer :). You don't need a youtube video downloader at all.

The simplest code for expand/collapse 

Here we will see a very simple and short code for a expand collapse example. The code can be implemented by HTML, CSS and Javascript.
<div class="moreinfo">
This is the detailed information
 about subject1.
You can put as many lines as 
you want in this section
This part will be show/hidden
 when the Subjec1 will
be clicked

background-position:5px 8px;
$(document).ready(function () {
 $('h3').click(function () {


This is the detailed information about subject1.You can put as many lines as
you want in this section. This part will be shown/hidden when the Subjec1 will
be clicked

Hi Pankaj

There are so many Linux or UNIX operating systems available that u can download and install on your system.  I will suggest you to install and use Linux mint (latest versions 12 to 16). Visit this page

Linux Mint has a very good interace and quite user friendly. Below is a snapshot of Linux Mint Desktop:

You can download Linux Mint 16 "Petra" - Cinnamon (32-bit) from below given link


Here , you can find so many mirrors (source) to download the OS setup.Once you open this link go to Primary download mirrors section and from the row Asia India click on   Honesty Net Solutions . See the figure below:

Download the ISO file and save it on your system.

Hi Piyu..

Sure I wil answer this.

Pipe as the name suggests act as a PIPE(taking output from previous entity and feeding it to the succeeding entity). It is an operator which is very frequently used feature in Linux. The main purpose of this symbol is to feed output of previous command as input to the next command.

Let us see one simple example:

user1@server1:/home/user1:> ls
abc.ps  abc.txt  abc.txt-20140325  bin  dfg  Documents  public_html  qquniq.profile  shanky.sh  somon_output  tmp
@server1:/home/user1:> ls|grep tmp


The first command "ls" lists all the files in the home directory.  Now, in the second command we have piped the output of "ls" command as input to the "grep" command using "|" pipe operator. i.e. the output of ls goes as input to grep.

So, In this way it eases our work.

Example2: Suppose you want to count the number of lines of a file, you can use Pipe operator:

cat filename|wc -l

Internally the cat command displays output to console then this output goes as input to wc command which countts the numner of lines and we only get the count as output.



Added by: Piyu

Hi Nikunj..

Cheking the size of a file or folder is very easy in Linux. You just go to the folder and list the files in that folder.

nikunj@ltkwom10:/home/nikunj:> ls -l
total 36
-rw-rw-r-- 1    nikunj 86441     0           2014-03-05 15:27 abc.ps
-rw-rw-r-- 1    nikunj qxbmw    240       2014-04-04 15:03 abc.txt
-rw-rw-r-- 1    nikunj 86441     14         2013-11-27 13:02 abc.txt-20140325
drwxr-xr-x 2   nikunj qxbmw    4096     2013-07-12 13:10 bin
-rw-rw-r-- 1    nikunj 86441      30        2013-10-08 11:53 dfg
drwx------ 2    nikunj qxbmw     4096    2013-07-12 13:10 Documents
drwxr-xr-x 2   nikunj qxbmw     4096    2013-07-12 13:10 public_html
-rwxrwxrwx 1 nikunj 86441      681      2013-10-08 12:52 shanky.sh
-rw-rw-r-- 1    nikunj 86441      1510     2013-10-09 11:41 somon_output
drwxr-xr-x 2   nikunj qxbmw     4096    2014-04-07 08:42 tmp

When you do "ls -l" for long listing of file, the 4th column is the size of the file or folder.

If you want to sort the files and folders inside a directory by size, you can use commad: "ls -lS"

-l :  for long listing of file.

-S : for sorting files by size.

I hope this answers your questios, for more clarification, reply back. For more questions/answers you can go to my Linux forum . You need to sign up to start a thread

Added by: Nikunj Sakaria (shanky)

  •  Main difference between wait() and sleep() is that wait() method release the ownership of the acquired monitor when thread is waiting while Thread.sleep() method keeps the lock or monitor even if thread is waiting.
  •  The wait() method should be called from synchronized block while there is no such requirement for sleep() method.
  •  Another difference is Thread.sleep() method is a static method and applies on current thread, while wait() is an instance specific method and wakes up only if some other thread calls notify() method on same object.
  •  In sleep() method, sleeping thread immediately goes to Runnable state after waking up (after the time elapses) while in case of wait(), waiting thread first acquires the lock and then goes into Runnable state. 


A marker interface is an interface in Java with no field or no method declarations. In simple terms, these interfaces are empty interfaces. Marker interfaces are used as a tag to inform a special message to the Java compiler or JVM to add special behavior at runtime.


Examples of marker interfaces are java.io.Serializable, java.lang.Cloneable, java.rmi.Remote etc. With the advent of annotations in Java 5, the functionality of marker interfaces can also be achieved using annotations.

Software components (Client), are often a part of a set of collaborating components which depend upon other components (Services) to successfully complete a business function. The client object need to know which service objects to communicate with, where to locate them and how to communicate with them.

      Dependency Injection is based on the principle of ‘Inversion of Control’. The idea is to avoid direct dependency between collaborating objects by not creating objects using ‘new’ operator. Dependency injection is a way of structuring code such that clients do not locate or instantiate services as part of usual logic. Rather the  dependencies are provided in a configuration file / through annotations and an external component (in case of spring framework the IoC container) is responsible for hooking up the objects.

      One of the biggest advantages of dependency injection is that it reduces coupling between objects thereby making testing a lot easier. Independent clients are easier to unit test in isolation using stub or mock objects.


In Java, shallow copy is a bit-wise copy of an object. A new object is created that has an exact copy of the values in the original object. If any of the fields of the object are references to other objects, just the reference addresses are copied i.e., only the memory address is copied. The default implementation of clone() method in Java performs a shallow copy.

A deep copy copies all fields, and makes copies of dynamically allocated memory pointed to by the fields. A deep copy occurs when an object is copied along with the objects to which it refers.


An object is hibernate can exist in one of the three states of the life cycle - transient, persistent and detached.

When an object is instantiated, it is not associated with a session and it is not persisted directly in the database and it is said to be in transient state. When an object is associated with a session or when the transient object is made persistent, the object has a representation in the database and an identifier value and is said to be in persistent state. When the session object is closed, the association is lost with the persistence manager and the object is said to be in detached state.


Student student = new Student();



// student object is in a transient state


Long id = (Long) session.save(student);

// session is an object of Hibernate Session

// student object is now in persistent state



// student is now in detached state

To make a class immutable below mentioned steps should be followed:

1. Don't provide "setter" methods — methods that modify fields or objects referred to by fields.

2. Make all fields final and private.

3. Don't allow subclasses to override methods. The simplest way to do this is to declare the class as final. A more sophisticated approach is to make the constructor private and construct instances in factory methods.

4. If the instance fields include references to mutable objects, don't allow those objects to be changed:

     - Don't provide methods that modify the mutable objects.

     - Don't share references to the mutable objects. Never store references to external, mutable objects passed to the constructor; if necessary, create copies, and store references to the copies. Similarly, create copies of your internal mutable objects when necessary to avoid returning the originals in your methods.


public final class Person {

      private final String name;

      private final Integer age;

     public Person(final String name, final Integer age) {


            this.name = name;

            this.age = age;


      public Integer getAge() {

            return age;


      public String getName() {

            return name;



final - final is a keyword in Java. The variable declared as final cannot be changed after initialization, the method declared as final cannot be overridden, the class declared as final cannot be inherited.


finally - finally is a block in Java which is used along with try-catch block. The finally block always executes when the try block exits. This ensures that the finally block is executed even if an unexpected exception occurs. Java 7 has a new try with resources statement that you can use to automatically close resources that explicitly or implicitly implement java.io.Closeable or java.lang.AutoCloseable


finalize - finalize is a method in java.lang.Object class. finalize() method is called by the garbage collector before reclaiming the memory allocated to the object. A class overrides the finalize() method to dispose of system resources or to perform other cleanup. However the usage of finalize() method is not recommended because the execution of finalize() method is not guaranteed and there is a severe impact on performance.

A Servlet is managed  through a well-defined life cycle that defines how it is loaded and instantiated, is initialized, handles requests from clients, and is taken out of service.

This life cycle is expressed in the Servlet API by the init, service, and destroy methods of the javax.servlet.Servlet interface.

  • Loading and Instantiation -  The servlet container is responsible for loading and instantiating servlets. The servlet container loads the servlet class using normal Java class loading facilities. The loading may happen when the servlet engine itself is started, or later when a client request is actually delegated to the servlet. After loading the Servlet class, the container instantiates it for use.


  • Initialization - After the servlet object is instantiated, the container will initialize the servlet before it can handle requests from clients. The container initializes the servlet instance by calling the init() method of the Servlet interface with a unique (per servlet declaration) object implementing the ServletConfig interface. In the init() method, the servlet can read configuration parameters using ServletConfig interface from the deployment descriptor or perform any other one-time activities, so the init() method is invoked once and only once by the servlet container.


  • Request Handling - After a servlet is properly initialized, the servlet container may use it to handle client requests using the service() method of the Servlet interface. Requests are represented by request objects of type ServletRequest. The servlet fills out response to requests by calling methods of a provided object of type ServletResponse. These objects are passed as parameters to the service() method of the Servlet interface. In the case of an HTTP request, the objects  are of types HttpServletRequest and HttpServletResponse.


  • End of Service - When the servlet container determines that a servlet should be removed from service, it calls the destroy() method of the Servlet interface to allow the servlet to release any resources it is using and save any persistent state.


Hey, if you want to run putty session, you can use online putty session.

You can use it without any intstallation directly on browser

Try below url:


Added by: dipti vyas (ddd0808)

Steps involved in creating a custom constraint are :

  1.     Create Interface using @interface
  2.     Create Custom Validation Implementation class using ConstraintValidator API
  3.     Apply Custom Annotation to Bean, but it can be anywhere on Constructor,Method,parameter,Field etc based on how you have added ElementType in @Target ‘


For example, custom constraint for the @ValidEmail looks as below:




@Constraint(validatedBy = EmailValidator.class)

public @interface ValidEmail {

  String message() ;

  Class<?>[] groups() default {};

  Class<? extends Payload>[] payload() default {};


The three methods - message, default, default are respectively for internationalization, grouping and passing meta-data. These are all mandatory: if not defined, the framework will not work