Thursday, July 17, 2014

Movie info search engine (search here directly)


Thursday, April 10, 2014

Gateway to GATE

        After the GATE result has been published I have received a lot requests to write a post on how to prepare for GATE. Preparation strategy for GATE depends on many parameters like -
  • Technical background of the student: if you have sound knowledge of the key subjects (like algorithm, OS, DBMS, Networking) then you are already halfway through your journey. If you don't have that then don't be upset, just you have to try harder than the others.
  • Speed of learning : if you have good learning speed then you will need less time to learn things, but if you have comparatively low speed then don't panic, don't rush, calm down, learn at your comfortable speed. Believe me at the end of the day speed merely matters.
  • Can you follow routine: if you cannot follow your own routine then learning will be difficult.
  • Confidence level: if you are confident then you can learn things by heart. If you have lack of confidence then you will be panicked, you will rush, you will try to memorize things, and at the end will mess up everything in the exam hall. But if you have over confidence then you are ruined. Over confidence is worse than low confidence.
  • Dedication level: no dedication no gain.
  • Study materials: try to follow some good video lectures because sometimes you don't even know that what you know is wrong. Read what is worth reading, don't read garbage. Here is a small list of some standard study materials.
  • Intelligence level: if you have high intelligence level then surely you will get advantage. But hey we can change our brain wiring, a stupid person can become a genius over time if he keeps pursuing what he wants to do. There are numerous examples in history. Even Einstein was not the class topper.
etc. Long story short - preparation strategy is not same for all. Only you can tell which strategy is suitable for you. Here I am writing a simple generalized version of a preparation plan, it is up to you to customize this version for your own benefit.

     I have divided the preparation process in 4 phases. This is my personal opinion you are free to use your own process.

        Approximately an average student should need a minimum of 7-8 months ( 6-8 hrs/day ) of study and an advanced student should need minimum of 4-5 (4 hrs/day)months of study. 


  • Phase 1: Mental Preparation
Before you begin your journey mental preparation is a must. Take your time be prepared mentally then start your preparation.
    • Are you sure? : So you want to prepare for GATE. Are you sure you really want to do this? Think properly and take a final decision. If you really want to crack GATE then you should not be reluctant about it. GATE should be your only aim for the next few months. If you just want to sit for GATE just because your friends are doing so then I would suggest don't waste your time and money, go to some restaurant and have some good food with the money. Only prepare for it if you really want it.
    • Can I do it? : Ask yourself this question. Be honest with yourself when answering. If the answer is yes then your preparation is already 50% done because you have the fuel - self-confidence. If the answer is no then you need motivation. Before doing something you have to believe you can do it. If you can't crack GATE even in your dreams then how can you do it in the real exam? No matter how hard it may seem don't lose hope, just try harder, and push your limits. No hope no chance.

  • Phase 2: Study the basics
Duration of this phase: approx. 2-3 months (for advanced students), 4-6 months (for average students)
    • Make a mental routine and try to follow it.
    • Make a list of tasks each week and check at the end of the week how many of those tasks are complete. Try to complete at least 60% tasks. Don't push yourself too hard. Just comfortably learn things.
    • No matter how strong your background is don't ignore the basics, because who knows you may don't even know what you don't know or what you know is wrong. Read all the basics at least for one time. All the advanced topics requires a sound knowledge of the basics. If there is some flaw in basics then you are in a big trouble. It's like a BMW running on kerosene.
    • After reading a chapter solve some problems (at least 50 mcqs and some long problems). Mark problems you could not solve in first attempt.
    • Draw mind maps for some important topics if possible, it works.
    • Try to finish the math syllabus in this phase.
    • If possible register for some online mock test series. This will give you the push.

  • Phase 3: Study advanced topics and practice a lot
