As a beginner you should be proficient in the following:
- Grammar and Types
- Basic syntax & comments
- Declarations
- Variable scope
- Variable hoisting
| <Source> | |
| <UserOptions> | |
| <UserOption Name="ShowTrayIcon">1</UserOption> | |
| <UserOption Name="ShowVolumeSettings">1</UserOption> | |
| <UserOption Name="BeepKeyboardSettings">0</UserOption> | |
| <UserOption Name="ShowKeyboardPopupSettings">1</UserOption> | |
| <UserOption Name="ShowKeyboardTraySettings">1</UserOption> | |
| <UserOption Name="ShowKeyboardSettings">1</UserOption> | |
| <UserOption Name="ShowBatteryStatusSettings">1</UserOption> | |
| <UserOption Name="ShowKeySettings">1</UserOption> |
| /** | |
| * we are going to upload file to s3 via node js by using | |
| * aws-sdk - required | |
| * busboy - required | |
| * uuid - optional - for image renaming purpose | |
| * with this library you can upload any kind of file to s3 via node js. | |
| */ | |
| const AWS = require('aws-sdk'); | |
| const UUID = require('uuid/v4'); |
| // Some common IE shims... indexOf, startsWith, trim | |
| /* | |
| Really? IE8 Doesn't have .indexOf | |
| */ | |
| if (!Array.prototype.indexOf) { | |
| Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) { | |
| "use strict"; | |
| if (this === null) { | |
| throw new TypeError(); |
| // [B](f: (A) ⇒ [B]): [B] ; Although the types in the arrays aren't strict (: | |
| Array.prototype.flatMap = function(lambda) { | |
| return Array.prototype.concat.apply([], this.map(lambda)); | |
| }; |
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "chrome", | |
| "request": "launch", | |
| "name": "Launch Chrome against localhost", |
| 'use strict'; | |
| const authentication = require('feathers-authentication'); | |
| const jwt = require('feathers-authentication-jwt'); | |
| const local = require('feathers-authentication-local'); | |
| const oauth2 = require('feathers-authentication-oauth2'); | |
| const GithubStrategy = require('passport-github'); | |
| // Bring in the oauth-handler | |
| const makeHandler = require('./oauth-handler'); |
| // | |
| // Coin.swift | |
| // Crypto Price Tracker | |
| // | |
| // Created by Kennedy on 22/01/2018. | |
| // Copyright © 2018 Kennedy. All rights reserved. | |
| // | |
| import Foundation |
While attempting to explain JavaScript's reduce method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.
JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it much simpler to think about both the old list and the new one, what they contain, and
| #! /bin/bash | |
| cd ~ # moves to the home directory | |
| mkdir "dev" # creates a new directory | |
| cd "dev" # navigates to the newly created directory | |
| mkdir "learning-bash" | |
| cd "learning-bash" |