(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.
| # SPDX-License-Identifier: MIT | |
| # Copyright (c) 2021 David Lechner <[email protected]> | |
| # A program for LEGO MINDSTORMS Robot Inventor - Gelo | |
| # Developed using MINDSTORMS App v1.3.4 (10.1.0), hub firmware v1.2.01.0103 | |
| # Building instructions: https://www.lego.com/cdn/product-assets/product.bi.additional.main.pdf/51515_Gelo.pdf | |
| # Hub API: https://lego.github.io/MINDSTORMS-Robot-Inventor-hub-API/ |
| version: '2' | |
| services: | |
| db: | |
| image: postgres | |
| redis: | |
| image: redis |
| private static void checkTreesForMissingDefinitions(Map<String, String> glossary) { | |
| FinancialTrees.getTrees(false).values().stream() // Map<IndustryTemplate, Map<FinancialGroup, FinancialTree>> | |
| .map(Map::values) // Stream<Collection<FinancialTree>> | |
| .flatMap(Collection::stream) // Stream<FinancialTree> | |
| .map(FinancialTree::getAllChildren) // Stream<List<FinancialTreeNode>> Get nodes fron tree as a List<Node> | |
| .flatMap(List::stream) // Stream<FinancialTreeNode> | |
| .map(FinancialTreeNode::getField) // Stream<FinField> | |
| .distinct() // remove duplicated fields | |
| .filter(Objects::nonNull) // remove null objects |
| #!/bin/bash -e | |
| # wait-for-postgres.sh | |
| # Adapted from https://docs.docker.com/compose/startup-order/ | |
| # Expects the necessary PG* variables. | |
| until psql -c '\l'; do | |
| echo >&2 "$(date +%Y%m%dt%H%M%S) Postgres is unavailable - sleeping" | |
| sleep 1 | |
| done |
(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.
Moved, see VIM Cheatsheet