Nov 11, 2015

Java 3D

yoyoBG = new BranchGroup();
                        // Make the apperance
 Appearance app = new Appearance();
            ColoringAttributes ca = new ColoringAttributes();
            ca.setColor(0.0f,1.0f,0.5f);
            app.setColoringAttributes(ca);
            //Start position
translate.set(new Vector3f(0.1f, 0.15f, 0.2f));
            TransformGroup  TGT = new TransformGroup(translate);
            BG.addChild(TGT);
            //Rotate
            rotate.rotZ(Math.PI*1.0d);
           TransformGroup  TGR = new TransformGroup(rotate);
            //Create the Cylinder
            Cylinder cy = new Cylinder(0.1f, 0.02f);
cy.setAppearance(app);
TGR.addChild(cy);
TGT.addChild(TGR);
            //Create the Cone
            Cone co1 = new Cone(0.1f, 0.2f);
            co1.setAppearance(app2);
            yoyoTGR7.addChild(co1);
            yoyoTGT7.addChild(yoyoTGR7); //Give the object value in main object value
            //Create the Cone
Sphere sp1=new Sphere(0.15f);
Sp1.setApperance(app3);
yoyoTGT11.addChild(sp1);
yoyoTGT7.addChild(yoyoTGR11); //Give the object value in main object value



BED ICT -1 _Part ii My Answer

01)  (i)  Marks[2]=15
      (ii)  Marks[1] = Marks[3]
             Marks[3]=Marks[4]
             Marks[4]=Marks[1]
      (iii) Sector,Cl aster,Track  
      (iv) 128 Bit
       (v) Disk Operating System
       (vi) E:
              cd work
              E:\work>copy sample.txt D:\Work
       (vii)Control Panel\All Control Panel Items\Network and Sharing Center
       (viii)Control Panel\All Control Panel Items\Programs and Features
       (ix) Dynamic Host Configuration Protocol (DHCP) is a client/server protocol that automatically provides an                  Internet Protocol (IP) host with its IP address and other related configuration information such as the                      subnet mask and default gateway.
        (x)

02)
(i)  int[] MyAr = new int[10]
(ii) MyAr[0]=23
      MyAr[1]=45
      MyAr[2]=23
      MyAr[3]=45
     MyAr[4]=23
      MyAr[5]=45
     MyAr[6]=23
      MyAr[7]=45
     MyAr[8]=23
      MyAr[9]=45
(iii)  
    int[] marks =new int[10];
    marks[0]=23;
    marks[1]=56;
    marks[2]=67;
    marks[3]=32;
    marks[4]=56;
    marks[5]=123;
    marks[6]=56;
    marks[7]=167;
    marks[8]=432;
    marks[9]=656;

    int max=marks[0];
    for (int n=0;n<marks.length;n++){
          if (max>marks[n]){
           max=marks[n];
        }
    }
 System.out.print(max);
    }

03)
(i)
 import java.sql.*;


(ii)


 St.executeUpdate(sql);
      sql = "INSERT INTO SchMIS " + "VALUES (004, 'Nihal J.K', '12C')";
    
(iii)


(iv)


04)

(i)    X,Y,Z

(ii)  
 yoyoBG = new BranchGroup();
          // Make the apperance
 Appearance app = new Appearance();
            ColoringAttributes ca = new ColoringAttributes();
            ca.setColor(0.0f,1.0f,0.5f);
            app.setColoringAttributes(ca);
            //Start position
translate.set(new Vector3f(0.1f, 0.15f, 0.2f));
            TransformGroup  TGT = new TransformGroup(translate);
            BG.addChild(TGT);
            //Rotate
            rotate.rotZ(Math.PI*1.0d);
           TransformGroup  TGR = new TransformGroup(rotate);
            //Create the Cylinder
            Cylinder cy = new Cylinder(0.1f, 0.02f);
cy.setAppearance(app);
TGR.addChild(cy);
TGT.addChild(TGR); 

(iii)    a.  //Start position
translate.set(new Vector3f(0.3f, 0.4f, 0.2f));
            TransformGroup  TGT1 = new TransformGroup(translate);
            BG.addChild(TGT1);
          
            //Create the Cylinder
            Cylinder cy = new Cylinder(0.02f, 0.2f);
cy.setAppearance(app);
TGR.addChild(cy);
TGT1.addChild(TGR); 

         b.
            translate.set(new Vector3f(0.1f, 0.1f, 0.4f));
            TransformGroup  TGT2 = new TransformGroup(translate);
            BG.addChild(TGT2);
           Cylinder cy = new Cylinder(0.08f, 0.4f);
cy.setAppearance(app);
TGR.addChild(cy);
TGT1.addChild(TGR); 

How to copy a file in MS-DOS

Copying a single file from one location to another
  1. Using the cd command, move to the directory that contains the file you want to copy.
  2. Type a command similar to the below command.
copy myfile.txt c:\my\location
In the above example, you would substitute "myfile.txt" with the name of the file you want to copy, and "c:\my\location" with the destinationdirectory.
Copying multiple files to another location
  1. Using the cd command, move to the directory that contains the files you want to copy.
  2. Once in the directory that contains the files you want to copy, type a command similar to one of the below commands.
copy *.* c:\mydir
In the above example, the command would copy every file in the current directory to the "mydir" directory.
copy *.txt c:\mydir
In the above example, the command would copy every txt, or text file, in the current directory into the "mydir" directory.
Tip: Additional examples of wildcard characters can be found on ourwildcard definition.
xcopy hope example /e
If you need to copy files, directories, and subdirectories use the xcopy command. In the above example this xcopy command copies all directories (even empty directories) and files from the hope directory into the example directory.
Copying files with spaces in the file names
Many times you will encounter a file with spaces in the file name. To copy these files surround the full file name and file extension in quotes as shown below.
copy "computer hope.txt" "there is hope.txt"
In the above example the "computer hope.txt" file is surrounded in quotes to let the command line know the complete file. In our example we are also copying the file to a file name with spaces so it is also surrounded in quotes.
How to copy files to another drive
You can also copy files from the current location to any other drive. For example, if you have a USB flash drive that is drive letter F: you can use the command below to copy the file all JPEG image files to the flash drive.
copy *.jpg f:
Related pages and help

How to copy files in Linux and Unix

Below are steps on how to copy a single file from one directory to another directory as well as how to copy multiple files from one directory to another directory.
Copying a single file from one location to another.
  1. Using the cd command, move to the directory that contains the file you want to copy.
  2. Type a command similar to the below command.
cp myfile.txt /usr/bin
In the above example, you would substitute "myfile.txt" with the name of the file you want to copy, and "/usr/bin" with the destination directory.
Copying multiple files to another location
  1. Using the cd command, move to the directory that contains the files you want to copy.
  2. Once in the directory that contains the files you want to copy, type a command similar to one of the below commands.
cp *.* /usr/bin
In the above example, the command would copy every file in the current directory to the "/usr/bin" directory.
cp *.txt /usr/bin
In the above example, the command would copy every txt, or text file, in the current directory into the "/usr/bin" directory.
Additional examples of wildcard characters can be found on our wildcarddefinition.
Copying files with spaces in the file names
Many times you will encounter a file with spaces in the file name. To copy these files surround the full file name and file extension in quotes as shown below.
cp "computer hope.txt" "there is hope.txt"