What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-10-21 19:22:05
nestjs role guard
import { Injectable, CanActivate, ExecutionContext } from '@nestjs/common'; import { Observable } from 'rxjs'; @Injectable() export class RolesGuard implements CanActivate { canActivate( context: ExecutionContext, ): boolean | Promise<boolean&... Add solution -
-
Other 2021-10-18 06:41:04
autocomplete in java jtextfeild
package test; import np.com.ngopal.control.AutoFillTextBox; import javafx.application.Application; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.scene.Scene; import javafx.scene.control.Label; impo... Add solution -
Javascript 2021-10-13 11:48:05
angular load json file with httpclient
import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; @Injectable() export class AppSettingsService { constructor(private http: HttpClient) { this.getJSON().subscribe(data => { console.log(data)... Add solution -
Other 2021-10-10 13:37:04
understanding Observable.create(
import { Observable } from "rxjs/Observable"; var observable = Observable.create(function subscribe(observer) { observer.next('Hey guys!') }) // OR var observable = Observable.create((observer:any) => { observer.next('Hey guys!') }) Add solution -
Other 2021-10-09 07:06:06
blockingSIngle vs blocking First
first() — block until the Observable emits an item, then return the first item emitted by the Observable single( ) — if the Observable completes after emitting a single item, return that item, otherwise throw an exception Add solution -
C# 2021-10-06 20:15:04
wpf nested itemscontrols
//<!--WPF: this nested ItemsControl allows for placement of items on a screen based on bound properties--> //<!--A key factor to make this work is the Content="{Binding}" statement on line 33, as this links the items to the ItemControl'... Add solution -
TypeScript 2021-10-06 05:15:02
rxjs create observable from value
// Requires RXJS 6+ // Create an observable of any Type // Ask yourself if the function creates a new observable or not // If it creates a new one then it is imported from 'rxjs' // Operators are imported from 'rxjs/operators' import { of } from 'rxjs'; ... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5