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
Book book = new Book | |
{ | |
Title = "Hit Refresh" | |
}; | |
Book anotherBook = new Book | |
{ | |
book.Title //CS1922: Collection initializer requires its type 'type' to implement System.Collections.IEnumerable. | |
}; |
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
int[] nums = { 33, 44, 55, 66, 77, 88, 99, 100 }; | |
int index = BinarySearch(nums, 99); | |
Console.WriteLine(index); | |
int BinarySearch(int[] nums, int target) | |
{ | |
int low = 0, high = nums.Length - 1; |
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
int[] nums = { 23, 300, 2400, 2300, 100, 1, 10, 20, 15 }; | |
QuickSort(nums, 0, nums.Length - 1); | |
Console.WriteLine(String.Join(",", nums)); | |
void QuickSort(int[] nums, int low, int high) | |
{ | |
if(low < high) |
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
int[] nums = { 2323, 23, 200, 323, 20, 15 }; | |
MergeSort(nums); | |
Console.WriteLine(String.Join(",", nums)); | |
void MergeSort(int[] nums) | |
{ | |
if(nums.Length < 2) | |
{ | |
return; |
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 review; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class Assessment { | |
public static void main(String[] args) { | |
List<Video> videos = new ArrayList<Video>(List.of(new Video("A", false), new Video("B", true), new Video("C", false))); |
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 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; |
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
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 |
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
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`; |
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 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; |
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
<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> |
NewerOlder