Friday, February 15, 2008

A dozen free & essential apps for Windows

A dozen free & essential apps for Windows by ZDNet's George Ou -- Every time I build a new Windows computer, there are a dozen free and essential applications that I always install for other people. These applications all seem to fill essential functions and they all seem to be well-behaved installers and uninstallers, in other words it won’t crash your computer or drag it down with gunk. [...]

Wednesday, February 13, 2008

Small utility program to unlock PDF documents

Ever downloaded a PDF document from internet which doesn’t have print option or its disabled? I hope you must have come across this situation.

Try this small java program to unlock PDF document for printing etc.

I am using iText API for doing it. They have a very rich collection of classes and methods to play with PDF files.

 

You need itext-1.4.6.jar to run this program. You can download this jar from http://www.lowagie.com/iText/download.html . If you are using eclipse IDE then set this jar in your project build path or if you are running this code from command prompt then you need to set this jar in your classpath.

 

So here is the code… just copy it and run it. You can see we are passing PDF file name to unlockPdf() method though command prompt. inputFile name is your original file which you want to unlock and outputFile name can be anything which you like.

 

package my.examples;

 

import java.io.FileNotFoundException;

import java.io.FileOutputStream;

import java.io.IOException;

 

import com.lowagie.text.DocumentException;

import com.lowagie.text.pdf.PdfEncryptor;

import com.lowagie.text.pdf.PdfReader;

import com.lowagie.text.pdf.PdfWriter;

 

public class UnlockPdf

{

  public static void main(String[] args)

  {

    if (args.length < 2)

    {

      System.err.println("usage: java my.examples.UnlockPdf inputfile.pdf outputfile.pdf");

    }

   else

    {

      new UnlockPdf().unlock(args[0], args[1]);

    }

  }

 

  private void unlock(String inputFile, String outputFile)

  {   

 

    try

    {

      PdfReader reader = new PdfReader(inputFile);

      PdfEncryptor.encrypt(reader, new FileOutputStream(outputFile), null, null,

  PdfWriter.AllowAssembly | PdfWriter.AllowCopy

              | PdfWriter.AllowDegradedPrinting | PdfWriter.AllowFillIn

              | PdfWriter.AllowModifyAnnotations | PdfWriter.AllowModifyContents

              | PdfWriter.AllowPrinting | PdfWriter.AllowScreenReaders, false);

    }

    catch (FileNotFoundException e)

    {

      e.printStackTrace();

    }

    catch (IOException e)

    {

      e.printStackTrace();

    }

    catch (DocumentException e)

    {

      e.printStackTrace();

    }

  }

}

 

 

 

 

 

Tuesday, January 22, 2008

Here comes DevCamp, Bangalore

Guys DevCamp Bangalore 1 is happening on February 9th 2008. It’s really good news for developer community of Bangalore. It will be like most other unconference camps with main focus on developer’s community. I hope to have some real cool application development demos and sessions. This DevCamp will have focus on all aspects of software development and will be an interesting event for anybody who is part of a software development team.

