This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |