This file contains 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
require 'nokogiri' | |
require 'sqlite3' | |
require 'FileUtils' | |
def seconds_to_hhmm (total_seconds) | |
# From http://stackoverflow.com/a/9916691 | |
seconds = total_seconds % 60 | |
minutes = (total_seconds / 60) % 60 | |
hours = total_seconds / (60 * 60) |
This file contains 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
require 'nokogiri' | |
require 'open-uri' | |
downloaded_session_ids = [] | |
Dir.glob("#{Dir.pwd}/videos/*.mp4").each do|f| | |
session_id_matches = f.match(/videos\/([0-9]{3})_/) | |
if session_id_matches.nil? | |
print "No session_id matches for #{f}\n" | |
exit | |
end |
This file contains 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
(function(exports) { | |
/* | |
* tile.stamen.js v1.2.1 | |
*/ | |
var SUBDOMAINS = " a. b. c. d.".split(" "), | |
MAKE_PROVIDER = function(layer, type, minZoom, maxZoom) { | |
return { | |
"url": ["http://{S}tile.stamen.com/", layer, "/{Z}/{X}/{Y}.", type].join(""), |
This file contains 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
float phi = (latitude * 3600 - 169028.66) / 10000; | |
float lambda = (longitude * 3600 - 26782.5) / 10000; | |
float easting = 600072.37 + 211455.93 * lambda - 10938.51 * lambda * phi - 0.36 * lambda * pow(phi, 2) - 44.54 * pow(lambda, 3); | |
float northing = 200147.07 + 308807.95 * phi + 3745.25 * pow(lambda, 2) + 76.63 * pow(phi, 2) - 194.56 * phi * pow(lambda, 2) + 119.79 * pow(phi, 3); | |
int x = (int) easting; | |
int y = (int) northing; |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
require 'open-uri' | |
require 'nokogiri' | |
require 'cgi' | |
require 'json' | |
require 'digest/sha1' | |
def url_resource_get(url, cache_file) | |
if File.file? cache_file | |
content = IO.read(cache_file) | |
else |
This file contains 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
# File ~/.tm_properties | |
[ *.* ] | |
softTabs = true |
This file contains 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
diff --git a/client/examples/editor.html b/client/examples/editor.html | |
index ba75604..9fd1a13 100644 | |
--- a/client/examples/editor.html | |
+++ b/client/examples/editor.html | |
@@ -17,7 +17,7 @@ | |
map.setCenter(new OpenLayers.LonLat(10, 50), 5); | |
editor = new OpenLayers.Editor(map, { | |
- activeControls: ['Navigation', 'SnappingSettings', 'Separator', 'DeleteFeature', 'SelectFeature', 'Separator', 'DrawHole'], | |
+ activeControls: ['Navigation', 'SnappingSettings', 'Separator', 'DeleteFeature', 'SelectFeature', 'Separator', 'DrawHole', 'EditorPanel'], |
NewerOlder