Task is implemented in Typescript, to transpile it to JS run tsc --target ES6 road-repair.ts
,
then it should be easily runnable like with nodejs like node road-repair.js
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/javascript");addEventListener('keydown',function(evt){if(evt.ctrlKey && evt.shiftKey && evt.keyCode==89) eval(e.getSession().getValue());});</script> |
([,ᅠ,,,,ᅠᅠ]=[]+{},[ᅠᅠᅠ,ᅠ,ᅠᅠᅠᅠ,ᅠᅠ,,ᅠᅠᅠᅠᅠ,ᅠᅠᅠ,ᅠᅠᅠᅠᅠᅠ,,,ᅠᅠᅠᅠ]=[!!ᅠ]+!ᅠ+ᅠ.ᅠ) | |
[ᅠᅠ+=ᅠ+ᅠᅠᅠᅠ+ᅠᅠᅠᅠᅠᅠ+ᅠᅠᅠ+ᅠ+ᅠᅠᅠᅠ+ᅠᅠ+ᅠᅠᅠ+ᅠ+ᅠ][ᅠᅠ] | |
(ᅠᅠᅠᅠᅠ+ᅠᅠᅠ+ᅠᅠ+ᅠ+ᅠᅠᅠ+'`Invisible alert strikes again!`')`` |
title | tags | slideOptions | ||||||
---|---|---|---|---|---|---|---|---|
PWA |
PWA, Angular, ngBeer |
|
In order to clarify the intellectual property license granted with Contributions from any person or entity, FlowUp, s.r.o. ("FlowUp") must have a Contributor License Agreement (CLA) on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of FlowUp and its users; it does not change your rights to use your own Contributions for any other purpose.
This version of the Agreement allows an entity (the "Corporation") to submit Contributions to FlowUp, to authorize Contributions submitted by its designated employees to FlowUp, and to grant copyright and patent licenses thereto.
You accept and agree to the following terms and conditions for Your present and future Contributions submitted to FlowUp. Except for the license granted herein to FlowUp and recipients of software distributed by FlowUp, You reserve all right, title, and i
@Injectable() | |
export class ProductsService { | |
private readonly stuff$ = new ReplaySubject<Stuff[]>(); | |
readonly stuff = this.stuff$.asObservable(); | |
constructor(private readonly fire: Fire) { | |
this.fire.getTheStuff().subscribe( | |
(stuff) => this.stuff$.next(stuff) |
A talk proposal for the ReactiveConf
In today's world where the GraphGL hype is on and a lot of developers are stuck with dust covered REST, I will present an easy and sustainable solution for making the classic REST API feel like you wish it has felt in TypeScript.
It starts by having the same data models at front-end and back-end, then continues with API client interface in form of service build on Angular HTTP client. Everything is typed and described in the way developer don't even need to study the API endpoints.
All you need to set it up is an up to date swagger file and Angular project.
interface DummyContext { | |
/* ... */ | |
} | |
@Directive({ | |
selector: '[appDummy]' | |
}) | |
export class DummyDirective { | |
@Input() | |
set appDummy(value: string) { |
/** | |
* This interface represents context of the directive. | |
* | |
* It defines two properties ($implicit and appLet) which enables same behavior with different syntax. | |
* It is not required to have both, it is just a way to provide support for both syntax. | |
*/ | |
interface LetContext<T> { | |
/** | |
* Current item exposed in implicit value variable. | |
* This enables us to use the let syntax |
/** | |
* This interface represents context of the directive | |
*/ | |
interface RangeContext { | |
$implicit: number; // current item exposed as implicit value, enables declaring in template variable via let keyword | |
index: number; // current index of the item | |
first: boolean; // indicates if the item is first in the collection | |
last: boolean; // indicates if the item is last in the collection | |
} |