Witshaper is the Professional (Computing Skills, English Learning and Soft Skills) Skill Development Training Center. We provide Professional IT Courses and Soft Skill Training in Dehradun to Students, Employees and organization. Who wish to pursue a career in IT Technology. Witshaper is led by a motivated team of IT experts and Soft Skill Professionals. We provide high quality trainings. Our Emphasis is on giving the practical knowledge to the students, so that they will get to know in depth and never forget what they opt, we provide to the students real learning environment. Witshaper prepares students and professionals to be the part of this growing industry. Be a part of Witshaper and get your dreams successful

Wednesday, 13 May 2015

java Applet ItemListener example

import java.awt.*;
import java.applet.*;
import java.awt.event.*;
public class ItemLis extends Applet implements ItemListener
{
Label l1,l2,l3,l4,l5,l6;
TextField t1,t2,t3,t4;
Choice ch1,ch2;
int i,qty;
float pri;
public void init()
{
l1=new Label("Item Name");
l2=new Label("Quantity    ");
l3=new Label("Price           ");
l4=new Label("Amount      ");
l5=new Label("Tax              ");
l6=new Label("With Tax     ");
t1=new TextField(15);
t2=new TextField(15);
t3=new TextField(15);
t4=new TextField(15);
ch1=new Choice();
ch1.addItem("Burger");
ch1.addItem("Pizza");
ch2=new Choice();
for(i=1;i<10;i++)
ch2.addItem(String.valueOf(i));
setBackground(Color.green);
t3.setText("12.24%");
add(l1);
add(ch1);
add(l2);
add(ch2);
add(l3);
add(t1);
add(l4);
add(t2);
add(l5);
add(t3);
add(l6);
add(t4);
ch1.addItemListener(this);
ch2.addItemListener(this);
}
public void itemStateChanged(ItemEvent ie)
{
if(ie.getSource()==ch1)
{
String inm=String.valueOf(ie.getItem());
if(inm.equals("Burger"))
{
t1.setText("Rs.75.00");
pri=75.0f;
}
else if(inm.equals("Pizza"))
{
t1.setText("Rs.125.00");
pri=125.0f;
}
}
if(ie.getSource()==ch2)
{
qty=Integer.parseInt(String.valueOf(ie.getItem()));
float amt=pri*qty;
t2.setText(String.valueOf(amt));
float tamt=amt+.1224f*amt;
t4.setText(String.valueOf(tamt));
}
}
}
/*
<applet code=ItemLis height=300 width=250></applet>
*/

java Applet LayoutExample



import java.awt.*;
import java.applet.*;
public class LayoutExample extends Applet 
    {
     Button okButton1;
     Button okButton2;
     Button okButton3;
     Button okButton4;
     Button okButton5;
     public void init()
     {
  // sets the LayoutManager to BorderLayout
        setLayout(new BorderLayout());
        okButton1 = new Button("Centered Button");
          okButton2 = new Button("Cold North");
          okButton3 = new Button("Go West");
          okButton4 = new Button("At East");
          okButton5 = new Button("Hot South");
  // always says where the component should be placed when adding
  // Options are center,East,West,Nort and South
        add(okButton1,"Center");
          add(okButton2,"North");
          add(okButton3,"West");
          add(okButton4,"East");
          add(okButton5,"South");
        }
    }
/*<applet code="LayoutExample.java" height=200 width=300></applet>*/

java Applet example of EventListeners,ActionListener(Addition ,Subtract,Multiply,Divide)

import java.applet.*;
import java.awt.event.*;
import java.awt.*;
 
public class EventListeners extends Applet implements ActionListener{
   TextArea txtArea;
   String Add, Subtract,Multiply,Divide;
   int i = 10, j = 20, sum =0,Sub=0,Mul = 0,Div = 0;
   public void init(){
   txtArea = new TextArea(10,20);
   txtArea.setEditable(false);
   add(txtArea,"center");
   Button b = new Button("Add");
   Button c = new Button("Subtract");
   Button d = new Button("Multiply");
   Button e = new Button("Divide");
   b.addActionListener(this);
   c.addActionListener(this);
   d.addActionListener(this);
   e.addActionListener(this);
   add(b);
   add(c);
   add(d);
   add(e);
   }

