Skip to content

Instantly share code, notes, and snippets.

View UmarIqbal's full-sized avatar

Umar Iqbal UmarIqbal

View GitHub Profile
package searchIndexer;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.FilenameFilter;
package searchIndexer;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.FilenameFilter;
package searchIndexer;
public class DocStructure {
private Long id;
private String title;
private String content;
public static final String ID = "id";
public static final String TITLE = "title";
package searchIndexer;
import java.io.File;
import java.io.IOException;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.TextField;
import org.apache.lucene.index.IndexWriter;
package searchIndexer;
import java.io.File;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.util.PDFTextStripper;
public class PDFReader {
//Extract text from PDF document
package searchIndexer;
import java.io.File;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.util.PDFTextStripper;
public class PDFReader {
//Extract text from PDF document
@UmarIqbal
UmarIqbal / Main
Last active December 20, 2015 16:09
static void Main(string[] args)
{
long result=0;
result+=3*multtiple(999, 3); // it will first sum of multiples of 3 then multiply it by 3
result+=5*multtiple(999, 5); // same for 5
result-=15*multtiple(999, 15); // to remove repeting values(multiples of both 3 and 5)
Console.WriteLine("Sum of multiples of 3 and 5 :" +result );