Wednesday 18 February 2015

My tools for competitive programming in java

Many programmers prefer to compete in online programming competitions by submitting solutions using Java. But one might wonder what tools are best for competitive java programming. Here i am revealing the tools i use for competitive java programming :


  1. Eclipse
  2. Vrapper
  3. Java SE Development kit (jdk)
  4. TCF Terminals
Features/benefits of this configuration are :
  • All benefits of Eclipse such as :
    • Code Recommenders
    • Intelligent importing
    • Error highlighting
    • Warnings
      and much more.....
  • Enhanced efficiency with VI editor capabilities added to eclipse via Vrapper
    Vrapper can be installed inside eclipse as a plugin and it is one of the best plugins to add VI features to eclipse. Having Vrapper means you have all the power of VI editor.
  • By ensuring the that jdk is installed you can run the 'javac' command and 'java' command right from the command prompt or terminal.
  • By using the terminal for compilation and execution gives you the power of directing stdin input from a file and also stdout output to a file. These features are not yet available in eclipse luna. Ironically this feature is very helpful in studying large outputs and inputs and debugging.
Steps for using the environment
1. Create a new java project with any name.
2. In package explorer, right click on its 'src' package and add new class to it. In the New Java Class dialog make sure to set package field empty i.e. default package.
3. Now write your program in the class created in step 2.
4. To run this program make sure jdk is installed properly and the 'javac' command runs properly in the terminal/ command prompt. Now open the terminal/command prompt, compile and run the program using the following command :
javac Solution.java && java Solution <in.txt> out.txt
where  Solution.java is the file name in which code is written and the second command 'java Solution' (where Solution is the name of the class in .java file) runs the compiled program taking input from 'in.txt' in the same folder where Solution.java exists and writes output to out.txt in the same folder

Note that this environment can be setup on all popular OS platforms.

Monday 16 February 2015

UIITKODERS UIIT CodeChef leaderboard

The CodeChef UIITKODERS leaderboard is here.

Long : http://www.codechef.com/ratings/long-challenge?filterBy=Country%3DIndia&order=asc&search=university%20institute%20of%20information%20technology%2C%20shimla&sortBy=global_rank
Short : http://www.codechef.com/ratings/cook-off?order=asc&search=university%20institute%20of%20information%20technology%2C%20shimla&sortBy=global_rank
LTime : http://www.codechef.com/ratings/lunch-time-all?order=asc&search=university%20institute%20of%20information%20technology%2C%20shimla&sortBy=global_rank

IF YOU ARE FROM UIIT SHIMLA AND HAVE A CODECHEF ACCOUNT BUT YOUR NAME DOES NOT APPEAR IN THE LEADERBOARD , MAKE SURE YOU HAVE FED "University Institute of Information Technology, Shimla" AS YOUR INSTITUTION NAME IN YOUR CODECHEF ACCOUNT.
Also if any account which does not belong to a UIITian appears on the leaderboard , you can report to us.

Wednesday 4 February 2015

'link2sd mount script creation wizard appears everytime, unable to mount the 2nd partition' Solution

Problem Statement:
In short when you start your link2sd app it prompts you to create mount script by choosing the format of 2nd sd partition, then it asks to reboot device. But after the reboot, link2sd again prompts for script creation........and this loop continues.

Solution :
  1. Try making second partition using your clockworkmod recovery. If it does not help got to step 2.
  2. Ensure that the format of the second partition is not automatically changing itself. To do this you can follow the following steps:
    1. Insert your memory card into your pc with help of a memory card adapter.
    2. Download , install and run mini tool partition wizard.
    3. Backup important stuff from your sdcard.
    4. Delete every partition on your sdcard and click apply.
    5. After that recreate your desired partitions. This time it won't revert to ext3.. Now you must try to use link2sd and see if the problem is resolved. If not, go to step 2.
  3. As described by NaraRockingMyAce at an xda forum :
    • With help of MiniTool Partition Wizard delete only your second
      partition on sd card. (use sd card adapter, don't do it through data cable).
    • Create the 2nd partition again and make sure to set it as primary.
    • Apply and verify if the problem is resolved.

Tried on : Sanmsung galaxy min S5570 (tass), Gingerbread, link2sd, minitool partition wizard, FAT32 2nd partition
May work for : Any android phone

Featured Post

PHP EmailMessage class for extracting attachments

Hi, recently I had to create a php program which fetches emails with attachments (including inline). I searched a lot and succeeded with h...