Monday, October 29, 2012

How To Increase Broadband Speed

They are many ways to Increase your Broadband Speed ..... This is a Simple Trick where you can Increase high Speed Internet ... You just need to follow my Steps ........

Step 1 : Goto Run and type this code " gpedit.msc " 

Step 2 : You will get a Registry and Select " Computer  Configuration " and Expand the [Administrative Templates] > [Network] > [QoS Packet Scheduler] .....



Step 3 :  Now Double-click [Limit Reservable Bandwidth] and you need to [Enabled] it and then Change [Bandwidth limit %] to 0 % and Click [OK] Button.


Step 4 : Now Need to Restart you PC and then Check your Broadband Speed .........


Saturday, October 27, 2012

How to Download Windows 8 Edition For Free


Microsoft released Windows 8 Release Preview which is a new windows Operating System.Every windows user is eager to experience windows 8 and its new features.
windows+8+release+preview

System Requirements for Windows 8:

  1. Processor – 1GHz or superior than this.
  2. RAM – 1GB (32 bit) or 2GB (64 bit) or more than this.
  3. Hard disk space – 16GB (32 bit) or 20GB (64 bit) or more than this.
  4. Graphics card – Microsoft DirectX 9 graphics device with WDDM driver.

Windows 8 Release Preview can be downloaded in 2 Ways:

  1. You can install windows 8 by downloading setup program which is the easiest and also the default option in windows 8 download page.
  2. You can also download ISO Image.

You can install windows 8 in 4 Ways:

  1. You can install windows 8 on virtual box.
  2. You can make windows 8 as your primary OS by booting with an ISO Image.
  3. You can also Dual Boot Windows 8 along with your current operating system.
  4. You can upgrade your windows 7/XP/Vista to windows 8.If you are upgrading from windows7 to windows 8 then all your program files will remain but if you are upgrading from windows XP/Vista to windows 8 then you will loose all your program files.

Check the First Look of Windows 8 Release Preview

I will be posting all the ways to install windows 8 with video tutorials in my upcoming posts.

Thursday, October 25, 2012

Database Backup in MYSQL


MySQL Database Dump

MySQL Database Dump using Command prompt.
Get a backup 
command :
 mysqldump -u[user name] -p[password] [database name] > [dump file name]

eg :
C:\Documents and Settings\sameera>mysqldump -u root -p mydb>"C:\Documents and Settings\sameera\Desktop\mydumpfile.sql"

Restore Back up
 1)
command :
 mysql -u[user name] -p[password] [database name] < [dump file name]

eg :

 C:\Documents and Settings\sameera>mysql -u root -p mydb < "C:\Documents and Settings\sameera\Desktop\mydumpfile.sql"



2)
command :
source [dump file name]

eg:
mysql>create database mydb;
mysql> use mydb
mysql> source C:/Documents and Settings/sameera/Desktop/mydumpfile.sql;

Note: Path separator should be forward slash("/")

Installation of Oracle 10g XE on Windows


Visit Oracle  and download OracleXEUniv.exe.
Start the installation program and after a few seconds you will see this image:

Click on Next button to display the license agreement.


Select I accept the terms in the license agreement and then click on Next. A dialog asking for destination location will appear.


Don't change anything (accept the default settings) and click on Next to display the password setting dialog.


Type a password in the upper text box and then retype it on the lower text box. Write down the password in a safe place and then click on Next to display the installation summary screen.


Click on Install and the process will start after a few seconds.


The installation will take a several minutes. Wait until it finishes and you see a screen like this:


Click on Finish and your browser will open the Database Login page for your new server. If you don't see a page like the one below, then you should contact Oracle and ask for assistance.


If you want to login and check Oracle's options, enter SYSTEM as Username and the password that you selected previously.


If You didn't find any link to download Oracle XE 10g Post your mail id as comment then i will give link to download Oracle 10g XE


