Create and initialize your a directory for your Express application.
$ mkdir node-knex-demo
$ cd node-knex-demo
$ npm init
Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex
command line tool.
To learn more about migrations, check out this article on the different types of database migrations!
if ('geolocation' in navigator) { | |
console.log('Supports HTML geolocation API'); | |
(function () { | |
var onSuccess = function (location) { | |
console.log('User location', location); | |
var userLat = location.coords.latitude, | |
userLon = location .coords.longitude; | |
}, |
/** | |
* Geocode address | |
* | |
* REQUIREMENTS | |
* - Google Maps API | |
* - HTML5 Geolocation API | |
*/ | |
var geocode = function (address, onSuccess, onError) { | |
var geocoder = new google.maps.Geocoder(); | |
geocoder.geocode({ address: address }, function (results, status) { |
def ascii_deletion_distance(str1, str2): | |
from collections import defaultdict | |
histogram = defaultdict(int) | |
for ch in str1: | |
histogram[ch] += 1 | |
for ch in str2: | |
histogram[ch] += 1 | |
union = set(str1) | set(str2) | |
intersection = set(str1) & set(str2) | |
result = union - intersection |
#!/bin/sh | |
# wget --mirror --adjust-extension --page-requisites --execute robots=off --wait=30 --rand om-wait --convert-links --user-agent=Mozilla http://www.example.com | |
### V1 | |
# wget \ | |
# --recursive \ | |
# --no-clobber \ | |
# --page-requisites \ | |
# --html-extension \ |
Facebook: | |
Hey everyone! I recently created a Ruby on Rails crash course for a friend, and I thought there might be other people I know that have been interested in learning programming. | |
You can watch the video here: | |
https://www.youtube.com/watch?v=4zrHEJe8030 | |
Tag someone in the comments that you think might be interested as well. | |
Reddit: |