(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
import {createReducer} from '@ngrx/store'; | |
import {on} from "@ngrx/store"; | |
import produce, {Draft} from "immer"; | |
export const initialUserState: IUserState = { | |
knownUsers: [user1, user2], | |
selectedUser: null, | |
scenes: null | |
}; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
@Effect({dispatch: false}) | |
entityCreationSuccess$: Observable<Action> = this.actions$.pipe( | |
ofType(UserActions.CREATE_USER_SUCCESS, PostActions.CREATE_POST_SUCCESS), | |
tap(action => { | |
this.router.navigate(['../'], {relativeTo: this.route}) | |
}) | |
); |
{ | |
"globals" : | |
{ | |
"alwaysShowTabs" : true, | |
"defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", | |
"initialCols" : 120, | |
"initialRows" : 30, | |
"keybindings" : | |
[ | |
{ |
provider "aws" { | |
version = "~> 2.0" | |
region = "ap-southeast-1" | |
shared_credentials_file = "~/.aws/credentials" | |
} | |
resource "aws_lightsail_static_ip_attachment" "drone-ci" { | |
static_ip_name = "${aws_lightsail_static_ip.drone-ci-ip.name}" | |
instance_name = "${aws_lightsail_instance.drone-ci.name}" | |
} |
{ | |
"captionColor":"white", | |
"captionSize":100, | |
"backgroundCaptionColor":"black", | |
"backgroundCaptionTransparent":50, | |
"captionPosition":"bottom", | |
"captionStatus":true | |
} |
import * as PDF from 'html-pdf'; | |
import * as fs from 'fs'; | |
import * as mustache from 'mustache'; | |
async createPdf(teacherId, year, res) { | |
const report = await this.getByTeacher(teacherId, year); | |
const teacher = await this.personService.findByObjectId(teacherId); | |
const major = await this.majorService.getByTeacher(teacherId); | |
let majorName = major.name; | |
if (major){ |
#!/bin/bash | |
DATE=`date +%Y.%m.%d` | |
FILENAME="db.$DATE" | |
BACKUP_FOLDER="backup" | |
MAXFILE=4 | |
if [ ! -d "$BACKUP_FOLDER" ]; then | |
mkdir -p $BACKUP_FOLDER | |
fi | |
cd $BACKUP_FOLDER |
SELECT | |
Person.personId, | |
Person.personCode, | |
Person.fName, | |
Person.lName, | |
PersonT.fName2, | |
PersonT.lName2, | |
PersonT.birthDate, | |
rs_academic_position.acp_name_th, | |
PersonT.emailAddr AS email, |
(defn print-dot [n] | |
(loop [i n] | |
(when (> i 0) | |
(print "*") | |
(recur (- i 1))))) | |
(defn print-space [n] | |
(loop [i n] | |
(when (> i 0) | |
(print " ") |