Más información - Docs Oficiales
- Instalar TypeScript y tipos de Node, como dependencia de desarrollo
npm i -D typescript @types/node
- Inicializar el archivo de configuración de TypeScript ( Se puede configurar al gusto)
Más información - Docs Oficiales
npm i -D typescript @types/node
# Script to generate a new block every minute | |
# Put this script at the root of your unpacked folder | |
#!/bin/bash | |
echo "Generating a block every minute. Press [CTRL+C] to stop.." | |
address=`./bin/bitcoin-cli getnewaddress` | |
while : | |
do |
In this series of pages, I will discuss project reactor and reactive programming from basic concepts to reactor internal implementation details. This discussion is based on the official reference documentation, the java-doc, talks by maintainers of reactor e.g. at the spring I/O and other distributed material, and should summarise and connect all this information. It should complement the official reference documentation and java-doc. Although the name says "from zero to hero", basic knowledge about the library is advised to fully benefit from it.
As a short disclaimer, I am a professional software engineer with some years of experience in using reactor, but not a maintainer or creator of the library. Information and knowledge in this post are based on the official documentation and talks, but I cannot exclude misconceptions on my side.
import numpy as np | |
import cv2 | |
import glob | |
# Define the chess board rows and columns | |
CHECKERBOARD = (6,9) | |
subpix_criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.1) | |
calibration_flags = cv2.fisheye.CALIB_RECOMPUTE_EXTRINSIC + cv2.fisheye.CALIB_CHECK_COND + cv2.fisheye.CALIB_FIX_SKEW | |
objp = np.zeros((1, CHECKERBOARD[0]*CHECKERBOARD[1], 3), np.float32) | |
objp[0,:,:2] = np.mgrid[0:CHECKERBOARD[0], 0:CHECKERBOARD[1]].T.reshape(-1, 2) |
/** | |
* USERS | |
* Note: This table contains user data. Users should only be able to view and update their own data. | |
* Some data is synced back and forth to `auth.users` as described below. | |
* | |
* `full_name`: synced in both directions | |
* `email`: synced from user metadata to profile only | |
* `avatar_url`: synced from user metadata to profile only | |
* `terms_accepted_at`: synced from profile to user metadata only | |
*/ |
#!/bin/bash | |
# | |
# Backup a Postgresql database into a daily file. | |
# | |
BACKUP_DIR=/pg_backup | |
DAYS_TO_KEEP=14 | |
FILE_SUFFIX=_pg_backup.sql | |
DATABASE= | |
USER=postgres |
import { useSyncExternalStore } from "react"; | |
// For more on the useSyncExternalStore hook, see https://react.dev/reference/react/useSyncExternalStore | |
// The code is almost identical to the source code of zustand, without types and some features stripped out. | |
// Check the links to see the references in the source code. | |
// The links are referencing the v5 of the library. If you plan on reading the source code yourself v5 is the best way to start. | |
// The current v4 version contains lot of deprecated code and extra stuff that makes it hard to reason about if you're new to this. | |
// https://github.com/pmndrs/zustand/blob/fe47d3e6c6671dbfb9856fda52cb5a3a855d97a6/src/vanilla.ts#L57-L94 | |
function createStore(createState) { |