Skip to content

Instantly share code, notes, and snippets.

@kmb385
kmb385 / ArrayCloneExample.java
Created June 27, 2014 17:59
ArrayCloneExample.java
public class ArrayCloneExample {
public static void main(String[] args) {
int[] a = {1,2,3};
int[] b = a.clone();
System.out.println(a == b ? "Same Instance":"Different Instance");
//Outputs different instance
import java.util.Date;
public class Artist {
String mNickname;
String mName;
String mDescription;
String mScene;
String mDay;
String mTime;
package SpringEl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class Application {
public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext("spring-beans.xml");
public class Assistance {
private static Scanner scanner = new Scanner(System.in);
public static void main(String[] args) {
String choice = null;
while(choice == null || !choice.equalsIgnoreCase("no")){
calculateBill();
System.out.println("Do you need to calculate more?");
import java.io.IOException;
import java.util.LinkedList;
public class SequencedProcessExecuter {
private LinkedList<ProcessBuilder> processbuilders = new LinkedList<ProcessBuilder>();
public SequencedProcessExecuter() {
super();
}
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.oreilly.mongo</groupId>
<artifactId>mongo-spring-data</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<spring.version>4.2.1.RELEASE</spring.version>
<spring-data.version>Gosling-RELEASE</spring-data.version>
</properties>
package com.linkedin.batch;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.StepContribution;
import org.springframework.batch.core.StepExecutionListener;
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
import org.springframework.batch.core.job.builder.FlowBuilder;
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE `batch_repo`.`BATCH_JOB_EXECUTION`,
`batch_repo`.`BATCH_JOB_EXECUTION_CONTEXT`,
`batch_repo`.`BATCH_JOB_EXECUTION_PARAMS`,
`batch_repo`.`BATCH_JOB_EXECUTION_SEQ`,
`batch_repo`.`BATCH_JOB_INSTANCE`,
`batch_repo`.`BATCH_JOB_SEQ`,
`batch_repo`.`BATCH_STEP_EXECUTION`,
`batch_repo`.`BATCH_STEP_EXECUTION_CONTEXT`,
`batch_repo`.`BATCH_STEP_EXECUTION_SEQ`;
spring.datasource.driveClassName=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/batch_repo
spring.datasource.username=batch_user
spring.datasource.password=password
spring.datasource.platform=mysql
spring.datasource.initialization-mode=always
spring.batch.initialize-schema=always
package review;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
public class Assessment {
public static int PATIENT_ID = 0;
public static int SSN_COLUMN = 0;