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
{ | |
"difficulty":"0x400", | |
"extraData":"", | |
"gasLimit":"0x8000000", | |
"nonce":"0x0000000000000042", | |
"mixhash":"0x0000000000000000000000000000000000000000000000000000000000000000", | |
"parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000", | |
"timestamp":"0x0", | |
"alloc":{ |
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 com.fasterxml.jackson.core.JsonProcessingException; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import lombok.Getter; | |
import java.util.ArrayList; | |
import java.util.List; | |
@Getter | |
public class CsvError { | |
private String filename; |
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
/** | |
* Validate row of csv to see if it has the correct number of commas. | |
* @param input The csv row to be evaluated. | |
* @param expectedNumberOfCommas The expected number of commas in the csv row. | |
*/ | |
public static void validateLine(String input, int expectedNumberOfCommas) { | |
// Example input: [email protected],Male,21 | |
// Check that there are 2 commas in the input: | |
// regex = ^([^,]*,){2}[^,]*$ |
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
# Compiled source # | |
###################### | |
*.class | |
# Packages # | |
###################### | |
*.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.ariesmcrae.streams; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.stream.Stream; | |
public class MainBuldingStreams { | |
public static void main(String[] args) { | |
// first way |
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
Dockerfile | |
.dockerignore | |
.gitignore | |
README.md | |
.git/ | |
# Compiled source # | |
###################### | |
*.class |
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
FROM node:8.8.1-alpine | |
# Make less message noise during docker build | |
#ENV NPM_CONFIG_LOGLEVEL warn | |
ARG app_env | |
ENV APP_ENV $app_env | |
# All subsequent commands will now be run from inside of this folder | |
RUN mkdir -p /usr/app/src |
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
Stream<String> states = Stream.of("NSW", "VIC", "SA", "WA", "ACT", "QLD", "TAS", "NT"); | |
Stream<String> additionalStates = {"AUCKLAND", "CHRISTCHURCH"}; | |
List<String> combinedStates = Stream.concat(states, additionalStates).collect(Collectors.toList()); | |
String regexPattern = "\\A(" + StringUtils.join(combinedStates, "|") + ")\\z"; | |
// \A(NSW|VIC|SA|WA|ACT|QLD|TAS|NT|SPACE)\z |
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.Optional; | |
public class Main { | |
public static void main (String[] args) { | |
Apple apple = new Apple(); | |
Banana banana = new Banana(); | |
apple.setBanana(banana); | |
Coconut coconut = new Coconut(); |
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.ariesmcrae.combination.service; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.List; | |
import java.util.Optional; | |
import java.util.stream.Collectors; | |
public class Main { |