This file contains hidden or 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
import java.util.List; | |
import jetbrains.exodus.entitystore.Entity; | |
import jetbrains.exodus.entitystore.EntityIterable; | |
import jetbrains.exodus.entitystore.PersistentEntityStore; | |
import jetbrains.exodus.entitystore.PersistentEntityStores; | |
import jetbrains.exodus.entitystore.StoreTransaction; | |
//https://github.com/JetBrains/xodus/wiki/Entity-Stores#search-queries | |
//https://mvnrepository.com/artifact/org.jetbrains.xodus/xodus-entity-store/1.0.4 |
This file contains hidden or 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
public class Utils { | |
/** | |
* <code>getTimeStamp()</code>. This returns formated TimeStamp. | |
* */ | |
private static String getTimeStamp() { | |
return String.format("%1$td %1$tb %1$tT.%1$tL", Calendar.getInstance()); | |
} |
This file contains hidden or 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
Document document = new Document(); //required for pdfWriter instance | |
document.setMarginMirroring(true); //margins are copies into page | |
document.setMargins(36, 36, 108, 54); //set margins | |
Instance Instance = new Instance(); // required for pdfWriter setpageevent instance | |
//pdfWriter finally writes the document instance contents into the pdf file | |
PdfWriter pdfWriter = PdfWriter.getInstance(document,new FileOutputStream("Din/file/pdfname.pdf")); | |
pdfWriter.setCompressionLevel(0); //define compression |
This file contains hidden or 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 com.din.excel; | |
import java.io.FileInputStream; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.List; | |
import javax.swing.JOptionPane; | |
import org.apache.poi.hssf.util.CellReference; | |
import org.apache.poi.xssf.usermodel.XSSFSheet; |
This file contains hidden or 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 com.din.own; | |
import java.awt.Desktop; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.PrintStream; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; |
This file contains hidden or 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 com.din.comp.compare; | |
import java.awt.BorderLayout; | |
import java.awt.Component; | |
import java.awt.Dimension; | |
import java.awt.datatransfer.DataFlavor; | |
import java.awt.datatransfer.Transferable; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import java.io.File; |
This file contains hidden or 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
required 6 libs | |
commons-collections4-4.1.jar | |
jsoup-1.10.1.jar | |
poi-3.15.jar | |
poi-ooxml-3.15.jar | |
poi-ooxml-schemas-3.15.jar | |
xmlbeans-2.6.0.jar |
This file contains hidden or 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 com.din.own; | |
import java.awt.BorderLayout; | |
import java.awt.Component; | |
import java.awt.Dimension; | |
import java.awt.datatransfer.DataFlavor; | |
import java.awt.datatransfer.Transferable; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; |
This file contains hidden or 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
1.Define output file name | |
String outputFilePath = pathComponent(secondInput)+"\\Output.xlsx"; | |
2.Define outputstream using output file name | |
FileOutputStream outputStream = new FileOutputStream(outputFilePath); | |
3.Initiate Workbook | |
XSSFWorkbook workbook = new XSSFWorkbook(); | |
4.Createsheet |
This file contains hidden or 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
public boolean servicesOK() { | |
int isAvailable = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this); | |
if (isAvailable == ConnectionResult.SUCCESS) { | |
return true; | |
} | |
else if (GooglePlayServicesUtil.isUserRecoverableError(isAvailable)) { | |
Dialog dialog = GooglePlayServicesUtil.getErrorDialog(isAvailable, this, GPS_ERRORDIALOG_REQUEST); | |
dialog.show(); | |
} |