Tuesday, January 11, 2011

Direct Tax Code in 2011-2012, India - Proposed

Income Tax rates or Tax Slabs under Direct Tax Code : Table

Direct Tax Code slabs, 2011-2012, Men
Income: upto 1.6 lacs no income tax
Income : 1.6 lacs to 10 lacs 10 %
Income : 10 lacs to 25 lacs 20 %
Income : above 25 lacs 30 %

Direct Tax Code slabs 2011-2012, Women

Income : upto 1.9 lacs NO TAX
Income : 1.9 lacs to 10 lacs 10 %
Income : 10 lacs to 25 lacs 20 %
Income : above 25 lacs 30 %

Direct Tax Code slabs 2011-2012, Senior Citizen

Income : upto 2.4 lacs NO TAX
Income : 2.4 lacs to 10 lacs 10 %
Income : 10 lacs to 25 lacs 20 %
Income : above 25 lacs 30 %

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();