Assume we have the following project structures
Project name. This could be anything. for example sample
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
import "js/web.jsx"; | |
class Util { | |
static function image2Canvas(image : HTMLImageElement) : HTMLCanvasElement { | |
var document = dom.window.document; | |
var canvas = document.createElement("canvas") as HTMLCanvasElement; | |
canvas.width = image.width; | |
canvas.height = image.height; | |
var ctx = canvas.getContext("2d") as CanvasRenderingContext2D; | |
ctx.drawImage(image, 0, 0); |
#!/bin/bash | |
# | |
# PostgreSQL Backup Script Ver 1.0 | |
# http://autopgsqlbackup.frozenpc.net | |
# Copyright (c) 2005 Aaron Axelsen <axelseaa@amadmax.com> | |
# | |
# This script is based of the AutoMySQLBackup Script Ver 2.2 | |
# It can be found at http://sourceforge.net/projects/automysqlbackup/ | |
# | |
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9 |
//First make placeholders for results as globals | |
results = {} | |
processes = {} | |
//Now Spawn Processes within code you need, where index is an identifier | |
spawn_list[index] = spawn(/*file here*/) | |
processes[index] = spawn_list[index].pid | |
results[processes[index]] = {} | |
results[processes[index]]['index'] = index //funny looking but important | |
results[processes[index]]['stdout'] = "" |
function reopenTransportOnHupSignal(fileTransport) { | |
process.on('SIGHUP', function() { | |
var fullname = path.join(fileTransport.dirname, fileTransport._getFile(false)); | |
function reopen() { | |
if (fileTransport._stream) { | |
fileTransport._stream.end(); | |
fileTransport._stream.destroySoon(); | |
} |
Author: Josef Jezek
# Install Inkscape on Ubuntu
sudo apt-get install inkscape
dbfpy
: http://sourceforge.net/projects/dbfpy/files/latest/download?source=filessudo python setup.py install
To convert DBF file to CSV:
./dbf2csv database.dbf
Country | Alpha-2 code | Alpha-3 code | Numeric code | Latitude (average) | Longitude (average) | |
---|---|---|---|---|---|---|
Afghanistan | AF | AFG | 4 | 33 | 65 | |
Åland Islands | AX | ALA | 248 | 60.116667 | 19.9 | |
Albania | AL | ALB | 8 | 41 | 20 | |
Algeria | DZ | DZA | 12 | 28 | 3 | |
American Samoa | AS | ASM | 16 | -14.3333 | -170 | |
Andorra | AD | AND | 20 | 42.5 | 1.6 | |
Angola | AO | AGO | 24 | -12.5 | 18.5 | |
Anguilla | AI | AIA | 660 | 18.25 | -63.1667 | |
Antarctica | AQ | ATA | 10 | -90 | 0 |
[{ "Note": "The first two digits (ranging from 10–43) correspond to the province, while the last two digits correspond either to the city/delivery zone (range 01–50) or to the district/delivery zone (range 51–99). Afghanistan Postal code lookup", "Country": "Afghanistan", "ISO": "AF", "Format": "NNNN", "Regex": "^\\d{4}$" }, { "Note": "With Finland, first two numbers are 22.", "Country": "Åland Islands", "ISO": "AX", "Format": "NNNNN", "Regex": "^\\d{5}$" }, { "Note": "Introduced in 2006, gradually implemented throughout 2007.", "Country": "Albania", "ISO": "AL", "Format": "NNNN", "Regex": "^\\d{4}$" }, { "Note": "First two as in ISO 3166-2:DZ", "Country": "Algeria", "ISO": "DZ", "Format": "NNNNN", "Regex": "^\\d{5}$" }, { "Note": "U.S. ZIP codes (range 96799)", "Country": "American Samoa", "ISO": "AS", "Format": "NNNNN (optionally NNNNN-NNNN or NNNNN-NNNNNN)", "Regex": "^\\d{5}(-{1}\\d{4,6})$" }, { "Note": |