Install 'TSLint' plugin
Run this command:
npm install -g tslint typescript
var token = Number(new Date()); | |
window["optimizely"] = window["optimizely"] || []; | |
window["optimizely"].push({ | |
type: "addListener", | |
filter: { | |
type: "lifecycle", | |
name: "pageDeactivated" | |
}, | |
token: token, | |
// Add the pageActivated function as a handler. |
//# Introduction | |
//The following is a generalized architecture based on the Elm architecture | |
// and the many subsequent derivations of it. | |
//The essential idea of the Elm architecture is that a User Interface has a | |
// 'uni-directional' data flow, which means data flows in a single directions. | |
//Here's a simple example: | |
// Button Click Event -> Handle Event -> Make Http Call -> Update State -> Update View | |
//Events occur which causes the system('services') to react to them. The system | |
// then sends commands to the state of the system to transition from 'State A' to 'State B'. |
//# Introduction | |
//The following is a generalized architecture based on the Elm architecture | |
// and the many subsequent derivations of it. | |
//The essential idea of the Elm architecture is that a User Interface has a | |
// 'uni-directional' data flow, which means data flows in a single directions. | |
//Here's a simple example: | |
// Button Click Event -> Handle Event -> Make Http Call -> Update State -> Update View | |
//Events occur which causes the system('services') to react to them. The system | |
// then sends commands to the state of the system to transition from 'State A' to 'State B'. |
buildFeaturePreview(vehicle: IVehicle): string { | |
let mpg = this.shouldShowMpg(vehicle) ? `${vehicle.MPGCity} / ${vehicle.MPGHighway} MPG` : null; | |
let features = vehicle.HighlightedFeatures.map(feature => feature.description); | |
return [mpg, | |
...features] | |
.filter(isDefinedAndNotNull) | |
.join(', ') | |
'...'; | |
} |
import Data.Traversable | |
main = | |
traverse print (genAll 'J') | |
-- [_,_,A,_,_] | |
-- [_,B,_,B,_] | |
-- [C,_,_,_,C] | |
-- [_,B,_,B,_] | |
-- [_,_,A,_,_] |
let map = (f, o) => { | |
//o must be an object | |
let keys = Object.keys(o); | |
let ret = {}; | |
for (let i = 0; i <= keys.length - 1; i++) { | |
let key = keys[i]; | |
let val = o[key]; | |
ret[key] = f(val, key); | |
} | |
return ret; |
Download `cabal-install-2.2.0.0-x86_64-apple-darwin-sierra.tar.gz` | |
Extract | |
Run: | |
Gregs-MacBook-Pro:downloads huck$ ./cabal --version | |
cabal-install version 2.2.0.0 | |
compiled using version 2.2.0.1 of the Cabal library | |
Gregs-MacBook-Pro:downloads huck$ ./cabal install Cabal cabal-install | |
Warning: Parsing the index cache failed (Unknown encoding for constructor). | |
Trying to regenerate the index cache... |
//Local Declaration | |
Func<string> returnsString = () => ""; | |
Func<int, int> takesIntReturnsInt = i => i * 2; | |
//Class-Level Declaration | |
//Generic Params |
{-# OPTIONS_GHC -fwarn-incomplete-patterns -Werror #-} | |
-- Show | |
-- p1 = | |
-- ... | |
-- method(f,f) | |
-- ... | |
-- p2 = | |
-- ... |