(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.
| // Install npm i pg-mem --save-dev | |
| import { DataSource, Repository } from 'typeorm'; | |
| import { newDb, DataType } from 'pg-mem'; | |
| import { v4 } from 'uuid'; | |
| const setupDataSource = async () => { | |
| const db = newDb({ | |
| autoCreateForeignKeyIndices: true, | |
| }); |
| /* | |
| Useful for HackerRank problems. | |
| */ | |
| function main (numNodes, edges) { | |
| const parent = []; | |
| const rank = []; | |
| function makeSet (x) { |
(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.
| var videoNodesArray = document.getElementsByClassName('pl-video-title-link'); | |
| videoNodesArray = [].slice.call(videoNodesArray); | |
| var ssYoutubeUrlArray = videoNodesArray.map(function(videoNode) { | |
| var httpStr = videoNode.href.replace('https', 'http'); | |
| httpStr = httpStr.replace('you', 'ssyou'); | |
| console.log(httpStr); | |
| return httpStr; | |
| }) | |
| ssYoutubeUrlArray.forEach(function(ssYoutubeUrl) { | |
| window.open(ssYoutubeUrl); |