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
{ | |
"_id": "global-order", | |
"type": "pipe", | |
"source": { | |
"type": "merge", | |
"datasets": ["airplane-source as", "ticket-source ts"], | |
"equality": [ | |
["eq", "as.airplane-source:flightNumber", "ts.ticket-source:flightNumber"] | |
], | |
"identity": "first", |
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
var builder = new Builder<PlaneContext>(); | |
builder.AddPlane(plane => plane.Name = "Boeng 720") | |
.AddClass(class => class.Name = "VIP") | |
.addPassenger(passenger => passenger.Name = "Bjørn Harald Vognhild-Olsen") | |
.addPassenger(passenger => passenger.Name = "John Doe") | |
.AddClass(class => class.Name = "Economy") | |
.addPassenger(passenger => passenger.Name = "Robert") | |
.addPassenger(passenger => passenger.Name = "Johanne"); |
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
// Clear configs | |
clearCache() { | |
this.configs = null; | |
} |
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
// Get configs from server | HTTP GET | |
getConfigs(): Observable<Config[]> { | |
// Cache it once if configs value is false | |
if (!this.configs) { | |
this.configs = Observable$.pipe( | |
// ... operators | |
publishReplay(1), | |
refCount() | |
); |
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 { from } from 'rxjs'; | |
import { map, publishReplay, refCount } from 'rxjs/operators'; | |
// Create observable that holds two values | |
const observable$ = from(['first', 'last']).pipe( | |
publishReplay(1), | |
refCount() | |
) |
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 { Injectable } from '@angular/core'; | |
import { HttpClient } from '@angular/common/http'; | |
import { Observable } from 'rxjs'; | |
import { map, publishReplay, refCount } from 'rxjs/operators'; | |
export interface Config { | |
componentType: string, | |
show: Boolean | |
} |
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
updateTable: function(value){ | |
$.ajax({ | |
type: "GET", | |
url: "service.php?p=getRows", | |
success: function(tableData){ | |
$('#adminView').html(tableData); | |
// alert(tableData); | |
} | |
}); | |
} |
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
int ledPin1 = 6; // Red LED for FlameDetector sensor | |
int ledPin2 = 7; // Blue LED for PIR sensor | |
int PIR_sensor, Flame_Detector_sensor; // Assign two integers. | |
void setup() | |
{ | |
Serial.begin(9600); // Communication rate | |
pinMode(ledPin1, OUTPUT); // Assign ledPin1 to output | |
pinMode(ledPin2, OUTPUT); // Assign ledPin2 to output | |
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
int ledPin1 = 6; // Red LED for FlameDetector sensor | |
int ledPin2 = 7; // Blue LED for PIR sensor | |
int PIR_sensor, Flame_Detector_sensor; // Assign two integers. | |
void setup() | |
{ | |
Serial.begin(9600); // Communication rate | |
pinMode(ledPin1, OUTPUT); // Assign ledPin1 to output | |
pinMode(ledPin2, OUTPUT); // Assign ledPin2 to output | |
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
int ledPin1 = 6; // led red | |
int ledPin2 = 7; // blue | |
int Flame_Detector_Sensor; | |
int PIR_sensor; | |
void setup() | |
{ | |
Serial.begin(9600); // Communication rate |
NewerOlder