Create and initialize your a directory for your Express application.
$ mkdir node-knex-demo
$ cd node-knex-demo
$ npm init| Make student reports: https://repl.it/@SamKhaled/Make-student-reports-drill | |
| Enroll in summer school: https://repl.it/@SamKhaled/Enroll-in-summer-school-drill | |
| Find by id: https://repl.it/@SamKhaled/find-by-id-drill | |
| Validate object keys: https://repl.it/@SamKhaled/validate-object-keys-drill |
| link to commented code: https://repl.it/@SamKhaled/most-frequent-word-analyzer-challenge-1 | |
| Requirements: | |
| ============ | |
| In this challenge, you'll practice grokking (that is, understanding) code written by someone other than yourself. | |
| Working as a developer, much of your time will be spent working on existing code, and being able to read code | |
| written by someone else and quickly figure out what it's doing is a core skill to develop. | |
| For this challenge, we provide a function called mostFrequentWord. | |
| This function takes a single argument, text, which is a body of text |
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: |
| [ | |
| { | |
| "name": "Hydrogen", | |
| "abbr": "JZ", | |
| "number": 1, | |
| "group": [ | |
| "diatomic", | |
| "nonmetal" | |
| ] | |
| }, |