This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+---+ | |
| n | | |
+---+ | |
+---+ | |
+----------------------------------------------------------------------+| Plan | Statement | Version | Planner | Runtime | Time |+----------------------------------------------------------------------+| "EXPLAIN" | "READ_ONLY" | "CYPHER 3.5" | "COST" | "COMPILED" | 1 |+----------------------------------------------------------------------+ | |
+------------------+----------------+-------------+-------+ | |
| Operator | Estimated Rows | Identifiers | Other | | |
+------------------+----------------+-------------+-------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// We take a dependency on the neo4j-driver module for the connection to the database | |
const neo4j = require('neo4j-driver').v1; | |
// And we'll need a driver to connect to the database. We'll disable 'lossless integers' | |
// because sodding about with the Neo4j integer type to do node lookups is a pain, and | |
// our graph doesn't have anywhere near enough nodes to worry about blowing through 53 | |
// bits of integer precision | |
const driver = neo4j.driver | |
( | |
'bolt://localhost:7687', // Default setup for Neo4j Desktop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MATCH (movie: Movie { title: 'Top Gun' })<-[acted_in: ACTED_IN]-(actor: Person) | |
WITH collect(distinct actor) + movie as nodes, collect(distinct acted_in) as relationships | |
CALL apoc.export.csv.data(nodes, [], 'nodes.csv', {}) YIELD file as nodefile | |
UNWIND relationships as relationship | |
CALL apoc.create.vRelationship(startNode(relationship), type(relationship), { title: relationship.title }, endNode(relationship)) YIELD rel | |
WITH collect(rel) as relationshipsAmended, nodefile | |
CALL apoc.export.csv.data([], relationshipsAmended, 'edges.csv', {}) YIELD file as edgefile | |
RETURN edgefile, nodefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MERGE (n:Resource{name:"Wooden Plank"}); | |
MERGE (n:Resource{name:"Stick"}); | |
MERGE (n:Resource{name:"Torch"}); | |
MERGE (n:Resource{name:"Crafting Table"}); | |
MERGE (n:Resource{name:"Furnace"}); | |
MERGE (n:Resource{name:"Chest"}); | |
MERGE (n:Resource{name:"Wood Pickaxe"}); | |
MERGE (n:Resource{name:"Stone Pickaxe"}); | |
MERGE (n:Resource{name:"Iron Pickaxe"}); | |
MERGE (n:Resource{name:"Gold Pickaxe"}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MERGE (n:Resource{name:"Wooden Plank"}); | |
MERGE (n:Resource{name:"Stick"}); | |
MERGE (n:Resource{name:"Torch"}); | |
MERGE (n:Resource{name:"Crafting Table"}); | |
MERGE (n:Resource{name:"Furnace"}); | |
MERGE (n:Resource{name:"Chest"}); | |
MERGE (n:Resource{name:"Wood Pickaxe"}); | |
MERGE (n:Resource{name:"Stone Pickaxe"}); | |
MERGE (n:Resource{name:"Iron Pickaxe"}); | |
MERGE (n:Resource{name:"Gold Pickaxe"}); |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Item | |
Wooden Plank | |
Stick | |
Torch | |
Crafting Table | |
Furnace | |
Chest | |
Wood Pickaxe | |
Stone Pickaxe | |
Iron Pickaxe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
psake version 4.2.0 | |
Copyright (c) 2010 James Kovacs | |
Executing Clean-Solution-NoVS | |
Microsoft (R) Build Engine version 4.6.1586.0 | |
[Microsoft .NET Framework, version 4.0.30319.42000] | |
Copyright (C) Microsoft Corporation. All rights reserved. | |
Executing Build-Solution-NoVS | |
Microsoft (R) Build Engine version 4.6.1586.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_once('/var/www/resources/MiiCard/miiCard.Consumers/miiCard.Consumers.php'); | |
if (session_id() == "") | |
{ | |
session_start(); | |
} | |
$miiCardObj = new Consumers\MiiCard(MIICARD_CONSUMER_KEY, MIICARD_CONSUMER_SECRET, null, null, null, MIICARD_FORCE_CLAIMS, MIICARD_SIGNUP_MODE); | |
if ($miiCardObj->isAuthorisationCallback()) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// A JsonConverter that respects the Name property of DataMember attributes | |
/// applied to enumeration members, falling back to the enumeration member | |
/// name where no DataMember attribute exists (or where a name has not | |
/// been supplied). Entirely experimental, use at your own risk. | |
/// | |
/// Paul O'Neill, paul@pablissimo.com, 31/07/13 | |
/// </summary> | |
public class DataMemberAwareEnumJsonConverter : JsonConverter | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// A JsonConverter that respects the Name property of DataMember attributes | |
/// applied to enumeration members, falling back to the enumeration member | |
/// name where no DataMember attribute exists (or where a name has not | |
/// been supplied). Entirely experimental, use at your own risk. | |
/// | |
/// Paul O'Neill, paul@pablissimo.com, 31/07/13 | |
/// </summary> | |
public class DataMemberAwareEnumJsonConverter : JsonConverter | |
{ |
NewerOlder