Tuesday, February 17, 2015

Basic Java Calculator using Methods

import java.util.Scanner;

public class calculator{
   
    private static final Scanner STDIN = new Scanner(System.in);
   
    public static void main(String[] args){
       
        int inpOpr;
        System.out.println("\n 1. Addition");
        System.out.println("\n 2. Substraction");
        System.out.println("\n 3. Multiplication");
        System.out.println("\n 4. Division");
        System.out.println("\n Enter your choice");
  

Tuesday, February 10, 2015

Add External Class File When You Run Java

To add external class file as input,

1. On the eclipse left pane, right click the project folder name
2. Click on Run As and then click on Run Configurations
3. On the left side, you will see your project folder name nest under Java Application
4. Click on your project folder name

How to Add ASM Library Files in Eclipse

1. On the eclipse left pane, right click the project folder name
2. Click on Properties
3. New window will appear.
In a new window, see the left pane,
a. Click on Java Build Path
b. Click on Libraries tab
c. You will see "Add External Jars" on the right side, click on that button
d. Select the asm library jar files.

Hello.java

Sometimes I need a very simple java file in order to work on other class file project.
In order to reduce my workload on creating basic blocks, this is a very simple hello.java file:

import java.util.*;

public class hello{

    public static void main(String[] args) {
      
        Date d = new Date();
        System.out.println("Date: "+ d);

Saturday, February 7, 2015

Add Files or Folder to SVN

1. First go to your home directory and then svn directory example: home/ your svn directory name like vkpandey
2. Create a folder example: reading2
3. Put your file into the directory example: put reading2.txt into reading2 folder
4. Right click and open terminal from your svn directory name (goto vkpandey and right click and click on "open in terminal" option)

5. Enter the command svn add reading2 to add reading2 directory and it's file in a SVN
The command gives you the message like:
                         A         reading2
                         A         reading2/reading2.txt

Monday, January 19, 2015

Wireless Not Working on Windows 8.1

Wireless problem on Windows 8.1 Laptop

You can change the adapter settings as follows on your laptop:

You can do this by going to
Right click My Computer,
go to properties,

Thursday, December 4, 2014

Give Permission to public_html files LINUX

Create directory if it does not exist
mkdir $HOME/public_html
cd

chmod o+r public_html/index.html
chmod 755 public_html/index.html
chmod 701 public_html/index.html
chmod 604 public_html/index.html