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
| appbase.searchStream({ | |
| type: 'people71', | |
| body: { | |
| "from" : 0, "size" : 1000, | |
| query: { | |
| match_all: {} | |
| } | |
| } | |
| }).on('data', function(response) { | |
| console.log('test'); |
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
| if (response.hits){ | |
| console.log(response.hits.hits.length); | |
| var l = response.hits.hits.length; | |
| document.getElementById('count').innerHTML = response.hits.hits.length +1; | |
| for(var i=0;i<l;i++) | |
| { | |
| var data = { | |
| color: '#2962FF', | |
| lat: response.hits.hits[i]._source.latitude, | |
| lon: response.hits.hits[i]._source.longitude, |
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
| if (response.hits){ | |
| console.log(response.hits.hits.length); | |
| var l = response.hits.hits.length; | |
| document.getElementById('count').innerHTML = response.hits.hits.length +1; | |
| for(var i=0;i<l;i++) | |
| { | |
| var data = { | |
| color: '#2962FF', | |
| lat: response.hits.hits[i]._source.latitude, | |
| lon: response.hits.hits[i]._source.longitude, |
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
| else | |
| { | |
| $('#count').text(parseInt($('#count').html())+1); | |
| console.log("New user"); | |
| document.getElementById('cont').innerHTML = response._source.country; | |
| $('.error').fadeIn(400).delay(3000).fadeOut(400); | |
| console.log(response._source); | |
| var time = response._source.h+":"+response._source.m+":"+response._source.s; |
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
| // random data | |
| var data = { | |
| color: '#FF0000', | |
| size: 20, | |
| lat: 52.3747158, | |
| lon: 4.8986231, | |
| size: 20 | |
| }; | |
| // add a block in realtime after getting 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
| block: function(color) { | |
| return new THREE.Mesh( | |
| new THREE.BoxGeometry(0.5, 0.5, 10), | |
| new THREE.MeshNormalMaterial() | |
| ); | |
| } | |
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
| #include <iostream> | |
| #include <vector> | |
| #include <map> | |
| using namespace std; | |
| struct Edge{ | |
| char vertex1; | |
| char vertex2; | |
| int weight; |
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
| #include <iostream> | |
| #include <vector> | |
| #include <map> | |
| using namespace std; | |
| struct Edge{ | |
| char vertex1; | |
| char vertex2; | |
| int weight; |
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
| #include <iostream> | |
| #include <vector> | |
| #include <map> | |
| using namespace std; | |
| struct Edge{ | |
| char vertex1; | |
| char vertex2; | |
| int weight; |
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
| yasksrivastava at Yasks-MacBook-Pro in ~/learnyoureact | |
| $ node | |
| > function calc(){ | |
| ... this.a = 5; | |
| ... } | |
| undefined | |
| > calc() | |
| undefined | |
| > calc | |
| [Function: calc] |