This file contains hidden or 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
Hi Michael, | |
Jon and I were geeking out on "The New Space Opera". Here are some of the titles and authors. | |
* Peter F. Hamilton: The Night's Dawn, Pandora's Star/Judas Unchained, The Void Trilogy | |
* Dan Simmons: Hyperion/The Fall of Hyperion, Endymion/The Rise of Endymion. Avoid Olympos/Illium, they're silly. | |
* Alistair Reynolds: Everything, beginning with Revelation Space. | |
* Iain M. Banks: Any of the Culture novels. The Algebraist is slightly off-kilter but enjoyable. | |
* Charles Stross: Glasshouse, Accelerando. |
This file contains hidden or 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 sun.misc.Unsafe; | |
import java.util.Arrays; | |
import java.util.Random; | |
/** | |
* @author mh | |
* @since 12.02.11 | |
*/ | |
public class StringSearcher { |
This file contains hidden or 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
public interface Neo4jOperations { | |
<T> T doInTransaction(GraphTransactionCallback<T> callback); | |
<T> T execute(GraphCallback<T> callback); | |
Node getReferenceNode(); | |
Node getNode(long id); | |
Node createNode(Property... props); |
This file contains hidden or 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
ynagzet:cf mh$ ping vcap.me | |
PING localhost (127.0.0.1): 56 data bytes | |
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.068 ms | |
ynagzet:cf mh$ bin/vcap start router | |
router : RUNNING | |
ynagzet:cf mh$ bin/vcap start cloud_controller | |
cloud_controller : RUNNING | |
ynagzet:cf mh$ bin/vcap start redis | |
redis_gateway : RUNNING |
This file contains hidden or 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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: neo4j | |
# Required-Start: | |
# Required-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
### END INIT INFO | |
function abspath() { pushd . > /dev/null; if [ -d "$1" ]; then cd "$1"; dirs -l +0; else cd "`dirname \"$1\"`"; cur_dir=`dirs -l +0`; if [ "$cur_dir" == "/" ]; then echo "$cur_dir`basename \"$1\"`"; else echo "$cur_dir/`basename \"$1\"`"; fi; fi; popd > /dev/null; } |
This file contains hidden or 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
pgp trust --keyId 0x29C2D8FD | |
addon install bundle --bundleSymbolicName org.springframework.datastore.neo4j.roo.addon;1.1.0 | |
project --topLevelPackage org.neo4j.imdb | |
graph setup --provider NEO4J --databaseLocation target/imdb | |
graph entity --class ~.model.Movie | |
field string title | |
field number --fieldName year --type java.lang.Integer --permitReservedWords --primitive | |
graph entity --class ~.model.Actor |
This file contains hidden or 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
private static final RelationshipType SUB_DIR = DynamicRelationshipType.withName("SUB_DIR"); | |
public void storePath(String path) { | |
Node dir = graphDb.getReferenceNode(); | |
for (String name : path.split(File.separator)) { | |
dir = obtainSubDir(dir, name); | |
} | |
} | |
This file contains hidden or 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
package org.neo4j.performance.wiki; | |
/** | |
* @author mh | |
* @since 18.07.11 | |
*/ | |
import org.apache.commons.io.FileUtils; | |
import org.neo4j.graphdb.Node; | |
import org.neo4j.graphdb.Relationship; |
This file contains hidden or 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
start year = node:time(year='2011') | |
match year -[m:MONTH]-> month <-[:OCCURRED]-data | |
where m.month => 1 and m.month <= 11 | |
return data | |
month could also be the relationship-type instead of :MONTH and filter on that: | |
start year = node:time(year='2011') | |
match year -[m]-> month <-[:OCCURRED]-data |
This file contains hidden or 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
Process: Event Center [22627] | |
Path: /Users/mh/Library/Application Support/WebEx Folder/1126/Event Center.app/Contents/MacOS/Event Center | |
Identifier: com.webex.eventcenter | |
Version: ??? (12.27.23.0) | |
Code Type: X86 (Native) | |
Parent Process: Google Chrome Helper EH [22518] | |
Date/Time: 2012-07-23 21:20:01.200 +0100 | |
OS Version: Mac OS X 10.6.8 (10K549) | |
Report Version: 6 |
OlderNewer