Skip to content

Instantly share code, notes, and snippets.

dfparker2002

Block or report user

Report or block dfparker2002

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dfparker2002
dfparker2002 / Generics.java
Last active Aug 4, 2019
Generic examples
View Generics.java
//src: https://github.com/eugenp/tutorials/blob/887eeaf802e0b8728ec9367ad23495303f9a1f38/core-java-modules/core-java-lang-syntax/src/main/java/com/baeldung/generics/Generics.java
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
public class Generics {
// definition of a generic method
View RestClientLiveManualTest.java
src: https://github.com/eugenp/tutorials/blob/de257ee78ea86f75fca6d49d6101261dd2cef636/httpclient-simple/src/test/java/com/baeldung/client/RestClientLiveManualTest.java
//package com.baeldung.client;
import static org.apache.http.conn.ssl.SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;
import java.io.IOException;
import java.security.GeneralSecurityException;
View Graph.java
// src: https://github.com/eugenp/tutorials/blob/5b5733239c06b595649324d744e97c6a2dc97d68/data-structures/src/main/java/com/baeldung/graph/Graph.java
import java.util.ArrayList;
import java.util.List;
import java.util.Stack;
public class Graph {
private List<List<Integer>> neighbours;
private int n;
View BinaryTree.java
//src: https://github.com/eugenp/tutorials/blob/5b5733239c06b595649324d744e97c6a2dc97d68/data-structures/src/main/java/com/baeldung/tree/BinaryTree.java
import java.util.LinkedList;
import java.util.Queue;
import java.util.Stack;
public class BinaryTree {
Node root;
public void add(int value) {
View neo4j_cypher_cheatsheet.md

Neo4j Tutorial

Fundamentals

Store any kind of data using the following graph concepts:

  • Node: Graph data records
  • Relationship: Connect nodes (has direction and a type)
  • Property: Stores data in key-value pair in nodes and relationships
  • Label: Groups nodes and relationships (optional)
@dfparker2002
dfparker2002 / BiFunctionalInterfacesUnitTest.java
Created Jun 30, 2019
BiFunctional Interfaces Unit Test (Lambda)
View BiFunctionalInterfacesUnitTest.java
//src: https://github.com/ashleyfrieze/tutorials/blob/42eb9a837db736f736f48aa2e4c206edd94ee7c2/core-java-modules/core-java-8-2/src/test/java/com/baeldung/bifunction/BiFunctionalInterfacesUnitTest.java
import org.junit.Test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.function.BiFunction;
import java.util.stream.Collectors;
import java.util.stream.Stream;
View ConvertIteratorToListServiceUnitTest.java
// src: https://github.com/eugenp/tutorials/blob/3ea52a86f9cf35a122672147e0ed540b317342d8/java-collections-conversions/src/test/java/com/baeldung/convert/iteratortolist/ConvertIteratorToListServiceUnitTest.java
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.collection.IsCollectionWithSize.hasSize;
import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.stream.Collectors;
@dfparker2002
dfparker2002 / SampleServletFilter.java
Created Jun 21, 2019
Sling Servlet Filter + Whiteboard + Regex patterns
View SampleServletFilter.java
// src: https://github.com/Adobe-Consulting-Services/acs-aem-samples/blob/master/bundle/src/main/java/com/adobe/acs/samples/filters/impl/SampleServletFilter.java
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
View CloseableQueryBuilderImplTest.java
//src: https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/24486e39452401d149493786c998247653963a08/bundle/src/test/java/com/adobe/acs/commons/search/impl/CloseableQueryBuilderImplTest.java
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyBoolean;
import static org.mockito.Matchers.isA;
View IterableToCollectionUnitTest.java
//src: https://github.com/Doha2012/tutorials/blob/be171f7f59cad31d406c9e44da5aee4a185457cf/java-collections-conversions/src/test/java/org/baeldung/java/collections/IterableToCollectionUnitTest.java
import static org.hamcrest.Matchers.contains;
import static org.junit.Assert.assertThat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Spliterator;
import java.util.Spliterators;
You can’t perform that action at this time.