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
Posts = new Mongo.Collection('posts'); | |
PostsContainer = React.createClass({ | |
mixins: [ReactMeteorData], | |
getInitialState() { | |
return { | |
inc: 10, | |
limit: 10 | |
}; | |
}, |
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
import twitter4j.util.*; | |
import twitter4j.*; | |
import twitter4j.management.*; | |
import twitter4j.api.*; | |
import twitter4j.conf.*; | |
import twitter4j.json.*; | |
import twitter4j.auth.*; | |
TwitterStream twitterStream; |
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
## Some Context | |
Neo4jClient just gives you a nice way to execute Cypher commands against a Neo4j instance. You always need to start with a working Cypher query, then you can write it in C#. | |
This page just shows some examples of how to translate different Cypher queries into C#. | |
For more explanation about how we handle parameters, immutable query objects, custom return clauses and things like that, you should really take the time to read the main [Neo4jClient Cypher documentation](cypher) that we have published. This page is just examples. | |
## Neo4j Versions |
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
{ | |
"nodes": [ | |
{"id": "red"}, | |
{"id": "orange"}, | |
{"id": "yellow"}, | |
{"id": "green"}, | |
{"id": "blue"}, | |
{"id": "violet"} | |
], | |
"links": [ |
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
# <type>: (If applied, this commit will...) <subject> (Max 50 char) | |
# |<---- Using a Maximum Of 50 Characters ---->| | |
# Explain why this change is being made | |
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
# Provide links or keys to any relevant tickets, articles or other resources | |
# Example: Github issue #23 |
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
[ | |
{ | |
"name": "Glass", | |
"id": "glass", | |
"unicode": "f000", | |
"created": 1, | |
"filter": [ | |
"martini", | |
"drink", | |
"bar", |
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
-server | |
-Xms2048m | |
-Xmx2048m | |
-XX:NewSize=512m | |
-XX:MaxNewSize=512m | |
-XX:PermSize=512m | |
-XX:MaxPermSize=512m | |
-XX:+UseParNewGC | |
-XX:ParallelGCThreads=4 | |
-XX:MaxTenuringThreshold=1 |
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
class Coffee(val flavour: String, val price: Int = 25) { | |
override def toString: String = flavour + " " + price.toString | |
} | |
class CreditCard(val number: Int) { | |
override def toString: String = number.toString | |
} | |
case class Charge(card: CreditCard,cost: Double) { | |
def combine(other: Charge): Charge = |
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
def reverse_tail2(s: String): String = { | |
@scala.annotation.tailrec | |
def impl(ss: String, r: String): String = { | |
if (ss == null) return null | |
if (ss.tail.isEmpty) return ss.head + r | |
impl(ss.tail, ss.head + r) | |
} | |
impl(s, ""); | |
} |
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
var fs = require('fs'); | |
var es = require('elasticsearch'); | |
var client = new es.Client({ | |
host: 'localhost:9200' | |
}); | |
fs.readFile('recipeitems-latest.json', {encoding: 'utf-8'}, function(err, data) { | |
if (err) { throw err; } | |
// Build up a giant bulk request for elasticsearch. |