   public void actionPerformed(ActionEvent e){
   sum = i + j;
   txtArea.setText("");
   txtArea.append("i = "+ i + "\t" + "j = " + j + "\n");
   Button source = (Button)e.getSource();
   if(source.getLabel() == "Add"){
   txtArea.append("Sum : " + sum + "\n");
   }
  
   if(i >j){
   Sub = i - j;
   }
   else{
   Sub = j - i;
   }
   if(source.getLabel() == "Subtract"){
   txtArea.append("Sub : " + Sub + "\n");
   }
   Mul = i*j;
   if(source.getLabel() == "Multiply"){
   txtArea.append("Mul = " + Mul + "\n");
   }
   if(i > j){
   Div = i / j;
   }
   else{
   Div = j / i;
   }
   if(source.getLabel() == "Divide"){
   txtArea.append("Divide = " + Div);
   }
   }
 }

java applet example of ActionListener java applet example of ActionListener

import java.awt.*;
import java.applet.*;
// import an extra class for the ActionListener
import java.awt.event.*;

public class ActionExample extends Applet implements ActionListener
{
     Button okButton;
     Button wrongButton;
     TextField nameField;
     CheckboxGroup radioGroup;
     Checkbox radio1;
     Checkbox radio2;
     Checkbox radio3;
     public void init() 
     { 
          setLayout(new FlowLayout());
          okButton = new Button("Action!");
          wrongButton = new Button("Don't click!");
          nameField = new TextField("Type here Something",35);
          radioGroup = new CheckboxGroup();
          radio1 = new Checkbox("Red", radioGroup,false);
          radio2 = new Checkbox("Blue", radioGroup,true);
          radio3 = new Checkbox("Green", radioGroup,false);
          add(okButton);
          add(wrongButton);
          add(nameField);
          add(radio1);
          add(radio2);
          add(radio3); 
          okButton.addActionListener(this);
          wrongButton.addActionListener(this);
         } 
         public void paint(Graphics g)
         {
 
          if (radio1.getState()) g.setColor(Color.red);
 
        else if (radio2.getState()) g.setColor(Color.blue);
          else g.setColor(Color.green);
 
 
          g.drawString(nameField.getText(),20,100);
     }
   public void actionPerformed(ActionEvent evt) 
         { 
              if (evt.getSource() == okButton)  
                   repaint(); 
          else if (evt.getSource() == wrongButton) 
          {
               wrongButton.setLabel("Not here!"); 
               nameField.setText("That was the wrong button!"); 
               repaint();
          }
     } 
}
/*<applet code="ActionExample.java" height=200 width=300></applet>*/

presentation slides (Comparison of Efficient parallel Index Algorithms ) and presentation Moodle Based Skill Development Survey




presentation Moodle Based Skill Development Survey Module Implementation

Moodle is one of the leading web based learning management system with various plugins available for different functionality.This paper proposes the methods to add customized survey modules in Moodle. With this method we tested the  functionality of some soft skills based surveys and their outputs, integrated in Moodle



https://drive.google.com/file/d/0B7SRUSGOtQ9hZFdnY1Aza0JGNG8/view?usp=sharing

Comparison of Efficient parallel Index Algorithms used for RDF data store using Graphical processing unit with CUDA

The exponential growth of semantic web and the resultant generation of large-scale RDF (Resource Description Framework) triples pose new challenges in the domain of RDF-storage and retrieval.Graphical processing units (GPUs) are being actively probed in the area of Big Data study, machine learning, and augmented certainty ever since ,such applications are categorized by massive data spanned and produced over distributed network. GPUs be responsible for a parallel programming agenda using CUDA (Compute Unified Device Architecture) that can be developed to proficiently collected and make inferences on these massive data-sets. 



https://drive.google.com/file/d/0B7SRUSGOtQ9hcGRFaC0weGNOdDg/view?usp=sharing

Seminar Report On Cloud Computing



Contents


