Duration of this phase: never ending. Stop this phase 20 days before GATE exam.
    • It is time to modify the structure of your to do list, add more time for problem solving. Try to solve previous year GATE papers (and solve them by yourself, don't cheat).
    • Now that you have a sound knowledge of basics you are ready for advanced topics - like avl, B , B+ tree, tcp life cycle, type checking, p-np-npc, turing machine, DMA controller, pipelining etc.
    • Read a topic until you understand it properly.
    • Take some mock test. Analyze you performance.
    • Weekly revise the previous topics. Solve the previously marked problems.

  • Phase 4: Revision and practice
Duration of this phase: last 15-20 days before GATE exam
    • Revise the important topics and any other topic you need to revise.
    • Solve previous year GATE papers (in this phase don't even look at the mock test papers by different coaching institutes, they just don't have the standard).
    • Stay cool; don't take pressure; leave any topic you have not read yet; believe me no one feels 100% prepared in this phase. Mental condition is vital in these days.

Tuesday, April 1, 2014

GATE study materials

        This is a minimal list of study materials for GATE. This list includes two types of materials - first a set of video lectures, books, lectures notes for basic concepts and the second type is a set of practice books for testing those concepts. Remember reading theory is not enough, after reading a chapter always try to solve some problems (both mcq and long problems).




List of materials for theory:

  • MATH

    • A first course in probability by Sheldon Ross - this is easy and efficient book for basic probability theory. 
    • Graph Theory : with applications to engineering and computer science by Narsingh Deo 
    • Engineering mathematics by B.S. Grewal
  • Digital Logic

    • Digital Logic and Computer Design by Morris Mano
  • Computer organization and architecture

    • Computer system architecture by Morris Mano -- this book easy to understand.
    • Mano's book does not cover all parts so you need to google for some chapters.
    • Computer organization bu Hamacher -- difficult to understand. Read only if you have plenty of time.
  • Data structures

    • For basics read any standard book, if you find any difficulty in understanding then watch video lectures, there are thousands of video lectures in youtube
    • For advanced topics watch these lectures Data Structures And Algorithms by Naveen Garg
  • Algorithm

    • Video Lectures (including lecture slides) : Intoduction to algorithms - this is one of the best resources available in the internet on this topic.
    • Books : Introduction to algorithms by Cormen - it may seem difficult for average students, you may have to read 2-3 times to understand some difficult topics but its worth it.
    • Algorithms by Papadimitriou - easy to understand.
  • Theory of computation

  • Compiler design

    • Compiler book by Aho,Ullman
  • Operating Systems

    • Video Lectures: UCB lectures - a huge list of video lectures, just find whatever topic you want to learn.
    • Books: Operating system conceppts by Galvin

 to be continued ...

Note: This list will be modified in regular interval. This is just a minimal list, there are many advanced topics for which you need to google for a better study material. 


List of materials for practice:

  • Previous years GATE papers - must practice these in order to get the feel of GATE.
  • Gateforum, Madeeasy, Kanodia materials are good for practice


A huge list of video lectures are available here covering most of the topics in GATE - arsdigita lectures


Please post your comments -- good, bad, or otherwise — I would really appreciate it.



Click here to learn how to prepare for GATE

                                    -------------------HAPPY READING-----------------------

Thursday, August 8, 2013

Take Screen Shot in Java





The following code shows you how to take a screenshot using java.The heart of this code is the Robot class. This class is used to generate native system input events for the purposes of test automation, self-running demos, and other applications where control of the mouse and keyboard is needed. The primary purpose of Robot is to facilitate automated testing of Java platform implementations.
To use this class we need to import java.awt.Robot. In eclipse shift+ctrl+o will do all this import stuffs for you.

Here is the method to capture screen shot

/*
 * This method takes screen shot
 * @param filename is the file name of the screenshot
 */
 public static void captureScreen(String fileName) throws Exception {
   
                   //get the dimention (i.e. width & height in pixels) of the screen
     Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
                   //Create a rectangular shape of size of the screen
     Rectangle screenRectangle = new Rectangle(screenSize);
                   //create a new robot object
     Robot robot = new Robot();
                   //take a snapshot of the screen
     BufferedImage image = robot.createScreenCapture(screenRectangle);
                   //write the image to file
     ImageIO.write(image, "jpg", new File(fileName));
   
 }

createScreenCapture(Rectangle screenRect)creates an image containing pixels read from the screen & returns it as a BufferedImage. You can change the image format from jpg to any other format you like.


For more info on Robot class visit oracle docs here


Wednesday, August 7, 2013

Download torrent anonymously using Tor Browser


Now a days torrent is banned in may countries & many institutes. For this reason we cannot download many useful file too.
Using Tor Browser we can download torrents anonymously.

What is Tor?

Tor (originally short for The Onion Router)[5] is free software for enabling online anonymity. Tor directs Internet traffic through a free, worldwide volunteer network consisting of more than three thousand relays[6] to conceal a user's location or usage from anyone conducting network surveillance or traffic analysis. Using Tor makes it more difficult to trace Internet activity, including "visits to Web sites, online posts, instant messages and other communication forms", back to the user [7] and is intended to protect users' personal privacy, freedom, and ability to conduct confidential business by keeping their internet activities from being monitored. ( Read More on Wikipedia)

What is u torrent?

It is probably the most popular light-weight bit torrent client.the program was designed to use minimal computer resources while offering functionality comparable to larger BitTorrent clients such as Vuze or BitComet.The program has received consistently good reviews for its feature set, performance, stability, and support for older hardware and versions of Windows.


How to use tor to download torrent anonymously

Step 1: Download Tor Browser from here Download Tor

Step 2: Download u-torrent from here Download u torrent

Step 3: Open the uTorrent and go to Options --> Preferences (ctrl+P) --> Connection and change the settings as shown in the screen shot.

Step 4: Now run tor browser "Start tor browser.exe" from the folder where you extracted it.

Step 5: Start tor browser.When the tor browser starts it will open firefox and this message will be displayed -

Now you can download torrent anonymously. Enjoy...


This article is for educational purpose, author is not responsible for any kind of misuse of this knowledge.

Tuesday, August 6, 2013

Epub Reader





EPUB (short for electronic publication) is a free and open e-book standard by the International Digital Publishing Forum (IDPF). Files have the extension .epub.

EPUB is designed for reflowable content, meaning that an EPUB reader can optimize text for a particular display device. EPUB also supports fixed-layout content. The format is intended as a single format that publishers and conversion houses can use in-house, as well as for distribution and sale. It supersedes the Open eBook standard. (source wikipedia)


Five Best EPUB Readers for PC:


Firefox plugin

This is one of the most popular tool for reading epub files in windows.Very simple interface & customizable.



Cool Reader

Supports epub (non-DRM), fb2, txt, rtf, html, chm, tcr, doc, pdb formats.
Other features:

  • Pages or scroll view
  • Table of contents
  • Bookmarks
  • Text search
  • Hyphenation dictionaries
  • Most complete FB2 format support: styles, tables, footnotes
  • Additional fonts support (.ttf)
  • Can read books from zip archives
  • Automatic reformatting of .txt files (autodetect headings etc.)
  • Styles can be customised in wide range using external CSS
Moreover there are six good looking page skins. Give it a try.



FBReader

FBReader is free e-book reader for Android, Linux, Mac OS, Windows, Unix, and other Mobile devices, Its open-source eBook reader that can also support .ePub files.



Calibre

Calibre is a free and open source e-book library management application.
Features:

  • Library Management
  • E-book conversion
  • Syncing to e-book reader devices
  • Downloading news from the web and converting it into e-book form
  • Comprehensive e-book viewer
  • Content server for online access to your book collection
This software is really good.


magicscroll.net

This is a online reader. No need to install any software,you just need a working internet connection.


Happy Reading


Monday, August 5, 2013

Resize image in Java


Java code for re-sizing all images in a folder


If you use digital camera then you may have noticed that the image format is jpeg(a highly compressed image format)
but still image size is very large.This is because the resolution of image is very high.
We generally do not need such high resolution images.Moreover if we want to store images
in cloud drive (like Google Drive,Dropbox,SkyDrive etc). So here is a java code that will resize
all images in the source directory and save them in the destination directory. User can specify the
ratio of resizing.

Resize.java

/*
 * @author: Arabinda Moni
 * This code resizes all images in a directory with a given ratio
 * You are free to use this code & edit this code.
 * */

package image.resize;

import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;

import javax.imageio.ImageIO;

public class Resize {
 
 private String source; //path of the source directory
 private String dest;   // path of the destination directory
 private ArrayList inclusion;  //this arraylist contains image foramats to be processed 
 private int count=0;
 
 public Resize(String source,String dest,ArrayList inclusion){
  this.source=source;
  this.dest=dest;
  this.inclusion=inclusion;    
 }
 
 
 /*
  * @param ratio is resize ratio
  * For example: if you want to reduce the image to half of its resolution then use ratio=0.5
  * */
 public void resizeAll(double ratio) throws IOException{
  long startTime=System.currentTimeMillis();
  scanDir(new File(source), ratio);
  System.out.println((System.currentTimeMillis()-startTime)+ "  "+count);
 }
 
 /*
  * This method resizes image f 
  * @param f is file to be resized
  * @param ratio is ratio of resizing
  * */
 public void resizeImage(File f,double ratio) throws IOException{
  count++;
  // use BufferedImage to read the image file
  BufferedImage img=ImageIO.read(f);
  //calculation of height & width of the new image
  int width=(int)(img.getWidth()*ratio);
  int height=(int)(img.getHeight()*ratio);
  //Scaling is done here with
  Image newimg=img.getScaledInstance(width, height, Image.SCALE_FAST); 
  BufferedImage bi = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB);
  
  // here the new image is created
  Graphics2D g2 = bi.createGraphics();
  g2.drawImage(newimg, 0, 0, null);
  g2.dispose();
  
  //write image to file
  ImageIO.write(bi, "jpg",new File(dest+"\\"+f.getName()));
    }
 
 /*
  * This method scans the source directory & sub-directories 
  * for images of the included format
  * */
 public void scanDir(File f,double ratio) throws IOException{
  System.out.println(f.getName());
  if(f.listFiles()!=null){
   for(File files : f.listFiles()){
    scanDir(files,ratio);
   }
  } 
  else if(inclusion.contains(f.getName().substring(f.getName().lastIndexOf('.')+1))){
   resizeImage(f,ratio);
  }
 }
    
}


