Visual identity

If you want promote your business, then you have come to the right place. more »

Unique solutions

If you want promote your business, then you have come to the right place. more »

Live support

If you want promote your business, then you have come to the right place. more »

Java Code For Binary Search Tree

Posted by Unknown
Java Code For Binary Search Tree















import java.util.*;
class Node
{
Node left,right;
int data;
}
class BST
{
Node root;
BST()
{
root=null;
}
void insert(int x)
{
Node newrec=new Node();
newrec.data=x;
newrec.left=newrec.right=null;
if(root==null)
{
root=newrec;
}
else
{
Node a,b=null;
a=root;
while(a!=null)
{
b=a;
if(a.data<=x)
a=a.left;
else a=a.right;
}
if(b.data<=x)
b.left=newrec;
else b.right=newrec;
}
}
void delete(int x)
{
if(root==null)
System.out.println("Tree is Empty");
else
{
Node a,b=null,c;
a=root;
while(a!=null&&a.data!=x)
{
b=a;
if(a.data<=x)
a=a.left;
else a=a.right;
}
if(a==null)
System.out.println("Element is not present");
else
{
if(a.left==null&&a.right!=null)
{
if(a==root)
root=a.right;
else
{
if(b.left==a)
b.left=a.right;
else b.right=a.right;
}
}
else if(a.left!=null&&a.right==null)
{
if(a==root)
root=a.left;
else
{
if(b.left==a)
b.left=a.left;
else b.right=a.left;
}
}
else if(a.left==null&&a.right==null)
{
if(a==root)
root=null;
else
{
if(b.left==a)
b.left=null;
else b.right=null;
}
}
else
{
if(a==root)
{
root=a.right;
root.left=a.left;
}
else
{
if(b.left==a)
{
c=a.right;
while(c.left!=null)
c=c.left;
c.left=a.left;
b.left=a.right;
}
else
{
c=a.right;
while(c.left!=null)
c=c.left;
c.left=a.left;
b.right=a.right;
}
}
}
}
}
}
void display(int x)
{
switch(x)
{
case 1:inorder(root);
break;
case 2:preorder(root);
break;
case 3:postorder(root);
break;
default:System.out.println("Wrong Choice:");
}
System.out.println();
}
void search(int x)
{
Node a,b=null;
a=root;
while(a!=null&&a.data!=x)
{
b=a;
if(a.data<=x)
a=a.left;
else a=a.right;
}
if(a==null)
System.out.println(x+" is not present");
else System.out.println(x+" is present");
}
void postorder(Node x)
{
if(x!=null)
{
postorder(x.left);
postorder(x.right);
System.out.print(x.data+" ");
}
}
void preorder(Node x)
{
if(x!=null)
{
System.out.print(x.data+" ");
preorder(x.left);
preorder(x.right);
}

}
void inorder(Node x)
{
if(x!=null)
{
preorder(x.left);
System.out.print(x.data+" ");
preorder(x.right);
}

}
}

class BSTExp
{
public static void main(String args[])
{
Scanner src=new Scanner(System.in);
int ch,x;
BST b=new BST();
do
{
System.out.println("Enter choice 1:Insert 2:Delete 3:Search 4:Display 5:Exit");
ch=src.nextInt();
switch(ch)
{
case 1:System.out.println("Enter element to be inserted");
x=src.nextInt();
b.insert(x);
break;
case 2: System.out.println("Enter element to be Deleted");
x=src.nextInt();
b.delete(x);
break;
case 3:System.out.println("Enter element to be Searched");
x=src.nextInt();
b.search(x);
break;
case 4:System.out.println("Enter choice 1:Inorder 2:Preorder 3:Postorder");
x=src.nextInt();
b.display(x);
break;
case 5:System.out.println("THANK YOU");
break;
default: System.out.println("WRONG CHOICE");
}
}while(ch!=5);
}
}
more »

Assembly Language Code For 32-Bit Addition

Posted by Unknown
Assembly Language Code For 32-Bit Addition














.model small
.386p

.data
msg1 db,0ah,"Enter the first no. : $"
msg2 db,0ah,"Enter the second no. : $"
msg db,0ah,"Addition is : $"
emsg db,0ah,"Wrong input : $"
no1 dd ?
no2 dd ?
res dd ?