Abstract
During the past years a vast number of online file storage services have been introduced .while several of these services provide basic functionality such as an uploading and retrieving files by a specific user, more advanced services offer features such as shared folders, real-time collaboration ,minimization of data transfers or unlimited storage space. Within this report I am giving an overview of existing file storage solutions, and also try to analyze the Drop-box client software as well as its transmission protocols, show the weaknesses and possible attack vectors. And conclude by discussing the security improvements.
Key words: cloud computing, drop-box, attacks




Tuesday, 12 May 2015

JAVA Program to represent Bank System using inheritance function ,constructor and user input


import java.io.*;
/*Base class Account*/
class Account
{
 double accBal;
 Account()
 {
 }
 Account(double d)
 {
  accBal=d;
  if(accBal<1000)
  {
   System.out.println("Invlaid amount. Amount should be > or = 1000");
   accBal=1000;
  }
 }
 
 void credit(double amt)
 {
  accBal=accBal+amt;
 }
 
 void debit(double amt)
 {
  if(amt>accBal)
   System.out.println("Debit amount exceeded account balance");
  else
   accBal=accBal-amt;
 }
 
 double getBalance()
 {
  return(accBal);
 }
}
//Derived class SavingsAccount
class SavingsAccount extends Account
{
 double rate;
 SavingsAccount(double r,double amt)
 {
  super(amt); 
  rate=r;
 }

 public void calculateInterest()
 {
  accBal=accBal*rate;
 }
}
class CheckingAccount extends Account
{
 double fee;
 CheckingAccount(double f,double amt)
 {
  super(amt);
  fee=f;
 }
 void credit(double amt)
 {
  accBal=accBal+amt-fee;
 }
 void debit(double amt)
 {
  if(amt>accBal)
   System.out.println("Debit amount exceeded account balance");
  else
   accBal=accBal-amt-fee;
 }

 
}
class Bank
{
 public static void main(String args[])
 {
  int a,b;
  DataInputStream d= new DataInputStream(System.in);
  double amount,rate =5,fee=100;
 
  try
  {
  System.out.println("Press 1. SavingAccounts 2. Checking Accounts");
  a=Integer.parseInt(d.readLine());
  switch(a)
  {
  case 1:
  System.out.println("Enter amount to open account");
  amount=Double.valueOf(d.readLine());
  SavingsAccount sa=new SavingsAccount(rate,amount); 
  
  System.out.println("Thank you for opening account your Initial Balanceis :"+sa.getBalance());
  do
  {
  System.out.println("Enter choice:\n1.Withdraw\n2.Deposit\n3.CheckBalance\n 4.Exit");
  a=Integer.parseInt(d.readLine()); 
  switch(a)
  {
   case 1:
      System.out.println("Enter amount to withdraw");
      amount=Double.valueOf(d.readLine());
      sa.debit(amount);
      sa.calculateInterest();
      System.out.println("Balance is :"+sa.getBalance());
      break;
   case 2:
      System.out.println("Enter amount to deposit");
      amount=Double.valueOf(d.readLine());
      sa.credit(amount);
      sa.calculateInterest();
      System.out.println("Balance is :"+sa.getBalance());
      break;
   case 3:
      System.out.println("Your balance is"+sa.getBalance());
      break;
  }
  }
  while(a!=4);
  break;
  case 2:
  System.out.println("Enter amount to open account");
  amount=Double.valueOf(d.readLine());
  CheckingAccount ca=new CheckingAccount(fee,amount); 
  
  System.out.println("Thank you for opening account your Initial Balanceis :"+ca.getBalance());
  do
  {
  System.out.println("Enter choice:\n1.Withdraw\n2.Deposit\n3.CheckBalance\n 4.Exit");
  a=Integer.parseInt(d.readLine()); 
  switch(a)
  {
   case 1:
      System.out.println("Enter amount to withdraw");
      amount=Double.valueOf(d.readLine());
      ca.debit(amount);
      System.out.println("Balance is :"+ca.getBalance());
      break;
   case 2:
      System.out.println("Enter amount to deposit");
      amount=Double.valueOf(d.readLine());
      ca.credit(amount);
      System.out.println("Balance is :"+ca.getBalance());
      break;
   case 3:
      System.out.println("Your balance is"+ca.getBalance());
      break;
  }
  }
  while(a!=4);
  break;
  }
  }
  catch(Exception e)
  {}
 }
}