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
View HertzAbsoluteTimeProcessStepTest.java
// src: https://github.com/NYL123/TestRepo/blob/11157eacd62cbcc3913f9f58b22275b253eadbc0/C2C_Digital_AEM/bundles/platform/src/test/java/com/hertz/digital/platform/workflows/HertzAbsoluteTimeProcessStepTest.java
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Dictionary;
import java.util.Iterator;
import java.util.List;
import javax.jcr.Session;
import org.apache.sling.api.resource.ResourceResolver;
View WorkflowCustom.java
import org.osgi.service.component.annotations.Component;
import com.adobe.granite.workflow.WorkflowException;
import com.adobe.granite.workflow.WorkflowSession;
import com.adobe.granite.workflow.exec.WorkItem;
import com.adobe.granite.workflow.exec.WorkflowProcess;
import com.adobe.granite.workflow.metadata.MetaDataMap;
@Component(immediate = true,service=WorkflowProcess.class, property = {"process.label=Test Workflow"})
public class WorkflowCustom implements WorkflowProcess {
View TriggerWorkflowServlet,java
// src: https://github.com/ani03sha/Technical-Interview-Preparation/blob/56ad166bd0fca7b97c72190415c86a8420a070a7/code/AEM/Workflows/Workflows/core/src/main/java/org/redquark/aem/workflow/TriggerWorkflowServlet.java
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.Servlet;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.resource.ResourceResolver;
View RenditionMetadataWorkflowProcessTest.java
// src: https://github.com/login/oauth/authorize?client_id=7e0a3cd836d3e544dbd9&redirect_uri=https%3A%2F%2Fgist.github.com%2Fauth%2Fgithub%2Fcallback%3Freturn_to%3Dhttps%253A%252F%252Fgist.github.com%252F&response_type=code&state=ffdea12214e56c86feb5fdfa1531460ce3ce2e15dfe37f6c9c922f08a507ce08
import static com.day.cq.commons.jcr.JcrConstants.JCR_LASTMODIFIED;
import static com.day.cq.commons.jcr.JcrConstants.JCR_LAST_MODIFIED_BY;
import static io.wcm.handler.mediasource.dam.impl.metadata.RenditionMetadataNameConstants.NN_RENDITIONS_METADATA;
import static io.wcm.handler.mediasource.dam.impl.metadata.RenditionMetadataNameConstants.PN_IMAGE_HEIGHT;
import static io.wcm.handler.mediasource.dam.impl.metadata.RenditionMetadataNameConstants.PN_IMAGE_WIDTH;
import static io.wcm.handler.mediasource.dam.impl.metadata.WorkflowTestUtil.PKG_ROOT;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assert
@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;
You can’t perform that action at this time.