.code
byte_in  PROC NEAR
    mov ah,01h
        int 21h
    cmp al,30h
        jc wrong
        cmp al,40h
        jc calc1
        cmp al,41h
        jc wrong
        cmp al,47h
        jc calc2
  calc1:sub al,30h
        jmp exit1
  calc2:sub al,31h
        jmp exit1
  wrong:LEA dx,emsg
        mov ah,09h
        int 21h
exit1:  ret
byte_in endp

byte_out PROC NEAR
         add dl,30h
        cmp dl,3Ah
        jb disp
       add dl,07h
 disp: mov ah,02h
        int 21h   
ret
byte_out endp  


.startup
        mov ax,@data
        mov ds,ax
        LEA dx,msg1
        mov ah,09h
        int 21h
    call byte_in
        mov ch,al
    call byte_in
        mov cl,al
        SHL ecx,10h
    call byte_in
        mov ch,al
    call byte_in
        mov cl,al
        mov ebx,ecx
        LEA dx,msg2
        mov ah,09h
        int 21h

    call byte_in
        mov ch,al
    call byte_in
        mov cl,al
        SHL ecx,10h
    call byte_in
        mov ch,al
    call byte_in
        mov cl,al
        add ebx,ecx

        LEA dx,msg
        mov ah,09h
        int 21h

    mov ecx,ebx
    SHR ecx,10h
    SHR ecx,08h
    mov dl,cl
    Call byte_out
    mov ecx,ebx
    SHR ecx,10h
    mov dl,cl
    Call byte_out
    mov ecx,ebx
    SHR ecx,08h
    mov dl,cl
    Call byte_out
        mov ecx,ebx
    mov dl,cl
    Call byte_out

   exit:mov ah,4ch
        int 21h
.exit
end

more »

Java Code For Direct Linking Loader(DLL)

Posted by Unknown
Java Code For Direct Linking Loader(DLL)














//ALP program1//
PG1 START        0
ENTRY A,B
EXTRN PG2,C
.
.
.
A DC    F             20
B DC    F            30
DS A(A)            40
DS A(B+15)        44
DS A(C-PG2)        48
END                52

//ALP program2 //
PG2 START        0
ENTRY C
EXTRN A,B
C DC F            16
DS A(C+25)        20
DS A(A)            24
DS A(B+15)        28
END                32

