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 { Component } from '@angular/core'; | |
import { interval } from 'rxjs'; | |
@Component({ | |
template: `<div>{{ count$ | async }}</div>` | |
}) | |
export class CounterComponent { | |
count$ = interval(1000); |
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 { Component } from '@angular/core'; | |
import { Subscription, interval } from 'rxjs'; | |
@Component({ | |
template: `<div>{{ count }}</div>` | |
}) | |
export class CounterComponent implements OnDestroy, OnInit { | |
count: number; | |
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 { Component, OnDestroy, OnInit } from '@angular/core'; | |
import { Subject, interval } from 'rxjs'; | |
import { takeUntil } from 'rxjs/operators'; | |
@Component({ | |
template: ` | |
<div>{{ count }}</div> | |
<button (click)="startCounting()">Start Counting</button> | |
` | |
}) |
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 { Component, OnInit } from '@angular/core'; | |
import { Scavenger } from '@wishtack/rx-scavenger'; | |
import { interval } from 'rxjs'; | |
@Component({ | |
template: `<div>{{ count }}</div>` | |
}) | |
export class CounterComponent implements OnDestroy, OnInit { | |
count: number; |
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 { Component, OnInit } from '@angular/core'; | |
import { Scavenger } from '@wishtack/rx-scavenger'; | |
import { interval } from 'rxjs'; | |
@Component({ | |
template: `<div>{{ count }}</div>` | |
}) | |
export class CounterComponent implements OnDestroy, OnInit { | |
count: number; |
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
@Component({ | |
selector: 'wt-logo', | |
template: `<img [src]="logoUrl">` | |
}) | |
export LogoComponent { | |
logoUrl = require('!!url-loader!./logo.svg'); | |
} |
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
@Component({ | |
selector: 'wt-logo', | |
template: ` | |
<img [src]="getLogoUrl()"> | |
<button (click)="company = 'wishtack'">WISHTACK</button> | |
<button (click)="company = 'google'">GOOGLE</button> | |
` | |
}) | |
export class LogoComponent { |
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
| search * | |
| lookup user_agents http_user_agent as user_agent | |
| replace "unknown" with "" in ua_device, ua_os_major, ua_os_minor | |
| replace "Windows*" with "Windows" in ua_os_family | |
| eval user_agent=ua_os_family + " - " + ua_family | |
| regex user_agent!="(unknown|PhantomJS)" | |
| eventstats dc(address) as total | |
| stats dc(address) as count by user_agent, total | |
| eval percentage=(count * 100/total) | |
| table percentage user_agent |
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
recognition = new webkitSpeechRecognition(); | |
recognition.continuous = true; | |
recognition.lang = 'fr-FR'; | |
recognition.onresult = console.log; | |
recognition.start(); |