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 / examples.sql2
Created Jun 6, 2019 — forked from frieder/examples.sql2
JCR-SQL2 examples (AEM6)
View examples.sql2
Find all videos below a specific DAM path
-----------------------------------------
SELECT * FROM [dam:Asset] AS asset
WHERE ISDESCENDANTNODE(asset, '/content/dam')
AND asset.[jcr:content/metadata/dc:format] LIKE 'video/%'
Find all pages with a specific template and an alias
----------------------------------------------------
@dfparker2002
dfparker2002 / table-summary-rte.js
Created Jun 6, 2019 — forked from rogerblanton/table-summary-rte.js
A sample of how to modify an existing RTE Plugin
View table-summary-rte.js
(function ($) {
"use strict";
var _ = window._,
Class = window.Class,
CUI = window.CUI,
EAEM_TABLE = null,
COLUMN_CONTAINER = ".coral-RichText-dialog-columnContainer",
SUMMARY_SEL = ".coral-RichText-dialog--tableprops textarea[data-type=\"summary\"]",
SUMMARY_HTML = '<div class="coral-RichText-dialog-columnContainer">'
@dfparker2002
dfparker2002 / smartrestize.js
Created Jun 6, 2019 — forked from rogerblanton/smartrestize.js
Taken from Paul Irish taken from John Hann
View smartrestize.js
(function($,sr){
// debouncing function from John Hann
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
var debounce = function (func, threshold, execAsap) {
var timeout;
return function debounced () {
var obj = this, args = arguments;
function delayed () {
View recursive-search.java
public static void visitRecursively(Node node, Session currentSession) {
try{
NodeIterator list = node.getNodes();
while(list.hasNext()) {
Node childNode = list.nextNode();
// Verify child node for cqPage type
if((childNode.hasProperty("jcr:primaryType")) && (childNode.getProperty("jcr:primaryType").getValue().getString()).equals("cq:Page") ){
View ListImplTest.java
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Copyright 2017 Adobe Systems Incorporated
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
@dfparker2002
dfparker2002 / ClientLibUseObject.java
Created May 14, 2019 — forked from nateyolles/ClientLibUseObject.java
Custom ClientLibUseObject Java-Use POJO to create custom HTML markup
View ClientLibUseObject.java
package apps.clientlib_async.sightly.templates;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Collection;
import java.util.List;
import java.util.ArrayList;
import javax.script.Bindings;
@dfparker2002
dfparker2002 / component.html
Created May 14, 2019 — forked from kevinweber/component.html
HTL/Sightly: "Use and call template" pattern. Put template into separate file for reusability, and pass parameters when calling it. Note that in most cases it's not necessary to pass "properties" to the template because they work even if they're not passed explicitly.
View component.html
<sly data-sly-use.component="template.html"
data-sly-call="${component.template @ properties=properties}" />
View SightlyClientLibInclude.html
<head data-sly-use.clientLib="${'/libs/granite/sightly/templates/clientlib.html'}">
<!--/* for css+js */-->
<meta data-sly-call="${clientLib.all @ categories='your.clientlib'}" data-sly-unwrap></meta>
<!--/* only js */-->
<meta data-sly-call="${clientLib.js @ categories='your.clientlib'}" data-sly-unwrap></meta>
<!--/* only css */-->
<meta data-sly-call="${clientLib.css @ categories='your.clientlib'}" data-sly-unwrap></meta>
View OptionalUnitTest.java
/*
src: https://github.com/FDPro/baeldung/blob/4de89f8a63f6d3249cc0f2aff96b577f095d723c/core-java-8/src/test/java/com/baeldung/java8/optional/OptionalUnitTest.java
*/
import com.baeldung.optional.Modem;
import com.baeldung.optional.Person;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Arrays;
@dfparker2002
dfparker2002 / BinaryTree.java
Created Apr 26, 2019
BinaryTree example + test
View BinaryTree.java
/*
src: https://github.com/eugenp/tutorials/blob/8a8be56535978fab018ab7f26d12c3028c67bdd9/data-structures/src/main/java/com/baeldung/tree/BinaryTree.java
*/
import java.util.LinkedList;
import java.util.Queue;
public class BinaryTree {
Node root;
You can’t perform that action at this time.