This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function visitAndExpression(exprNode: any): any { | |
const conditions = exprNode.expressions.map(function (expr: any) { return visitExpression(expr) }) | |
return function (it: any) { return conditions.every(function (c: any) { return c(it) }) } | |
} | |
function visitOrExpression(exprNode: any): any { | |
const conditions = exprNode.expressions.map(function (expr: any) { return visitExpression(expr) }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int doubler(int x) { | |
return 2 * x; | |
} |
Create the model:
$ cat dragonboard-model.json
{
"type": "model",
"authority-id": "$account_id",
"brand-id": "$account_id",
"series": "16",
"model": "dragonboard",
"architecture": "arm64",
A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createStore, applyMiddleware } from 'redux'; | |
import { Observable, Subject } from 'rxjs'; | |
const api = type => { | |
console.log(`calling API ${type}`); | |
return new Promise(res => setTimeout(() => res(), 500)); | |
}; | |
const actionOrder = (actions, order) => actions.every((action, index) => action.type === order[index]); | |
const actionPredicate = actions => filterableAction => actions.some(action => action === filterableAction.type); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Sometimes it's pretty easy to run ito troubles with React ES6 components. | |
Consider the following code: */ | |
class EventStub extends Component { | |
componentDidMount() { | |
window.addEventListener('resize', this.onResize.bind(this)); //notice .bind | |
} | |
componentWillUnmount() { | |
window.removeEventListener('resize', this.onResize.bind(this)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn qs [lst] | |
(let [[head & tail] lst] | |
(if (>= 1 (count lst)) | |
lst | |
(flatten [(qs (for [x tail :when (<= x head)] x)) head (qs (for [x tail :when (> x head)] x))])))) |
NOTE: the content is out-of-date. All development is moved to the https://github.com/yurydelendik/wasmception
# locations, e.g.
export WORKDIR=~/llvmwasm; mkdir -p $WORKDIR
export INSTALLDIR=$WORKDIR
- install jspm beta:
npm install -g jspm@beta
- set up your project:
jspm init
- install dependencies:
jspm install angular2 reflect-metadata zone.js es6-shim
This will create a jspm_packages
folder, and a config.js
file.
Open the config.js
file - this file manages options for the System.js loader - tweak it as appropriate
NewerOlder