This file contains hidden or 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 {Set, Map} from 'immutable'; | |
| import {Action, Reducer} from "@ngrx/store"; | |
| import {Type} from "@angular/core"; | |
| type TypeToken = Type<any>; | |
| export interface StatefulModule<T> { | |
| ngModule: Type<T>; | |
| reducer<TState>(state: TState, action: Action<any>): TState; |
This file contains hidden or 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
| /** | |
| * The Actions observable can now be typechecked. | |
| */ | |
| export class Actions<T> extends Observable<Action<T>> { | |
| constructor(@Inject(Dispatcher) source: Observable<Action<T>>) { | |
| super(); | |
| this.source = source; | |
| } |
This file contains hidden or 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
| @Component({ | |
| selector: 'map-options-form' | |
| template: ` | |
| <input type="number" [ngModel]="options.zoom" (ngModelChange)="valueChanged({zoom: $event})"> | |
| <latlng-input [ngModel]="options.position" (ngModelChange)="valueChanged({position: $event})"> | |
| </latlng-input> | |
| <button type="submit" (click)="commit.emit(this.options)"> | |
| ` |
This file contains hidden or 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
| service UserService { | |
| rpc createUser(CreateUserRequest) returns CreateUserResponse; | |
| rpc queryUser(QueryUserRequest) returns QueryUserResponse; | |
| rpc deleteUser(DeleteUserRequest) returns DeleteUserResponse; | |
| } | |
| message User { | |
| optional String username = 1; |
This file contains hidden or 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
| library alt_groupby; | |
| import 'package:quiver/collections.dart'; | |
| Multimap groupBy(Iterable iterable, {key(var element)}) => | |
| new _GroupMap(iterable, key); | |
| typedef K _KeyFunc<K>(V value); | |
| class _GroupMap<K,V> implements Multimap<K,V> { |
This file contains hidden or 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
| class _BreakSentinel { | |
| const _BreakSentinel(); | |
| } | |
| const _BreakSentinel yieldBreak = const _BreakSentinel(); | |
| /** | |
| * Create a lazy iterable from the results of the function `f`. | |
| * | |
| * Each time the generator is iterated, the function will be called |
This file contains hidden or 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
| Iterable<String> overlappingChunks(String str, Iterable<int> chunks) { | |
| Iterable<int> runes = str.runes; | |
| int startPos = 0; | |
| Iterable<int> overlap; | |
| StringBuffer sbuf = new StringBuffer(); | |
| String nextChunk(int endPos) { | |
| sbuf.clear(); | |
| if (startPos != 0) { | |
| overlap.forEach(sbuf.writeCharCode); |
This file contains hidden or 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
| /** | |
| * Useful utility functions for dealing with iterators, which have not been exposed | |
| * via the `'dart:collection`' interface. | |
| */ | |
| library itertools; | |
| import 'lazy.dart'; | |
| //An id function |
This file contains hidden or 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
| .transformable { | |
| font-size: 24pt; | |
| text-align: center; | |
| margin-top: 140px; | |
| display:block; | |
| } | |
| .sample_text_rotated { | |
| -webkit-transform: rotate(90deg); | |
| } |