api.tiles.mapbox.com/v1/
api.tiles.mapbox.com/v1/albums.json
api.tiles.mapbox.com/v1/albums.jsonp
var https = require('https'); | |
var body = ''; | |
https.get('https://cloud-images.ubuntu.com/locator/ec2/releasesTable', function(res) { | |
res.on('data', function(chunk) { body += chunk; }); | |
res.on('end', finish); | |
}); | |
function finish() { | |
// Bad JSON -- has trailing comma. |
var fnvplus = require('fnv-plus'); | |
function collisionRate(bits) { | |
var hashes = {}; | |
var texts = 0; | |
var collisions = []; | |
var sample = 1e6; | |
while (texts < sample) { | |
var text = Math.random().toString(36); | |
var hash = fnvplus.hash(text,bits).hex(); |
var fnvplus = require('fnv-plus'); | |
var murmur = require('murmur'); | |
function collisionRate(bits) { | |
var hashes = {}; | |
var texts = 0; | |
var collisions = []; | |
var sample = 1e6; | |
console.time(bits + ' bits'); | |
while (texts < sample) { |
var usedCoordinates = [ { x: 10, y: 5 }, { x: 10, y: 6 }, { x: 10, y: 7 } ]; | |
var coordinates = [ { x: 10, y: 7 }, { x: 10, y: 8 } ]; | |
// Should be [ { x: 10, y: 7 } ] | |
var intersection = _.select(coordinates, function(element){ | |
return _.any(usedCoordinates, function(otherElement){ | |
return _.isEqual(element, otherElement); | |
}); | |
}); |
devseed@devseed:~/tilemill/templates$ ls | |
App._ ExportOptions._ Project._ | |
Asset._ ExportRow._ ProjectFormatForm._ | |
Assets._ Exports._ ProjectInteractivityForm._ | |
ColorSwatch._ FileLayerForm._ ProjectLegendForm._ | |
ColorSwatches._ FontPicker._ ProjectPopupInteractivity._ | |
Datasource._ Layer._ Projects._ | |
DatasourceRows._ Layers._ ProjectSettingsForm._ | |
DatasourceTooltip._ Libraries._ Reference._ | |
Drawer._ LibrariesPopup._ ReferenceProperty._ |
set ROOT=c:\Program Files (x86)\TileMill | |
set PROJ_LIB=%ROOT%\data\proj\nad | |
set GDAL_DATA=%ROOT%\data\gdal\data | |
set PATH=%PATH%;%ROOT%\node_modules\zipfile\lib | |
set PATH=%PATH%;%ROOT%\node_modules\mapnik\lib\mapnik\lib | |
node index.js |