I hereby claim:
- I am dalamar42 on github.
- I am thomasmaroulis (https://keybase.io/thomasmaroulis) on keybase.
- I have a public key whose fingerprint is C090 20D5 6E2B 9D36 ED00 54F7 4675 19FE DF0B CA18
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Integer priority = 0; | |
def sortValue = null; | |
for (content in _source.content) { | |
// Get the priority of the source. Higher is better | |
Integer thisPriority = priorities.get(content.source); | |
// Get the value of the field we want to sort on | |
def thisValue = content[sortField]; | |
"sort" : { | |
"_script": { | |
"type": "string", | |
"script": "es_sort_by_script", | |
"params": { | |
"sortField": "data", | |
"priorities": { | |
"someSource": "1", | |
"someOtherSource": "2" | |
} |
{ | |
"content": [ | |
{ | |
"source": "someSource", | |
"data": "foo" | |
}, | |
{ | |
"source": "someOtherSource", | |
"data": "baz" | |
} |
// Credit: https://youtrack.jetbrains.com/oauth?state=%2Fissue%2FIDEA-125281 | |
@Documented | |
@Nonnull | |
@TypeQualifierDefault( | |
{ | |
ElementType.ANNOTATION_TYPE, | |
ElementType.CONSTRUCTOR, | |
ElementType.FIELD, | |
ElementType.LOCAL_VARIABLE, |
@NonNullByDefault | |
package com.metabroadcast.<some_package>; | |
import com.metabroadcast.common.annotation.NonNullByDefault; |
PROFILE | |
MATCH (n:Label{ id:1} ) | |
WITH n AS entry_node, collect(n) AS nodes_found_blue, collect(n) AS nodes_to_visit | |
UNWIND nodes_to_visit AS n | |
MATCH (n)-[:REL]-(target_node) | |
WHERE target_node = entry_node OR NOT target_node IN nodes_found_blue | |
WITH entry_node, nodes_found_blue + collect(DISTINCT target_node) AS nodes_found_green, | |
collect(DISTINCT target_node) AS nodes_to_visit |
public class ThingTester { | |
private ThingDoer doer = new ThingDoer(); | |
@Test | |
public void testAllTheThings() { | |
assertThat(doer.doTheThing(), is("theThing")); | |
assertThat(doer.doTheOtherThing(), is("theOtherThing")); | |
assertThat(doer.doTheThirdThing(), is(false)); | |
// Repeat for 39 more assertions... |
public class Component { | |
private final Delegate delegate; | |
public Component() { | |
this.delegate = new Delegate(); | |
} | |
public void doTheThing() { | |
doMyOwnThing(); |
public class Component { | |
private final Delegate delegate; | |
public Component(Delegate delegate) { | |
this.delegate = delegate; | |
} | |
public void doTheThing() { | |
doMyOwnThing(); |