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
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); | |
} |
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 json | |
points = [] | |
for i in range(0,50): | |
points.append((i,i,'username: '+str(i))) | |
print json.dumps(points) |
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
<?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>"; | |
} | |
/* |
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
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 |
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 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 |
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
<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> |
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
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) |
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
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) |
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
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): |
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
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=[]): |