Skip to content

Instantly share code, notes, and snippets.

map_data: function (data){
self = this;
for(var i=0; i<data.length; i++)
{
if(data[i].geo!=null)
{
lat = data[i].geo.coordinates[0];
lon = data[i].geo.coordinates[1];
self.add_marker(lat, lon, data[i].from_user);
}
import json
points = []
for i in range(0,50):
points.append((i,i,'username: '+str(i)))
print json.dumps(points)
<?PHP
#phpinfo();
$path = "/var/www/vhosts/jgaylor.net/httpdocs/mapsV3/input.py";
if(file_exists($path)){
//echo "File exists.<br>";
} else {
echo "File does not exist.<br>";
}
/*
class Point
def __init__(self,x,y):
self.x = x
self.y = y
def __str__(self):
return self.x + ", " + self.y
def __unicode__(self):
return self.x + ", " + self.y
if self.point.x < pt.x:
#we know we need to be in the south
if self.point.y < pt.y:
#recurse SW
pass
else:
#recurse SW
pass
else:
#we know we need to be in the north
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<title>Display dataset test</title>
</head>
<body>
</body>
from point_class import Point
from quad_tree_class import QuadTree
import pprint
import sys
pt1 = Point(0,0)
points = []
for i in range(-3,2):
for j in range(-3,2):
tmp = Point(i,j)
points.append(tmp)
from classes import Point, QuadTree
import sys
pt1 = Point(0,0)
points = []
for i in range(-2,1):
for j in range(-2,1):
tmp = Point(i,j)
points.append(tmp)
class Point:
def __init__(self, x, y):
self.x = x
self.y = y
def __str__(self):
return str(self.x) + ", " + str(self.y)
def __lt__(self, other):
class QuadTree:
def __init__(self,pt):
self.SE = None
self.SW = None
self.NE = None
self.NW = None
self.point = pt
def inorder(self, r=[]):