- First download
dbfpy
: http://sourceforge.net/projects/dbfpy/files/latest/download?source=files - Then install:
sudo python setup.py install
To convert DBF file to CSV:
./dbf2csv database.dbf
dbfpy
: http://sourceforge.net/projects/dbfpy/files/latest/download?source=filessudo python setup.py install
To convert DBF file to CSV:
./dbf2csv database.dbf
All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
Most sections are broken up into two parts:
<?php | |
// app/commands/DeployCommand.php | |
use Illuminate\Console\Command; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Input\InputArgument; | |
class DeployCommand extends Command | |
{ |
/* | |
You'll need something like this in your HTML: | |
<script src="http://d3js.org/topojson.v1.min.js"></script> | |
*/ | |
L.TopoJSON = L.GeoJSON.extend({ | |
addData: function(jsonData) { | |
if (jsonData.type === "Topology") { | |
for (key in jsonData.objects) { | |
geojson = topojson.feature(jsonData, jsonData.objects[key]); |
#!/bin/sh | |
cd ~/Downloads | |
# adding getdeb repository | |
#sudo add-apt-repository 'deb http://archive.getdeb.net/ubuntu precise-getdeb apps' | |
#sudo wget -q -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - | |
# adding classic menu repository | |
#sudo add-apt-repository ppa:diesch/testing |
Create an empty git repo or reinitialize an existing one
git init
<?php | |
/** | |
* In SimpleXML, how can I add an existing SimpleXMLElement as a child element? | |
* | |
* @link http://stackoverflow.com/q/767327/367456 | |
* @link http://eval.in/9568 | |
* @link http://3v4l.org/1sI05 | |
*/ | |
/** |
Raw CSV data is made available by Common Data Hub here:
http://www.commondatahub.com/live/geography/state_province_region/iso_3166_2_state_codes
http://www.commondatahub.com/live/geography/country/iso_3166_country_codes
The table cdh_state_codes
(see cdh-schema.sql
below) is designed to hold the raw data, which should import readily using most common database tools, or directly into MySQL via LOAD DATA, e.g.:
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE TABLE iso3166
.cdh_state_codes
;
.fc { | |
direction: ltr; | |
text-align: left; } | |
.fc table { | |
border-collapse: collapse; | |
border-spacing: 0; } | |
.fc .btn { | |
line-height: 1.2em; } | |
html .fc { |
Object.defineProperty(Date.prototype,"diff",{ | |
writable: false, configurable: false, enumerable: true, | |
/** | |
* Returns the difference between two Date objects. | |
* @param {Date} The date to compare to. | |
* @return {Object} | |
* @throws {TypeError} | |
*/ | |
value: function(date) { |