Skip to content

Instantly share code, notes, and snippets.

View yask123's full-sized avatar
👨‍💻

Yask Srivastava yask123

👨‍💻
View GitHub Profile
block: function(color) {
return new THREE.Mesh(
new THREE.BoxGeometry(0.5, 0.5, 10),
new THREE.MeshNormalMaterial()
);
}
// random data
var data = {
color: '#FF0000',
size: 20,
lat: 52.3747158,
lon: 4.8986231,
size: 20
};
// add a block in realtime after getting data
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;
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,
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,
appbase.searchStream({
type: 'people71',
body: {
"from" : 0, "size" : 1000,
query: {
match_all: {}
}
}
}).on('data', function(response) {
console.log('test');
$.ajax({
url : 'http://www.telize.com/geoip',
type: 'GET',
success : handleData
});
function handleData(data)
{
document.getElementById('cont').innerHTML = data.country;
$('.error').fadeIn(400).delay(3000).fadeOut(400);
jsonObject.latitude=data.latitude;
appbase.index({
type: 'people71',
body: jsonObject
}).on('data', function(response) {
console.log(response);
}).on('error', function(error) {
console.log(error);
});
appbase.index({
type: 'people71',
body: jsonObject
}).on('data', function(response) {
console.log(response);
}).on('error', function(error) {
console.log(error);
});
$.ajax({
url : 'http://www.telize.com/geoip',
type: 'GET',
success : handleData
});
function handleData(data)
{
document.getElementById('cont').innerHTML = data.country;
$('.error').fadeIn(400).delay(3000).fadeOut(400);
jsonObject.latitude=data.latitude;