In the examples below we show how to implement Linked List Data Structure in Javascript class Node { constructor(data, next=null) this.data = data; this.next = next; } } class LinkedList { constructor(data) { this.head = null; } /////////// insertStart(data) { this.head = new Node(data, this.head); } /////////// size() { let cnt = 0; let node […]
Category Archives: Data
Latest tutorials and tips for data such as databases
For importing or ingesting GIS shapefile to a postgresql database we can use shp2pgsql command, example: shp2pgsql -s 4326 -c -D -I myshapefile dbtable | \ psql -d dbname -h localhost -p 5432 -U dbuser In example above we convert or import the shapefile (myshapefile) to dbtable in dbname database with a dbuser. […]
In this tutorial, we show how to backup or dump and how to restore a postgresql database. For making a backup you can use pg_dump command like below: pg_dump -Fc -h localhost mydatabase -U myuser -n myschema > test.pgdump in the above, change hostname (localhost), database name (mydatabase), user (myuser) and schema […]