Skip to content

Instantly share code, notes, and snippets.

MATCH (mainResult: User)
OPTIONAL MATCH
(mainResult)-[liked]->(target0: Content)
OPTIONAL MATCH
(target0)<-[liked]-(target1: User)
OPTIONAL MATCH
(target1)-[liked]->(target2: Content)
MATCH (mainResult: Content)
OPTIONAL MATCH
mainResult<-[relationship0: liked]-(target0: User)
OPTIONAL MATCH
relationship0-[relationship1: liked]->(target1: Content)
OPTIONAL MATCH
relationship1<-[relationship2: liked]-(target2: User)
MATCH (mainResult: Content)
OPTIONAL MATCH
mainResult<-[relationship0: liked]-(target0: User)
OPTIONAL MATCH
relationship0-[relationship1: liked]->(target1: Content)
OPTIONAL MATCH
relationship1<-[relationship2: liked]-(target2: User)
{
user {
id
likedContent {
id
likedByUsers {
id
likedContent {
id
}
@JohnyDays
JohnyDays / rethindbdash.js.flow
Created July 6, 2016 10:31
Some work on typing rethinkdbdash
// @flow
declare module "rethinkdbdash" {
declare type Runnable<T> = {
run: () => Promise<T>,
}
declare type OrderedField = {}
declare type IndexOpts = { index: string }
var select = (elem, selection) => Array.from(elem.querySelectorAll(selection))
var flatten = array => array.reduce((agg, item) => agg.concat(item), [])
var transformType = type => type.replace("(", "").replace(")", "").replace("*", "any").replace("Array", "[]").replace("Object", "{}").replace("…", "...")
var transformArgument = argument => {
argument.type = transformType(argument.type)
if (argument.type.indexOf("...") === 0) {
argument.isRest = true
argument.name = "..."+argument.name
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
'use strict';
function timeIsWithinTimeFilter (time, time_filter) {
var start_hour = time_filter.start_hour
var start_minutes = time_filter.start_minutes
var end_hour = time_filter.end_hour
var end_minutes = time_filter.end_minutes
if (start_hour > end_hour ||
(start_hour === end_hour && start_minutes > end_minutes)
) {
//Time wraps around multiple days
/**
* Auto-generated code below aims at helping you parse
* the standard input according to the problem statement.
**/
var inputs = readline().split(' ');
var node_amount = parseInt(inputs[0]); // the total number of nodes in the level, including the gateways
var link_amount = parseInt(inputs[1]); // the number of links
var exit_amount = parseInt(inputs[2]); // the number of exit gateways
@JohnyDays
JohnyDays / gist:ab352c6bab57683a2db5
Last active October 5, 2017 21:59
Waterfall view solution
'use strict'
var React = require('react-native')
var {
View,
StyleSheet,
} = React
var {StyleSheetRegistry} = StyleSheet