Close

Programming

How to update all node.js dependencies

The newest version may not always work with a project if it depends on early or specific versions. Use caution following these instructions and be ready to edit or restore your project. Updating node project dependencies Find all updates With the command prompt at the folder of your project check for current versions npm outdated […]

Read More

One-line create 2D Matrix in Javascript

The one-line code is: a = Array(5).fill(0).map(x => Array(10).fill(0)) “a” can be created with let, var, or const as needed. Array(5) creates an Array with 5 items. .fill(0) fills the 5 items with 0 .map will iterate through each of the 5 items. In this case, the .map function is taking an arrow function x […]

Read More

Visualizing a BlockChain supply chain

We start with 4 companies Each company has their own database Transactions occur between the companies. Differences can occur between the databases. Blockchain introduces a different design. A single database – the blockchain. Each company has a copy of the same blockchain. The former separate databases are now one blockchain.    

Read More