Skip to content

Instantly share code, notes, and snippets.

View faizakram's full-sized avatar
🏠
Working from home

Faiz Akram faizakram

🏠
Working from home
View GitHub Profile
package com.st.fileUplaod;
import java.io.File;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3ClientBuilder;
/*Add this Jar File
SELECT t1.name user_name, dep.name department, t1.created_on
FROM employee t1 JOIN department dep ON t1.department_id =dep.id
WHERE t1.created_on = (SELECT MAX(t2.created_on)
FROM employee t2
WHERE t2.department_id = t1.department_id);
-- If not exists in the child table
SELECT p.id
FROM project p
@faizakram
faizakram / RowCopy.Java
Last active June 9, 2020 10:28
Apache POI Row Copy
public class RowCopy {
public static void main(String[] args) throws Exception {
HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream("E:/budget-1.xls"));
HSSFSheet sheet = workbook.getSheet("Budget");
copyRow(workbook, sheet, 5, 8);
copyRow(workbook, sheet, 6, 9);
FileOutputStream out = new FileOutputStream("E:/output.xls");
workbook.write(out);
out.close();
package test.overriding;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.UUID;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.UUID;
import javax.imageio.ImageIO;
package com.care.connection.careconnection;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.List;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;