// Java code for DLL//
import java.util.*;
import java.io.*;
class DLL
{
public static void main(String args[])
{
String sym[]=new String[50];
String type[]=new String[50];
int id[]=new int[50];
int eid[]=new int[50];
int eid1[]=new int[50];
String flag[]=new String[50];
String flag1[]=new String[50];
String sym1[]=new String[50];
String rea[]=new String[50];
String rea1[]=new String[50];
String type1[]=new String[50],l="",l1="";
String ra[]=new String[50];
String ra1[]=new String[50];
int id1[]=new int[50],l2=0,l3=0;
int c=0,d=0,e=1,k=0,fla=0,fla1=0,ctr=0,ctr1=0;
int f=0,g=0,h=1,m=0,w=0,v=0,u=0;
String a[]=new String[50];
Scanner src=new Scanner(System.in);
//System.out.println("Enter the name of 1st file with format");
//String f=src.next();
try
{
    FileReader fr=new FileReader("PG1.txt");
    BufferedReader br = new BufferedReader(fr);
    String x,y;
    while((x=br.readLine())!=null)
    {
        if(x.contains("START"))
        {
            int p=x.indexOf("START");
            sym[c++]=x.substring(0,p);
            type[d]="SD";
            id[d]=e++;
            d++;w++;
            int p1=x.lastIndexOf("\t");
            ra[k++]=x.substring(p1+1,x.length());
        }
        else if(x.contains("ENTRY"))
        {
            int p=x.indexOf(" ");
            y=x.substring(p+1,x.length());
            int p2=0;
            a=y.split(",");
            for(int i=0;i<a.length;i++)
            {
                sym[c++]=a[i];
                type[d]="LD";
                d++;w++;
                eid[v++]=1;
            }
        }
        else if(x.contains("EXTRN"))
        {
            int p=x.indexOf(" ");
            y=x.substring(p+1,x.length());
            int p2=0;
            a=y.split(",");
            for(int i=0;i<a.length;i++)
            {
                sym[c++]=a[i];
                type[d]="ER";
                id[d]=e;
                eid[v++]=e;
                d++;e++;
            }
        }
        else if(x.contains("END"))
        {
            int p=x.lastIndexOf("\t");
            l=x.substring(p+1,x.length());
            l2=Integer.parseInt(l);
        }
        else
        {
            for(int i=1;i<c;i++)
            {
                if(x.contains(sym[i]+" DC"))
                {
                    int p1=x.lastIndexOf("\t");
                    ra[k++]=x.substring(p1+1,x.length());

                }
                if(x.contains("("+sym[i])||x.contains("+"+sym[i]))
                {
                    flag[fla++]="+ve";
                    int p=x.lastIndexOf("\t");
                    rea[ctr++]=x.substring(p+1,x.length());

                }
                else if(x.contains("-"+sym[i]))
                {
                    flag[fla++]="-ve";
                    int p=x.lastIndexOf("\t");
                    rea[ctr++]=x.substring(p+1,x.length());
                }
            }
        }
    }
    for(int i=0;i<c;i++)
    {
        if (ra[i] == null)
            {
                ra[i] = "-";
            }
    }
    //System.out.println("Enter the name of 2nd file with format");
    //String fr=src.next();

    FileReader fir=new FileReader("PG2.txt");
    BufferedReader bur = new BufferedReader(fir);
    while((x=bur.readLine())!=null)
    {
        if(x.contains("START"))
        {
            int p=x.indexOf("START");
            sym1[f++]=x.substring(0,p);
            type1[g]="SD";
            id1[g]=h++;
            g++;
            int p1=x.lastIndexOf("\t");
            ra1[m++]=x.substring(p1+1,x.length());
        }
        else if(x.contains("ENTRY"))
        {
            int p=x.indexOf(" ");
            y=x.substring(p+1,x.length());
            int p2=0;
            a=y.split(",");
            for(int i=0;i<a.length;i++)
            {
                sym1[f++]=a[i];
                type1[g]="LD";
                g++;
                eid1[u++]=1;
            }
        }
        else if(x.contains("EXTRN"))
        {
            int p=x.indexOf(" ");
            y=x.substring(p+1,x.length());
            int p2=0;
            a=y.split(",");
            for(int i=0;i<a.length;i++)
            {
                sym1[f++]=a[i];
                type1[g]="ER";
                id1[g]=h;
                eid1[u++]=h;
                g++;h++;
            }
        }
        else if(x.contains("END"))
        {
            int p=x.lastIndexOf("\t");
            l1=x.substring(p+1,x.length());
            l3=Integer.parseInt(l1);
        }
        else
        {
            for(int i=1;i<f;i++)
            {
                if(x.contains(sym1[i]+" DC"))
                {
                    int p1=x.lastIndexOf("\t");
                    ra1[m++]=x.substring(p1+1,x.length());

                }
                if(x.contains("("+sym1[i])||x.contains("+"+sym1[i]))
                {   
                    flag1[fla1++]="+ve";
                    int p=x.lastIndexOf("\t");
                    rea1[ctr1++]=x.substring(p+1,x.length());
                }
                else if(x.contains("-"+sym1[i]))
                {
                    flag1[fla1++]="-ve";
                    int p=x.lastIndexOf("\t");
                    rea1[ctr1++]=x.substring(p+1,x.length());
                }
            }
        }

    }
    for(int i=0;i<f;i++)
    {
        if (ra1[i] == null)
            {
                ra1[i] = "-";
            }
    }
}
catch(Exception ex){}
System.out.println("ESD1");
System.out.println("Symbol\tType\tID\tRelative Add\tlength");
for(int i=0;i<c;i++)
{
    if(i==0)
    System.out.println(sym[i]+"\t"+type[i]+"\t"+id[i]+"\t"+ra[i]+"\t\t"+(l2+1));
    else
    System.out.println(sym[i]+"\t"+type[i]+"\t"+id[i]+"\t"+ra[i]+"\t\t-");
}
System.out.println("\n\nRLD1");
System.out.println("ESD_ID\tlength\tFlag\tRelative Add");
for(int i=0;i<v;i++)
{
    if(type[i+1].contains("ER"))
    System.out.println(eid[i]+"\t-\t"+flag[i]+"\t"+rea[i]);
    else
    System.out.println(eid[i]+"\t4\t"+flag[i]+"\t"+rea[i]);
}

System.out.println("\n\nESD2");
System.out.println("Symbol\tType\tID\tRelative Add\tlength");
for(int i=0;i<f;i++)
{
    if(i==0)
    System.out.println(sym1[i]+"\t"+type1[i]+"\t"+id1[i]+"\t"+ra1[i]+"\t\t"+(l3+1));
    else
    System.out.println(sym1[i]+"\t"+type1[i]+"\t"+id1[i]+"\t"+ra1[i]+"\t\t-");
}


System.out.println("\n\nRLD2");
System.out.println("ESD_ID\tlength\tFlag\tRelative Add");
for(int i=0;i<u;i++)
{
    if(type1[i+1].contains("ER"))
    System.out.println(eid1[i]+"\t-\t"+flag1[i]+"\t"+rea1[i]);
    else
    System.out.println(eid1[i]+"\t4\t"+flag1[i]+"\t"+rea1[i]);
}


System.out.println("\n\nEnter value for IPLA ");
int z=src.nextInt();
int y[]=new int[50];
int y1[]=new int[50];

try
{
for(int i=0;i<k;i++)
    y[i]=Integer.parseInt(ra[i].trim());
}
catch (Exception exc){}
try
{
for(int i=0;i<m;i++)
    y1[i]=Integer.parseInt(ra1[i].trim());
}
catch (Exception exc){}
for(int i=0;i<m;i++)
    System.out.println(y1[i]);

System.out.println("GEST");
System.out.println("Symbol\tAddress");
u=0;
for(int i=0;i<c;i++)
{
    if(type[i].contains("ER"))
    {
        System.out.println(sym[i]+"\t"+(z+y1[u++]+l2+1));
    }
    else
    System.out.println(sym[i]+"\t"+(z+y[i]));
}

}
}

