By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
| ;(function(){ | |
| function hash(str) { | |
| // Source: http://stackoverflow.com/a/7616484/502126 | |
| var hash = 0, i, chr, len | |
| if (str.length === 0) return hash | |
| for (i = 0, len = str.length; i < len; i++) { | |
| chr = str.charCodeAt(i) | |
| hash = ((hash << 5) - hash) + chr | |
| hash |= 0 | |
| } |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
Stream audio to any Sonos component via AirPlay using a Raspberry Pi (Model B, Raspbian Jessie) and the following software:
| #!/bin/bash | |
| if [[ -z $(grep dockerhost /etc/hosts) ]] | |
| then | |
| echo `/sbin/ip route|awk '/default/ { print $3 }'` dockerhost >> /etc/hosts | |
| fi |
| import React from 'react'; | |
| const MIN_SCALE = 1; | |
| const MAX_SCALE = 4; | |
| const SETTLE_RANGE = 0.001; | |
| const ADDITIONAL_LIMIT = 0.2; | |
| const DOUBLE_TAP_THRESHOLD = 300; | |
| const ANIMATION_SPEED = 0.04; | |
| const RESET_ANIMATION_SPEED = 0.08; | |
| const INITIAL_X = 0; |
| stats: { | |
| colors: true, | |
| hash: true, | |
| timings: true, | |
| chunks: true, | |
| chunkModules: false, | |
| children: false, | |
| modules: false, | |
| reasons: false, | |
| warnings: true, |
Facades are a programming pattern in which a simpler public interface is provided to mask a composition of internal, more-complex, component usages.
When writing a lot of NgRx code - as many enterprises do - developers quickly accumulate large collections of actions and selectors classes. These classes are used to dispatch and query [respectively] the NgRx Store.
Using a Facade - to wrap and blackbox NgRx - simplifies accessing and modifying your NgRx state by masking internal all interactions with the Store, actions, reducers, selectors, and effects.
For more introduction, see Better State Management with Ngrx Facades
| #!/usr/bin/env bash | |
| set -e | |
| IFS='|' | |
| help_output () { | |
| echo "usage: amplify-push <--environment|-e <name>> <--simple|-s>" | |
| echo " --environment The name of the Amplify environment to use" | |
| echo " --simple Optional simple flag auto-includes stack info from env cache" | |
| exit 1 | |
| } |
| { | |
| "A": "Agilent Technologies, Inc.", | |
| "AA": "Alcoa Corporation", | |
| "AABB": "Asia Broadband, Inc.", | |
| "AAC": "Ares Acquisition Corporation", | |
| "AACAF": "AAC Technologies Holdings Inc.", | |
| "AACAY": "AAC Technologies Holdings Inc.", | |
| "AACG": "ATA Creativity Global", | |
| "AACQ": "Origin Materials Inc", | |
| "AAGFF": "Aftermath Silver Ltd.", |