Installing XAMPP on Windows



  1. Select the Installer option under the Basic Package. You may be taken to a page that presents you with a bunch of different download locations. Just click one of the download buttons, and then save the file to your desktop. Once downloaded, the installer works like most Windows installers.
    In Internet Explorer, you may get a warning about downloading the file. Click the yellow information bar that appears above the Web page in IE, and choose Download File…
  2. Double-click the .exe file you downloaded.
    A window opens, asking you to select the language you’d like to use.
    If a warning dialog appears click the "Allow" option to install XAMPP.
  3. Choose a language from the menu, and then click OK.
    A Setup Wizard window appears, ready to step you through the setup process.
    In Vista you may see a message warning you that XAMPP may not work when installed in the C:\Program Files directory. The default installation is in C:\XAMPP so you don’t have to worry about this problem.
  4. Click the Next button.
    The installer suggests putting the application on your main drive at C:\XAMPP. You can pretty much install it anywhere, but with the Vista operating system you may encounter problems if you install it in C:\Program Files.
  5. Click the Next button once again.
    The XAMPP Options window appears (see below). In most cases, it’s fine to leave all the window’s checkboxes just as you see; see the note below for details.



    If you plan on doing a lot of development, day in and day out, you might want to turn on the “Install Apache as service” and “Install MySQL as service” checkboxes. A service starts up every time you turn on your computer, so Apache, PHP, and MySQL are always running. However, if you won’t be building database sites frequently, or you don’t have a lot of RAM in your computer, don’t turn on these boxes (you’ll just have to manually start the servers when you wish to build dynamic pages, using the XAMPP control panel described on the next page). 

    6. Click Install.
    The installer places all the files onto your system. This process takes a while, since a lot of programs and files are being installed. 

    7. Finally, click the Finish button.
    A window appears “congratulating” you (way to double-click the installer program!), and asking whether you wish to start the XAMPP Control panel. 

    8. Click Yes, to open the XAMPP Control Panel (see screenshot below).
    The XAMPP Control Panel lets you start and stop the Apache Web server and MySQL database server.


    10. If the buttons to the right of Apache and MySQL say Start, click them to start the Web server and the MySQL database server.
    You probably get a Windows security alert about both MySQL and Apache: Click the Unblock button in both cases. This action allows the two servers to run, and tells the Windows firewall protection service that everything is OK.If Apache and MySQL are already running, these buttons say Stop. (Clicking them turns off the Web server and MySQL.) Whenever you start Apache, PHP automatically starts as well. At this point, you should have a complete testing server running on your machine. You just need to make sure it’s working. 

    11. To do so, launch a Web browser, and, in the Location bar, type http://localhost/.
    You encounter a page that lists a bunch of languages; click the language you prefer, and you’re taken to a kind of Web-based control panel for XAMPP (see screenshot below).


    Once installed, you can view your XAMPP home page from http://localhost/xampp/. From the left-hand list of links, you can access helpful programs and information, such as phpMyAdmin (for working with the MySQL database) and phpinfo() for finding out more about the server setup.

    Once you’ve installed XAMPP, you’ll see a shortcut called XAMPP Control Panel on your desktop. Double-click this icon to control the servers you’ve just installed—you can turn the servers off and on, as well as turn them into services (which launch each time you start up your computer).
    To uninstall XAMPP, just go to the location where you installed XAMPP (like C:\XAMPP\) and run the program named Uninstall.exe. This action, however, deletes any databases you created, and destroys any Web pages that you placed on the server. To prevent this process, just follow these steps: First, use phpMyAdmin to export any database you wish to save (you can find instructions at http://php.about.com/od/learnmysql/ss/mysql_backup_3.htm ), and then make a copy of your Web pages which are located in the C:\XAMPP\htdocs folder.

How to change WAMP server port


TO CHANGE THE WAMP SERVER PORT NUMBER:


  1. Stop the WAMP server, if it is running already.
  2. Open the file [WAMPP Installation Folder]/apache/conf/httpd.conf.
  3. Now search for the string Port 80 (I’m assuming that your WAMP was using the port 80. Otherwise, just search for the string “Listen”). This is the port number which WAMP uses. Change this 80 to any other number which you prefer.
  4. Then search for the string “ServerName” and update the port number there also.
  5. Now save and re-start WAMP server and you are done.

How to change XAMPP server port


To change the XAMPP server port number:



  1. Stop the XAMPP server, if it is running already.
  2. Open the file [XAMPP Installation Folder]/apache/conf/httpd.conf.
  3. Now search for the string Listen 80 (I’m assuming that your XAMPP was using the port 80. Otherwise, just search for the string “Listen”). This is the port number which XAMPP uses. Change this 80 to any other number which you prefer.
  4. Then search for the string “ServerName” and update the port number there also.
  5. Now save and re-start XAMPP server and you are done.
Why do we need to change the port number? Because, these days, it is very common that a web developer needs to have multiple web servers running, all at the same time. For example, an XAMPP server can be used to run the local WordPress blog, while a JBoss server also needs to be up for testing a java web applications. In such scenarios, if two or more servers are trying to use the same port number, then the late comer will fail to get the port. So, it becomes necessary to change any one server’s port number to avoid the conflict.

Installing TOMCAT in Windows


i.       Double click on TOMCAT setup file and Click Next.

ii.       Accept License Agreement.


iii.       Check all installation options and click Next.



iv.       Enter username and password and click Next.



v.       Select custom path or leave it for default installation and Click Next.



vi.       Click on Install button.



Vii.   Click on Finish



Verification: Open web browser and type address http://localhost:8080/





         

          

Wednesday, October 24, 2012

Java Mail

For Windows users only
Pre-Requisites:
  • jdk1.6.0_11 ( works with previous versions of JDK)

 Installed location:
  • jdk1.6.0_11 ->   C:\Program Files\Java\jdk1.6.0_11\
  • mail.jar ->   D:\apache-tomcat-6.0.18\lib\mail-1.3.3.jar
Environment Variables:
Enter Variable name and Variable value which is mentioned below.
Variable name:  JAVA_HOME
Variable value:  C:\Program Files\Java\jdk1.6.0_11

Variable name:  PATH
Variable value:  C:\Program Files\Java\jdk1.6.0_11\bin

Variable name:  CLASSPATH
Variable value:  .;D:\apache-tomcat-6.0.18\lib\mail-1.3.3.jar

Note
There first character in classpath should be a period (.) 

Download Links:
  1. Click here to download mail-1.3.3.jar
  2. javamail.default.address.map
  3. javamail.address.map
  4. javamail.providers
  5. javamail.default.providers
Steps to run the below example program
Before running the below example program make sure that mail.jar is in the classpath. Using the below program you can send mail only from Gmail, but the receiving mail ID can be anything. If you want to send mail from some other mail providers, then change theSMTP_HOST_NAME and SMTP_PORT accordingly to mail providers. Change theemailMsgTxt, emailSubjectTxt, emailFromAddress according to your need.
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(" yourMaidID", "yourPassword");
}
Replace "yourMaidID" with from address (i.e. the mail ID from where email should go) and replace " yourPassword" with the password of the corresponding mail ID.
While running the below program you may encounter some errors in console which is given below. This is just a warning. By default our program will look for javamail.providers, javamail.address.map, javamail.default.address.map, javamail.default.providers in "C:\Program Files\Java\jre6\lib\" folder. So to avoid this warnings you just create four files inside "C:\Program Files\Java\jre6\lib\" with the below names. Make sure that the extension of the file is not in .txt format.
(little workaround to make sure the extension is not of type .txt - Click My Computer ->Tools -> Folder Options -> View -> Advanced settings ->
Uncheck the check box "Hide extensions for known file types". Now navigate to "C:\Program Files\Java\jre6\lib\" and check for the file extensions.)
Warnings
DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jre6\lib\javamail.providers (The system cannot find the file specified)
DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jre6\lib\javamail.address.map (The system cannot find the file specified)

Simple java program to send mail
  1. /** 
  2.  * SendMailThroughJava.java 
  3.  */  
  4. package com.javaworkspace.mail;  
  5.   
  6. import java.security.Security;  
  7. import java.util.Properties;  
  8. import javax.mail.Message;  
  9. import javax.mail.MessagingException;  
  10. import javax.mail.PasswordAuthentication;  
  11. import javax.mail.Session;  
  12. import javax.mail.Transport;  
  13. import javax.mail.internet.InternetAddress;  
  14. import javax.mail.internet.MimeMessage;  
  15.   
  16. /** 
  17.  * @author www.javaworkspace.com 
  18.  */  
  19. public class SendMailThroughJava {  
  20.   
  21.     private static final String SMTP_HOST_NAME = "smtp.gmail.com";  
  22.     private static final String SMTP_PORT = "465";  
  23.     private static final String emailMsgTxt = "Welcome to www.javaworkspace.com";  
  24.     private static final String emailSubjectTxt = "A test mail from www.javaworkspace.com";  
  25.     private static final String emailFromAddress = "javaworkspace@gmail.com";  
  26.     private static final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";  
  27.     private static final String[] sendTo = { "javaworkspace@hotmail.com" };  
  28.   
  29.     public static void main(String args[]) throws Exception {  
  30.   
  31.         Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());  
  32.         SendMailThroughJava sendMailThroughJava = new SendMailThroughJava();  
  33.         sendMailThroughJava.sendSSLMessage(sendTo, emailSubjectTxt,  
  34.                 emailMsgTxt, emailFromAddress);  
  35.         System.out.println("Sucessfully sent mail to all Users");  
  36.     }  
  37.   
  38.     /** 
  39.      * @param recipients 
  40.      * @param subject 
  41.      * @param message 
  42.      * @param from 
  43.      * @throws MessagingException 
  44.      */  
  45.     public void sendSSLMessage(String recipients[], String subject,  
  46.             String message, String from) throws MessagingException {  
  47.         boolean debug = true;  
  48.   
  49.         Properties props = new Properties();  
  50.         props.put("mail.smtp.host", SMTP_HOST_NAME);  
  51.         props.put("mail.smtp.auth""true");  
  52.         props.put("mail.debug""true");  
  53.         props.put("mail.smtp.port", SMTP_PORT);  
  54.         props.put("mail.smtp.socketFactory.port", SMTP_PORT);  
  55.         props.put("mail.smtp.socketFactory.class", SSL_FACTORY);  
  56.         props.put("mail.smtp.socketFactory.fallback""false");  
  57.   
  58.         Session session = Session.getDefaultInstance(props,  
  59.                 new javax.mail.Authenticator() {  
  60.                     protected PasswordAuthentication getPasswordAuthentication() {  
  61.                         return new PasswordAuthentication("yourMaidID",  
  62.                                 "yourPassword");  
  63.                     }  
  64.                 });  
  65.   
  66.         session.setDebug(debug);  
  67.   
  68.         Message msg = new MimeMessage(session);  
  69.         InternetAddress addressFrom = new InternetAddress(from);  
  70.         msg.setFrom(addressFrom);  
  71.   
  72.         InternetAddress[] addressTo = new InternetAddress[recipients.length];  
  73.         for (int i = 0; i < recipients.length; i++) {  
  74.             addressTo[i] = new InternetAddress(recipients[i]);  
  75.         }  
  76.         msg.setRecipients(Message.RecipientType.TO, addressTo);  
  77.   
  78.         // Setting the Subject and Content Type  
  79.         msg.setSubject(subject);  
  80.         msg.setContent(message, "text/plain");  
  81.         Transport.send(msg);  
  82.     }  
  83. }