Thursday, January 6, 2011

Content using session.insertContent() using XCC in MarkLogic

Code Sample to insert content using session.insertContent() using XCC in MarkLogic.
You can also specify Encoding

ContentCreateOptions createOptions = new ContentCreateOptions();
createOptions.setEncoding("UTF-8");
Content content =ContentFactory.newContent(uri, string.getBytes(), createOptions);

session.insertContent(content);

Code Example to use ThreadPoolExecutor in Java

// to create Thread Pooling use
private ThreadPoolExecutor pool=null;

pool=new ThreadPoolExecutor(DEFAULT_THREAD_COUNT,MAX_THREAD_COUNT,20,TimeUnit.SECONDS, new ArrayBlockingQueue(1000),new CallerBlocksPolicy());
        pool.prestartCoreThread();


// now repeatedly use

WorkerThread thread=new WorkerThread(pdfUri,cs);
 pool.execute(thread); // will submit new thread into the que.

// to shutdown

pool.awaitTermination(15,TimeUnit.SECONDS);
pool.shutdown();

Friday, December 24, 2010

Java PDF Library - Apache's PDFBox

Apache PDFBox is an open source Java PDF library for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents. Apache PDFBox also includes several command line utilities.

Features

  • PDF to text extraction
  • Merge PDF Documents
  • PDF Document Encryption/Decryption
  • Lucene Search Engine Integration
  • Fill in form data FDF and XFDF
  • Create a PDF from a text file
  • Create images from PDF pages
  • Print a PDF
  • Source http://pdfbox.apache.org

Tuesday, December 14, 2010

Shipping Corporation of India - Allotment Done - Check Status - SCI

Karvy has disclosed the allotment status of   Shipping Corporation of India ( SCI) FPO.
You can check the detial here -


http://mis.karvycomputershare.com/ipo/