Permalink
Browse files

Litt neo-endringer. Småplukkfiks.

  • Loading branch information...
1 parent 34b72d6 commit 27132f73e12314d0c4a1961c2ed43589d7e261b3 @heim committed Nov 5, 2013
View
@@ -4,6 +4,8 @@ var http = require('http')
, io = require('socket.io')
, pty = require('pty.js')
, terminal = require('term.js')
+ , neo4j = require('neo4j')
+ , _ = require('underscore')
, redis = require('redis');
@@ -105,14 +107,6 @@ server.on('connection', function(socket) {
const redisClient = redis.createClient();
console.log('info', 'connected to redis server');
-/**
- * Sockets
- */
-
-io = io.listen(server, {
- log: false
-});
-
redisClient.subscribe('realtime');
redisClient.on('message', function(channel, message) {
@@ -122,6 +116,27 @@ redisClient.on('message', function(channel, message) {
}
});
+/*
+ * neo4j
+ */
+
+//var graphdb = new neo4j.GraphDatabase('http://localhost:7474');
+//
+//var query = 'match (char)-[:APPEARED_IN]-(episode) where char.character = "Madame Vastra" return char,episode';
+//graphdb.query(query, {}, function(err, results) {
+// _.each(results, console.log);
+//});
+
+
+
+/**
+ * Sockets
+ */
+
+io = io.listen(server, {
+ log: false
+});
+
io.sockets.on('connection', function(sock) {
socket = sock;
socket.on('redis-term', function(data) {
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
@@ -81,3 +81,35 @@ nov 05, 2013 8:18:40 PM com.sun.jersey.server.impl.application.WebApplicationImp
INFO: Initiating Jersey application, version 'Jersey: 1.9 09/02/2011 11:17 AM'
nov 05, 2013 8:18:41 PM org.neo4j.server.logging.Logger log
INFO: Remote interface ready and available at [http://localhost:7474/]
+nov 05, 2013 9:58:14 PM org.neo4j.server.logging.Logger log
+INFO: Neo4j Server shutdown initiated by request
+nov 05, 2013 9:58:22 PM org.neo4j.server.logging.Logger log
+INFO: Setting startup timeout to: 120000ms based on -1
+nov 05, 2013 9:58:23 PM org.neo4j.server.logging.Logger log
+INFO: Successfully started database
+nov 05, 2013 9:58:24 PM org.neo4j.server.logging.Logger log
+INFO: Starting HTTP on port :7474 with 40 threads available
+nov 05, 2013 9:58:24 PM org.neo4j.server.logging.Logger log
+INFO: Enabling HTTPS on port :7473
+nov 05, 2013 9:58:24 PM org.neo4j.server.logging.Logger log
+INFO: Mounted discovery module at [/]
+nov 05, 2013 9:58:24 PM org.neo4j.server.logging.Logger log
+INFO: Mounted REST API at [/db/data/]
+nov 05, 2013 9:58:24 PM org.neo4j.server.logging.Logger log
+INFO: Mounted management API at [/db/manage/]
+nov 05, 2013 9:58:24 PM org.neo4j.server.logging.Logger log
+INFO: Mounted webadmin at [/webadmin]
+nov 05, 2013 9:58:24 PM org.neo4j.server.logging.Logger log
+INFO: Mounted Neo4j Browser at [/browser]
+nov 05, 2013 9:58:25 PM org.neo4j.server.logging.Logger log
+INFO: Mounting static content at [/webadmin] from [webadmin-html]
+nov 05, 2013 9:58:25 PM org.neo4j.server.logging.Logger log
+INFO: Mounting static content at [/browser] from [browser]
+nov 05, 2013 9:58:25 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
+INFO: Initiating Jersey application, version 'Jersey: 1.9 09/02/2011 11:17 AM'
+nov 05, 2013 9:58:25 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
+INFO: Initiating Jersey application, version 'Jersey: 1.9 09/02/2011 11:17 AM'
+nov 05, 2013 9:58:26 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
+INFO: Initiating Jersey application, version 'Jersey: 1.9 09/02/2011 11:17 AM'
+nov 05, 2013 9:58:26 PM org.neo4j.server.logging.Logger log
+INFO: Remote interface ready and available at [http://localhost:7474/]
View
Binary file not shown.
View
@@ -3,6 +3,8 @@
, "version" : "0.0.1"
, "dependencies": {
"redis": "*"
+ , "underscore": "*"
+ , "neo4j": "*"
, "express": "*"
, "socket.io": "*"
, "term.js": "*"
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -0,0 +1,11 @@
+<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title> Google Image Result for </title><script>(function(){
+window.google={kEI:"sGR5UoH8EKPv4gSxoIDgBA",getEI:function(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return b||google.kEI},https:function(){return"https:"==window.location.protocol},kEXPI:"31215,146147,4000116,4006293,4006727,4007231,4007661,4007714,4007830,4008067,4008133,4008142,4008698,4008725,4009033,4009565,4009663,4009664,4009665,4009666,4010045,4010061,4010074,4010179,4010806,4010899,4010938,4011063,4011125,4011228,4011256,4011258,4011334,4011376,4011518,4011522,4011524,4011525,4011529,4011550,4011551,4011556,4011559,4011616,4011619,4011683,4011709,4011733,4011851,4011863,4011872,4011911,4011971,4012001,4012003,4012011,4012118,4012120,4012145,4012147,4012302,4012306,4012318,4012543,4012680",kCSI:{e:"31215,146147,4000116,4006293,4006727,4007231,4007661,4007714,4007830,4008067,4008133,4008142,4008698,4008725,4009033,4009565,4009663,4009664,4009665,4009666,4010045,4010061,4010074,4010179,4010806,4010899,4010938,4011063,4011125,4011228,4011256,4011258,4011334,4011376,4011518,4011522,4011524,4011525,4011529,4011550,4011551,4011556,4011559,4011616,4011619,4011683,4011709,4011733,4011851,4011863,4011872,4011911,4011971,4012001,4012003,4012011,4012118,4012120,4012145,4012147,4012302,4012306,4012318,4012543,4012680",ei:"sGR5UoH8EKPv4gSxoIDgBA"},authuser:0,ml:function(){},kHL:"en",time:function(){return(new Date).getTime()},log:function(a,b,c,l,k){var d=new Image,f=google.lc,e=google.li,g="",h="gen_204";k&&(h=
+k);d.onerror=d.onload=d.onabort=function(){delete f[e]};f[e]=d;c||-1!=b.search("&ei=")||(g="&ei="+google.getEI(l));c=c||"/"+h+"?atyp=i&ct="+a+"&cad="+b+g+"&zx="+google.time();
+a=/^http:/i;a.test(c)&&google.https()?(google.ml(Error("GLMM"),!1,{src:c}),delete f[e]):(d.src=c,google.li=e+1)},lc:[],li:0,Toolbelt:{},y:{},x:function(a,
+b){google.y[a.id]=[a,b];return!1},load:function(a,b,c){google.x({id:a+m++},function(){google.load(a,b,c)})}};var m=0;})();
+</script><script>(function(){'use strict';var c=this,f=Date.now||function(){return+new Date};var m=function(d,k){return function(a){a||(a=window.event);return k.call(d,a)}},t="undefined"!=typeof navigator&&/Macintosh/.test(navigator.userAgent),u="undefined"!=typeof navigator&&!/Opera/.test(navigator.userAgent)&&/WebKit/.test(navigator.userAgent),v="undefined"!=typeof navigator&&!/Opera|WebKit/.test(navigator.userAgent)&&/Gecko/.test(navigator.product),x=v?"keypress":"keydown";var y=function(){this.g=[];this.a=[];this.e={};this.d=null;this.c=[]},z="undefined"!=typeof navigator&&/iPhone|iPad|iPod/.test(navigator.userAgent),A=/\s*;\s*/,B=function(d,k){return function(a){var b;e:{b=k;if("click"==b&&(t&&a.metaKey||!t&&a.ctrlKey||2==a.which||null==a.which&&4==a.button||a.shiftKey))b="clickmod";else{var e=a.which||a.keyCode||a.key,g;if(g=a.type==x){g=a.srcElement||a.target;var n=g.tagName.toUpperCase();g=!("TEXTAREA"==n||"BUTTON"==n||"INPUT"==n||"A"==n||g.isContentEditable)&&!(a.ctrlKey||a.shiftKey||a.altKey||a.metaKey)&&(13==e||32==e||u&&3==e)}g&&
+(b="clickkey")}for(g=e=a.srcElement||a.target;g&&g!=this;g=g.parentNode){var n=g,l;var h=n;l=b;var p=h.__jsaction;if(!p){p={};h.__jsaction=p;var r=null;"getAttribute"in h&&(r=h.getAttribute("jsaction"));if(h=r)for(var h=h.split(A),r=0,P=h?h.length:0;r<P;r++){var q=h[r];if(q){var w=q.indexOf(":"),H=-1!=w,Q=H?q.substr(0,w).replace(/^\s+/,"").replace(/\s+$/,""):"click",q=H?q.substr(w+1).replace(/^\s+/,"").replace(/\s+$/,""):q;p[Q]=q}}}h=void 0;"clickkey"==l?l="click":"click"==l&&(h=p.click||p.clickonly);l=(h=h||p[l])?{h:l,action:h}:void 0;if(l){b={eventType:l.h,event:a,targetElement:e,action:l.action,actionElement:n};break e}}b=null}if(b)if("A"==b.actionElement.tagName&&"click"==k&&(a.preventDefault?a.preventDefault():a.returnValue=!1),d.d)d.d(b);else{var s;if((e=c.document)&&!e.createEvent&&e.createEventObject)try{s=e.createEventObject(a)}catch(U){s=a}else s=a;v&&(s.timeStamp=f());b.event=s;d.c.push(b)}}},C=function(d,k){return function(a){var b=d,e=k,g=!1;"mouseenter"==b?b="mouseover":"mouseleave"==b&&(b="mouseout");if(a.addEventListener){if("focus"==b||"blur"==b)g=!0;a.addEventListener(b,e,g)}else a.attachEvent&&("focus"==b?b="focusin":"blur"==b&&(b="focusout"),e=m(a,e),a.attachEvent("on"+b,e));return{h:b,i:e,capture:g}}},D=function(d,k){if(!d.e.hasOwnProperty(k)&&"mouseenter"!=k&&"mouseleave"!=k){var a=B(d,k),b=C(k,a);d.e[k]=a;d.g.push(b);for(a=0;a<d.a.length;++a){var e=d.a[a];e.c.push(b.call(null,e.a))}"click"==k&&D(d,x)}};y.prototype.i=function(d){return this.e[d]};var F=function(){this.a=E;this.c=[]};var G=new y,E=window.document.documentElement,I;e:{for(var J=0;J<G.a.length;J++){for(var K=G.a[J].a,L=E;K!=L&&L.parentNode;)L=L.parentNode;if(K==L){I=!0;break e}}I=!1}if(!I){z&&(E.style.cursor="pointer");for(var M=new F,N=0;N<G.g.length;++N)M.c.push(G.g[N].call(null,M.a));G.a.push(M)}D(G,"click");D(G,"focus");D(G,"focusin");D(G,"blur");D(G,"focusout");D(G,"change");D(G,"input");D(G,"keydown");D(G,"keypress");D(G,"mousedown");D(G,"mouseout");D(G,"mouseover");D(G,"mouseup");D(G,"touchstart");D(G,"touchmove");D(G,"touchend");D(G,"speech");var O=function(d){G.d=d;G.c&&(0<G.c.length&&d(G.c),G.c=null)},R=["google","jsad"],S=c;R[0]in S||!S.execScript||S.execScript("var "+R[0]);for(var T;R.length&&(T=R.shift());)R.length||void 0===O?S=S[T]?S[T]:S[T]={}:S[T]=O;}).call(window);</script></head><body><noscript><meta HTTP-EQUIV="refresh" content="0;url=http://www.google.no/imgres?imgurl=&imgrefurl=http://www.neotechnology.com/category/neo4j/page/2/&h=0&w=0&sz=1&tbnid=znSD_TQVNR1NgM&tbnh=165&tbnw=306&zoom=1&docid=NYaPXLuFHv0eoM&ei=qmR5Ut7tMdL14QTk3IGAAQ&ved=0CAEQsCU&gbv=1&sei=sGR5UoH8EKPv4gSxoIDgBA"><style><!--
+body{display:none}
+--></style>
+</noscript><style>body{font-size:100%}div.a{border-top:1px solid #bbb;border-bottom:1px solid #bbb;background:#f2f2f2;margin-top:1em;width:100%}div.b{padding:.5em 0;margin-left:10px}div.c{margin-top:35px;margin-left:35px}</style><script>function go_back() {window.history.go(-1);return false;}function ctu() {var link=document&&document.referrer;var esc_link ="";if (link) {var e=(window&&window.encodeURIComponent)?encodeURIComponent:escape;esc_link=e(link);}new Image().src="/url?sa=T&url="+esc_link+"&oi=stb_fbk&ct=originlink";return false;}</script><div class=a><div class=b><font size=+1><b>Redirect Notice</b></font></div></div><div class=c>&nbsp;The previous page is sending you to <a href="/url?q=http://www.neotechnology.com/category/neo4j/page/2/&ust=1383689144317109&usg=AFQjCNHzKpDmRHbhf_zNlwM0Kf-ugN9HLQ">http://www.neotechnology.com/category/neo4j/page/2/</a>.<br><br>&nbsp;If you do not want to visit that page, you can <a href="#" onclick="return go_back();" onmousedown="ctu();">return to the previous page</a>.<br><br><br></div><div id=xjsd></div><div id=xjsi data-jiis="bp"><script>if(google.y)google.y.first=[];(function(){function b(a){window.setTimeout(function(){var c=document.createElement("script");c.src=a;document.getElementById("xjsd").appendChild(c)},0)}google.dljp=function(a){google.xjsu=a;b(a)};google.dlj=b;})();
+if(!google.xjs){window._=window._||{};window._._DumpException=function(e){throw e};if(google.timers&&google.timers.load.t){google.timers.load.t.xjsls=new Date().getTime();}google.dljp('/xjs/_/js/k\x3dxjs.il.en_US.Sb9kY6pKs10.O/m\x3dcdos,irc,pcc,csi/am\x3dXg/rt\x3dj/d\x3d1/sv\x3d1/rs\x3dAItRSTNptDBBKtkBBAreQY_BW95iTE35Dw');google.xjs=1;}google.pmc={"cdos":{"bih":635,"biw":1280,"dima":"b","dpr":"2","sdpr":1},"gf":{"pid":196,"si":true},"irc":{"bbc":false,"css":false,"dlog":0,"fwd":false,"ifs":false,"ilrp":false,"inl":false,"m":false,"onw":false,"por":false,"psig":"AFQjCNGNGcMaB2z-dSlT8iPWgHSPtlynpg\u0026ust=1383773744316798","rel":true,"swi":false,"t":false},"pcc":{},"csi":{"acsi":true,"cbu":"/gen_204","csbu":"/gen_204"},"wzXhlg":{},"/1S6iw":{}};google.y.first.push(function(){google.loadAll(['gf']);if(google.med){google.med('init');google.initHistory();google.med('history');}google.History&&google.History.initialize('/imgres?imgurl\x3d\x26amp;imgrefurl\x3dhttp%3A%2F%2Fwww.neotechnology.com%2Fcategory%2Fneo4j%2Fpage%2F2%2F\x26amp;h\x3d0\x26amp;w\x3d0\x26amp;sz\x3d1\x26amp;tbnid\x3dznSD_TQVNR1NgM\x26amp;tbnh\x3d165\x26amp;tbnw\x3d306\x26amp;zoom\x3d1\x26amp;docid\x3dNYaPXLuFHv0eoM\x26amp;ei\x3dqmR5Ut7tMdL14QTk3IGAAQ\x26amp;ved\x3d0CAEQsCU');google.hs&&google.hs.init&&google.hs.init()});if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);}</script></div></body><script></script></html>
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -469,11 +469,11 @@
</div>
--
<div class="col">
- .circle.yellow.centered[Redis]
+ .circle.lightbrown.centered[neo4j]
</div>
--
<div class="col">
- .circle.lightbrown.centered[neo4j]
+ .circle.yellow.centered[Redis]
</div>
</div>
--
@@ -483,11 +483,11 @@
</div>
--
<div class="col">
- # <span> Key-value +++</span>
+ # <span>Grafdatabase</span>
</div>
--
<div class="col">
- # <span>Grafdatabase</span>
+ # <span> Key-value +++</span>
</div>
</div>
???
@@ -519,6 +519,8 @@
???
+- Mongo er en dokumentdatabase
+- Hva er en dokumentdatabase
- MongoDB er en skjemaløs dokumentdatabase
- Hva betyr skjemaløs?
- Jo, det betyr at i en hver tabell (eller collection) så kan man putte inn dokumenter (rader) med forskjellige felter.
@@ -626,20 +628,21 @@
</div>
<div class="col">
<h3><span>Aggregation</span></h3>
- <pre>
- <a href="#" class="mongo-cmd">
-db.zips.aggregate(
-{ $group :
- { _id : "$state",
- totalPop : { $sum : "$pop" } } },
- { $match : {totalPop : { $gte : 10000000 } } } )</a><br />
- </pre>
+ <a href="#" class="mongo-cmd">db.zips.aggregate( { $group : { _id : "$state", totalPop : { $sum : "$pop" } } }, { $match : {totalPop : { $gte : 10000000 } } } )</a><br />
+</div>
+---
+class: pushed white
+<span class="img">![](img/neo.png)</span>
+
+# <span>From sweden with love</span>
+<div>
+ <a href="//localhost:7474/browser/" target="_blank">localhost:7474/browser</a>
</div>
---
name: graph
-class: round
+class: round white
-et bilde av noen grafer (kanskje neo-video)
+![](img/graph.png)
???
hva er grafdatabaser
@@ -652,10 +655,13 @@
Time series data
Product catalogue
Web analytics
-Scientific computing (especially bioinformatics)
-Indexing your slow RDBMS
-And much more!
+- Tegn på tavla:
+ - GBG -tog- Oslo (tar fire timer)
+ - Oslo
+ - By
+ Amundsen - er i - Oslo
+ - Andreas - liker - amundsen
---
name: Redis
class: round
@@ -727,6 +733,7 @@
<a href="#" class="redis-cmd">zrevrank players michael</a><br />
<a href="#" class="redis-cmd">zincrby players 6 trevor</a><br />
<a href="#" class="redis-cmd">zrevrange players 0 -1</a><br />
+ <a href="#" class="redis-cmd">zrevrange players 0 -1 WITHSCORES</a><br />
</div>

0 comments on commit 27132f7

Please sign in to comment.