Skip to content

Instantly share code, notes, and snippets.

Number.prototype.pad = function (length) {
var str = this.toString();
while (str.length < length) {
str = '0' + str;
}
return str;
};
{
"type": "MultiPolygon",
"coordinates":
[
[
[ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ]
],
[
[ [100.0, 0.0], [102.0, 0.0], [102.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]
]
function build_user(username, email, password) {
var user = {};
user.name = username;
user.email = email;
user.salt = crypto.createHash('sha512').update(password).digest('hex');
user.date = new Date();
user.password_hash = hash.generate(password, { saltLength: 8, algorithm: 'sha512' });
return user;
server:
port: 1337
db:
sqlite:
filename: ':memory:'
http.js:851
throw new TypeError('first argument must be a string or Buffer');
^
TypeError: first argument must be a string or Buffer
at ServerResponse.OutgoingMessage.write (http.js:851:11)
at write (/Users/jerry/work/http-db/node_modules/levelup/node_modules/readable-stream/lib/_stream_readable.js:605:24)
at flow (/Users/jerry/work/http-db/node_modules/levelup/node_modules/readable-stream/lib/_stream_readable.js:614:7)
at ReadStream.pipeOnReadable (/Users/jerry/work/http-db/node_modules/levelup/node_modules/readable-stream/lib/_stream_readable.js:646:5)
at ReadStream.emit (events.js:92:17)
at emitReadable_ (/Users/jerry/work/http-db/node_modules/levelup/node_modules/readable-stream/lib/_stream_readable.js:430:10)
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'install' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink /usr/local/bin/node
5 verbose install where, deps [ '/Users/jerry/work/koop',
5 verbose install [ 'async',
5 verbose install 'aws-sdk',
5 verbose install 'body-parser',
5 verbose install 'config',
#!/usr/bin/env node
var wkt = require('terraformer-wkt-parser'),
arcgis = require('terraformer-arcgis-parser'),
fs = require('fs');
var argv = require('optimist')
.usage('Usage: $0 --in-format [format] --out-format [format] infile [outfile]')
.demand(['in-format','out-format'])
.check(function (argv) {
{
"type": "Polygon",
"coordinates": [ [ [ -122, 45 ], [ -123, 45 ], [ -123, 46 ], [ -122, 46 ], [ -122, 45 ] ] ]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#ifndef __QUERY_H__
#define __QUERY_H__
#include "emdb.h"
typedef enum WhereType {
and = 0,
or = 1,
equals = 2,
gt = 3,