See here instead https://github.com/vsavkin/ngselectors
Say we have a store defined as follows:
export class Store {
Say we have a store defined as follows:
export class Store {
// Type definitions for Feathers | |
// Project: http://feathersjs.com/ | |
// Definitions by: Jack Guy <http://thatguyjackguy.com> | |
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | |
import { Application, Handler, ErrorRequestHandler } from 'express'; | |
type HandlerArgument = Handler | Handler[]; | |
export = Feathers; |
import { print as printGraphQL } from 'graphql-tag/printer'; | |
import RecursiveIterator from 'recursive-iterator'; | |
import objectPath from 'object-path'; | |
export function createNetworkInterface(url) { | |
return { | |
query(request) { | |
const formData = new FormData(); | |
// search for File objects on the request and set it as formData |
function maybeFilter(array, predicate) { | |
var newArray; | |
array.forEach((item, i) => { | |
if (predicate(item)) { | |
if (newArray) { | |
newArray.push(item) | |
} | |
} else if (!newArray) { | |
newArray = array.slice(0, i) | |
} |
import { EditorState, Modifier, Entity, SelectionState } from 'draft-js' | |
import linkifyIt from 'linkify-it' | |
import tlds from 'tlds' | |
const linkify = linkifyIt() | |
linkify.tlds(tlds) | |
const linkifyEditorState = (editorState) => { | |
const contentState = editorState.getCurrentContent() |
""" The problem description: | |
Given a Data Structure having first n integers and next n chars. | |
A = i1 i2 i3 ... iN c1 c2 c3 ... cN.Write an in-place algorithm | |
to rearrange the elements of the array ass A = i1 c1 i2 c2 ... in cn | |
""" | |
def swap(arr, ind1, ind2): |
import * as gulp from 'gulp'; | |
import {gulpPrerender} from '@angular/universal'; | |
import {App} from './app'; | |
gulp.task("prerender", () => { | |
return gulp.src(['index.html']) | |
.pipe(gulpPrerender({ | |
directives: [App] | |
})); | |
}); |
// App | |
import { Component } from '@angular/core'; | |
@Component({ | |
selector: 'app', | |
template: '<span>{{ sayHello() }}</span>', | |
}) | |
export class App { | |
public name: string = 'John'; |
用例子讲解 RxJS 5 的 Operators 。