So what are you waiting for? Register yourself at the wiki (http://www.devcamp.in/wiki/Register) and if you are interested to give any session then do visit session page (http://devcamp.in/wiki/Sessions) and put your session details there.

For any further details do visit the wiki: http://www.devcamp.in .Alternatively you can also sign up on the mailing list to get the latest updates about DevCamp.

Venue detail:

ThoughtWorks Technologies (India) Pvt. Ltd. 2nd Floor, Tower C, Corporate Block ,Diamond District, Airport Road , Bangalore, KA - 560 008

Wednesday, December 12, 2007

My Stock Trading Experience

Well off late I started share trading from November, 07. Here I would like to share my experience for all those novice people who want to know the basics. I am not an expert and I am still in the process of learning lot of things so don’t take my words blindly.

These all are my personal views and thoughts which may differ person to person..

What you need to get started?

  • Capital – 20 to 30 thousand to start with (it depends on your appetite)
  • Guts – share trading is not for faint hearted people
  • Vision – ability to think and analyze
  • Patience – power to go through ups and downs
  • Honesty – stick to your original game plan
  • Demat and Online trading account – off course it’s needed.

Now before you start checklist..

  • Your need for investment – First of all you need to know that why you want to invest, what’s your need and for what time frame you want to invest. You should be clear about these things like is it for short term or for long term etc.
  • Have a clear target like how much you want to earn – You should have a clear plan before buying the stock like what kind of profits you are looking for and it should be realistic. For example you may except to earn 50% in 3 months from that particular stock.
  • Gather information about the company in which you want to invest – Do the small research on the company’s past and present performance. Go through their website and read recent news about the company and if you feel positive about it then only buy that stock.
  • Get the information about the sector to which that company belongs – Yes it’s very important to know about the sector that company belongs. If the sector itself is performing badly then no point in expecting a good return from the company. For example nowadays the whole IT sector is down so the all IT companies shares are down and nobody is interested in them.
  • Check the market and economy conditions – You should also see the market conditions before buying. You should look whether the market is over valued or is there any negative trend etc.

Need more … go through these links and get familiar with common terms and basics.

  • Moneycontrol.com – Great site to learn about market and to get any sort of information about any stock or any sector. Do create a user id for yourself and you can also track your investment in their portfolio tools free of cost.
  • Pehla Kadam (First step) – This provides a basic tutorial about share market and related topics. Very basic and very nicely written. A must read before you kick off.
  • And do read The Economics Times regularly and watch CNBC TV18 or NDTV profit.

Some of the good sectors to invest in (at present)…

  • Construction & Contracting
  • Infrastructure
  • Power generation and distribution
  • Financial and Banks
  • Iron and Steel
  • Oil and gas

Tuesday, December 11, 2007

Joy Ride

So finally after 11 long years, the Bangalore-Mangalore train started chugging on December 8, connecting Bangalore to the coastal region (Mangalore).i still remember December of 2006 when me and my friends went for the trekking of Yedakumeri through Donigal. It was just amazing to go through all the tunnels and bridges in the entire route. I think railways have finally done a good work to start a train in this route after a long gap. So now people will be able to travel between Bangalore and Mangalore with ease. See the complete time table for the train below.

Time Table

Train No

Train Name

Date

Runs From Source

Runs On

6517

MANGALORE EXP

11/12/2007

YESVANTPUR JN

MON

TUE

WED

THU

FRI

SAT

SUN

SNo

Stn Code

Stn Name

Route No.

Arrival Time

Dep. Time

Distance

Day

Remark

1

YPR

YESVANTPUR JN

1

Source

20:35

0

1

2

SBC

BANGALORE CY JN

1

20:50

20:55

6

1

3

MYA

MANDYA

1

22:43

22:45

99

1

4

MYS

MYSORE JN

1

23:55

00:10

144

2

5

KRNR

KRISHANRAJANAGA

1

00:43

00:45

179

2

6

HLN

HOLE NARSIPUR

1

01:33

01:35

233

2

7

HAS

HASSAN

1

02:15

02:25

265

2

8

SKLR

SAKLESHPUR

1

03:20

03:25

307

2

9

SBHR

SUBRAHMANYA ROA

1

05:30

05:35

417

2

10

KBPR

KABAKAPUTTUR

1

06:23

06:25

459

2

11

BNTL

BANTAWALA

1

06:48

06:50

484

2

12

KNKD

KANKANADI

1

07:40

07:42

503

2

13

MAQ

MANGALORE

1

08:05

Destination

508

2

You can see the joy among the people in this snap which was published in TOI dated 10th Dec,07.

I am planning to book tickets for Mangalore soon and I wish they will soon start a day train so that passengers will have an opportunity to enjoy the serenity and beauty of Shiradi Ghat.

Popular Posts