Saturday, 31 August 2013

Notification for PGEC / PGECET-2013 Final Phase Web Counselling

All the registered GATE/GPAT candidates and PGECET qualified and eligible candidates of 2013 are informed to attend PGEC / PGECET Web Counseling for admission into M.E./M.Tech./M.Arch./M.Planning/ M.Pharmacy/Pharm.D (P.B.) courses for the academic year 2013-2014.


For more details


Click here

Tuesday, 23 July 2013

PGEC/PGECET-2013 ADMISSIONS Notification released

The GATE qualified and eligible candidates of 2012 and 2013, GPAT and PGECET qualified and eligible Candidates of 2013 are informed to attend PGEC / PGECET Web Counseling for admission into M.E./ M.Tech./ M.Arch / M.Pharmacy/Pharm.D (P.B.) courses for the academic year 2013-2014 as per the
schedule given below at any one of the Help Line centers.

Candidates are informed that they should satisfy the admission rules prescribed in the related G.O. besides satisfying the eligibility criteria of the respective universities and should be prepared to pay the tuition fee as applicable.

The left over seats after allotment for GATE / GPAT Candidates are alone available for PGECET candidates This notification itself is a call for counseling.

No separate call letters are sent to the individual candidates. Mere attending counseling does not guarantee a seat. Candidates have to pay non-refundable processing fee of Rs.300/- (SC/ST) and Rs.600/-(others) at
the time of certificate verification.


For More details Click here

Wednesday, 26 June 2013

RMI implementation program

Hello.java

import java.rmi.*;
public interface Hello extends Remote
{
String sayHello(String s) throws RemoteException;

}


HelloImpl.java

import java.rmi.*;
import java.rmi.server.*;
public class HelloImpl extends UnicastRemoteObject implements Hello
{
private int i;
public HelloImpl() throws RemoteException
{
System.out.println("Object created");
}
public String sayHello(String s) throws RemoteException
{
i++;
return "Hello " + s + " Yours is " + i + " request.";
}

}

HelloServer.java

import java.rmi.*;
import java.rmi.registry.*;
public class HelloServer
{
public static void main(String[] args)
{
try
{
LocateRegistry.createRegistry(1112);
HelloImpl r = new HelloImpl();
Naming.rebind("//127.0.0.1:1112/value", r);
System.out.println(" Object ready");
}
catch (Exception e)
{
System.out.println(e);
}
}

}

HelloClient.java

import java.rmi.*;
public class HelloClient
{
public static void main(String[] args)
{
try
{
Remote r = Naming.lookup("//127.0.0.1:1112/value");
Hello i = (Hello) r;
String result = i.sayHello(args[0]);
System.out.println( "From Server: " + result);
}
catch (Exception e)
{
System.out.println(e);
}
}

}

Thursday, 7 February 2013

Pattern Matching implementation in JAVA implementing Directory

Pattern Matching implementation in JAVA implementing Directory

import java.io.*;
class Mat
{
  public String patt;
  public int flg=0;
  public Mat(String p)
  {
      patt=p;
  }
  public void chk(File f) throws IOException
  {
        if (f.isDirectory())
        {
            File[] lf = f.listFiles();
            for (int i = 0; i < lf.length; i++)
            {
            chk(lf[i]);
            }
        }
        else
            srch(f);
  }
  public void srch(File f) throws IOException
  {
          FileInputStream fstream = new FileInputStream(f);
        DataInputStream in = new DataInputStream(fstream);
        BufferedReader brd = new BufferedReader(new InputStreamReader(in));
        String strLine;
        int l=0;
        while ((strLine = brd.readLine()) != null) 
            {
            l=l+1;
                int n=strLine.length();
                int m=patt.length();
                char p;
                char t;
                int s=0;
                int    i=0;
                int j=0;
                while(i<n && s!=1)
                {
                    t=strLine.charAt(i);
                    p=patt.charAt(j);
                    if(p==t)
                    {
                        i++;
                        j++;
                        if(j>=m)
                        {
                            s=1;
                        }
                    }
                    else
                    {
                        j=0;
                        i++;
                    }
                }
                if(s==1)
                {
                    System.out.println("Found Pattern at Line "+ l+" in file" +f);
                    flg=flg+1;
                }
                s=0;
            }
  }
}
  
class Pat
{
    public static void main(String[] args) throws IOException
    {
        String patt;
        File f=new File("D:\\Sameer\\Pat.java");
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        System.out.println("enter pattern");
        patt=br.readLine();
        File f1=f.getParentFile();
        Mat m=new Mat(patt);
        m.chk(f1);
        System.out.println("Pattern Found "+m.flg+" times");
    }
}
       

Monday, 4 February 2013

Pattern Matching using Java

import java.io.*;
class Pat
{
    public static void main(String[] args) throws IOException
    {
        String patt,strLine;
        int l=0,f=0,count=0,fc=1;
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        System.out.println("enter pattern");
        patt=br.readLine();
        while(fc<6)
        {
        FileInputStream fstream = new FileInputStream("textfile"+fc+".txt");
                DataInputStream in = new DataInputStream(fstream);
                BufferedReader brd = new BufferedReader(new InputStreamReader(in));
        while ((strLine = brd.readLine()) != null)  
            {
            l=l+1;
                int n=strLine.length();
                int m=patt.length();
                char p;
                char t;
                int s=0;
                int    i=0;
                int j=0;
                while(i<n && s!=1)
                {
                    t=strLine.charAt(i);
                    p=patt.charAt(j);
                    if(p==t)
                    {
                        i++;
                        j++;
                        if(j>=m)
                        {
                            s=1;
                        }
                    }
                    else
                    {
                        j=0;
                        i++;
                    }
                }
                if(s==1)
                {
                    count++;
                    System.out.println("Found Pattern in File textfile"+fc+" at Line "+ l+" at position "+(i-j+1));
                    f=1;
                }
                s=0;
            }
            if(f==0)
                    System.out.println("Pattern not found ");
            else
                    System.out.println("Pattern count= "+count);
            fc++;
        }
    }
}


Note: Before executing this program create 5 text files with name textfile1.txt, textfile2.txt, textfile3.txt, textfile4.txt, textfile5.txt.

Best geography books for UPSC prelims, mains

This post is intended to clear the confusion that prevails among the aspirants over how to prepare for UPSC geography and the best books f...