Here goes the driver program
Run.java

package image.resize;

import java.io.IOException;
import java.util.ArrayList;

public class Run {
   public static void main(String args[]) throws IOException{
    ArrayList inc=new ArrayList<>();
    inc.add("jpg");
    inc.add("JPG");
    inc.add("jpeg");
    inc.add("JPEG");
    inc.add("png");    
    Resize res=new Resize(YourSourceDirectory, YourDestinationDirectory, inc);
    res.resizeAll(0.5);    
   }
}

:) Happy Coding.. :)

Sunday, July 28, 2013

Use Linux Commands in Windows





Do you love Linux shell commands & miss them while using windows?
Now you can use Linux shell commands like touch, cat, grep etc from your windows command prompt. Just install  GNU core utilities  in your windows machine and your command prompt becomes magical.
Follow these simple steps:
  1. Download the core utilities from here   http://ftp.gnu.org/gnu/coreutils/coreutils-8.21.tar.xz
  2. Clicking on this link downloads a tar.xz file. Use 7zip to extract it. http://www.7-zip.org/
  3. Edit the path environment variable and add the path of the bin folder. For example if your bin folder is in C:\Program Files\GnuWin32\ then add C:\Program Files\GnuWin32\bin in the ‘path’ environment variable.  This post shows how to set environment variable in windows 

How to change environment variable in windows

Here are a sequence of images which will guide you in this tour. Images are self descriptive. For any confusion or feedback drop a comment below.




  1.  This is a folder where gnu core utilities are stored. We will create an entry to the 'path' variable so that we can use these commands from command prompt.



  

 



                                                                                                                
   




  





Do not forget to put a semicolon( to separate the new entry in the path variable from the previous) before you add this new entry.

Enjoy!!!!!!!!