more »

Future Tanks with Adaptive Technology

Posted by Unknown

Future Tanks with Adaptive Technology

The tank of what's to come… Designed by Poland's Obrum, the PL-01 idea, disposes of radar and infrared signature, in a compact arrangement

Obrum, some piece of Poland Defense Holdings, has uncovered its most recent item, the Tank PL-01 idea at the MSPO 2013 guard display. In participation with Polish organizations and British combination BAE Systems, the PL-01 which weighs 35 tons, measures 7 meters in length, 3.8 meters wide and 2.8 meters high. Three individuals can fit in the body of the vehicle.

The Adaptiv engineering secures the tank from recognition. A cluster of hexagonal Peltier plates on the surface might be warmed and cooled to project a desired image, for example, the foundation as well as a separate article, making the tank unobservable. The tank is additionally outfitted with an arrangement of 350-degree persistent perception day and night.

more »

Mini Countryman:Awesome car

Posted by Unknown

Mini Countryman

The most recent Steampunk propelled outline to hit our work area is this magnificent Mini Countryman. Designed by Poland's Carlex Design, this Mini Cooper has been totally patched up from the back to front. The outside is splashed in a level grey paint job hit with differentiating stresses of copper found on the wheels alongside a few different subtle elements all around. The inner part has been totally upgraded with copper trim , wood, and tan calfskin to wrap things up.

more »

Rotating Double Hold Car Holder for Tablets

Posted by Unknown

Rotating Double Hold Car Holder for Tablets

360º Rotating Double Hold Car Mount/holder for All Ipad/ipad Air/i/universal Tablets(9-11 Inch)/smartphone(3-5 Inch)

more »

NASA's Biggest Load carrying Super Sized Cargo Plane

Posted by Unknown

NASA's Biggest Load carrying Super Sized Cargo Plane

The point when NASA needs to ship its outsized space apparatus parts between processing, testing, and launch offices around the nation, there is one and only plane enormous enough, capable enough, and—above all wide enough to do the occupation: the Aero Spacelines Super Guppy. Initially created in 1962 as a successor to the Pregnant Guppy load air ship, the Super Guppy was planned and manufactured particularly with the end goal of shuttling NASA gear around the nation. Five Super Guppies have been inherent all, and the armada has helped move parts for various projects including the Gemini, Apollo, and Skylab missions. The first Super Guppy (the SG) was little more than an adjusted C-97j Turbo Stratocruiser (a mobilized Boeing 377), stretched and enlarged to build its inside load limit it measured 141 feet long by 25 feet wide—with all the more capable motors, greater wings and a bigger tail balance. Still, it could tote 54,000 pounds of cargo at a cruising rate of 300 mph

more »