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
rm CognitiveModels/FlightBooking.cs | |
rm CognitiveModels/FlightBooking.json | |
rm CognitiveModels/FlightBookingEx.cs | |
rm Dialogs/BookingDialog.cs | |
rm Dialogs/MainDialog.cs | |
rm BookingDetails.cs | |
rm FlightBookingRecognizer.cs |
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
const cat = new FormGroup<{ | |
name: FormControl<string>, | |
lives: FormControl<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
// extract from @dylhunn PR #43834 https://github.com/angular/angular/pull/43834 | |
/** | |
* Tokenize splits a string literal S by a delimeter D. | |
*/ | |
type Tokenize<S extends string, D extends string> = /*\n*/ | |
string extends S ? string[] : /* S must be a literal */ /*\n*/ | |
S extends `${infer T}${D}${infer U}` ? [T, ...Tokenize<U, D>] : /* Recursive case */ /*\n*/ | |
[S] /* Base case */ /*\n*/ | |
; |
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
export function bindingUpdated(lView: LView, bindingIndex: number, value: any): boolean { | |
ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.'); | |
ngDevMode && | |
assertLessThan(bindingIndex, lView.length, `Slot should have been initialized to NO_CHANGE`); | |
const oldValue = lView[bindingIndex]; | |
if (Object.is(oldValue, value)) { | |
return false; | |
} else { | |
if (ngDevMode && getCheckNoChangesMode()) { |
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
http { | |
..... | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
server_name qldcoviddata.com; | |
location / { | |
proxy_pass /app/qldcoviddata/dist; | |
} |
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
IsConnected() | |
{ | |
const duration = moment.duration(moment(new Date()).diff(moment(this.lastConnectedTime, this.DATE_TIME_FORMAT))); | |
return duration.asSeconds() < 60; | |
} |
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
private async addNewUserSession(userName: string, allUserSessions: UserSession[]){ | |
const allSessions = [...allUserSessions??[], new UserSession(userName)]; | |
await this.cacheManager.set( | |
this.key, | |
allSessions, | |
{ ttl: this.expired_time }, | |
); | |
} |
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 { webSocket, WebSocketSubject } from 'rxjs/webSocket'; | |
import { Socket } from 'ngx-socket-io'; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class WebSocketService { |
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
@SubscribeMessage('patientJoin') | |
public async joinRoom(client: Socket, userName: string) { | |
client.join('waitingRoom'); | |
this.userSessionCache.addOrUpdate(userName); | |
const activeUsers = await this.userSessionCache.getAllActive(); | |
this.server.emit('patientList', activeUsers.map(x=> x.userName)); | |
} |
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
if (ts.isTypeReferenceNode(node)) { | |
const type = typeChecker.getTypeFromTypeNode(node); | |
const typeName = typeChecker.typeToString(type); | |
if (type.isStringLiteral()) { | |
ts.addSyntheticTrailingComment( | |
node, | |
ts.SyntaxKind.SingleLineCommentTrivia, | |
typeName | |
); | |
} |