Autosave: 2023-02-10 18:22:04
This commit is contained in:
		
							parent
							
								
									46f770d929
								
							
						
					
					
						commit
						ab1203f3ec
					
				
					 91 changed files with 124 additions and 110 deletions
				
			
		| 
						 | 
					@ -1,9 +1,9 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Computer Architecture
 | 
					  - Computer Architecture
 | 
				
			||||||
tags: [CPU, processors]
 | 
					tags: [CPU]
 | 
				
			||||||
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## The Little Man Computer
 | 
					## The Little Man Computer
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// TODO: Improve notes and learn how to use
 | 
					// TODO: Improve notes and learn how to use
 | 
				
			||||||
| 
						 | 
					@ -16,19 +16,19 @@ On the left is the instruction set. Each number constitutes and execution routin
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Each row of the RAM has a denary address, 1 through to 99. Each address can hold three digits.
 | 
					Each row of the RAM has a denary address, 1 through to 99. Each address can hold three digits.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* So the instruction `560` would mean *load the number at address 60.*
 | 
					- So the instruction `560` would mean _load the number at address 60._
 | 
				
			||||||
* The instruction `340` would mean *store a datum at address 40*
 | 
					- The instruction `340` would mean _store a datum at address 40_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Working through a basic computation
 | 
					### Working through a basic computation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
We are going to add two numbers together as a basic example.
 | 
					We are going to add two numbers together as a basic example.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
1. First we need to place the two numbers in RAM we are going to use `5` and `3`
 | 
					1. First we need to place the two numbers in RAM we are going to use `5` and `3`
 | 
				
			||||||
   * At address `60` we will put the number `5` and at address `61` we will put the number `3`
 | 
					   - At address `60` we will put the number `5` and at address `61` we will put the number `3`
 | 
				
			||||||
   * We are going to start at address `0` in the top left of the RAM grid
 | 
					   - We are going to start at address `0` in the top left of the RAM grid
 | 
				
			||||||
1. The first instruction will be *load address 60* which in the assembly will be `560` . We put this in address `0`, our starting point.
 | 
					1. The first instruction will be _load address 60_ which in the assembly will be `560` . We put this in address `0`, our starting point.
 | 
				
			||||||
1. This first instruction is now stored in the accumulator.
 | 
					1. This first instruction is now stored in the accumulator.
 | 
				
			||||||
1. Now we want to *add this number (in the accumulator) to the number in address 61*
 | 
					1. Now we want to _add this number (in the accumulator) to the number in address 61_
 | 
				
			||||||
1. This second instruction is `161` . We write this in address `1`
 | 
					1. This second instruction is `161` . We write this in address `1`
 | 
				
			||||||
1. Finally we want to store the output of the calculation in the RAM, let's say at address `62`
 | 
					1. Finally we want to store the output of the calculation in the RAM, let's say at address `62`
 | 
				
			||||||
1. So we store the command `362` at address `2`
 | 
					1. So we store the command `362` at address `2`
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Computer Architecture
 | 
					  - Computer Architecture
 | 
				
			||||||
  - Hardware
 | 
					  - Hardware
 | 
				
			||||||
tags: [motherboard, chipset]
 | 
					tags: [motherboard]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Chipset and controllers
 | 
					# Chipset and controllers
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Computer Architecture
 | 
					  - Computer Architecture
 | 
				
			||||||
  - Hardware
 | 
					  - Hardware
 | 
				
			||||||
tags: [HDL, nand-to-tetris]
 | 
					tags: [nand-to-tetris]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Hardware Description Language
 | 
					# Hardware Description Language
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Computer Architecture
 | 
					  - Computer Architecture
 | 
				
			||||||
  - Hardware
 | 
					  - Hardware
 | 
				
			||||||
tags: [abstraction, modules, nand-to-tetris]
 | 
					tags: [nand-to-tetris]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Hardware abstraction and modularity
 | 
					# Hardware abstraction and modularity
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Computer Architecture
 | 
					  - Computer Architecture
 | 
				
			||||||
  - Hardware
 | 
					  - Hardware
 | 
				
			||||||
tags: [HDL, nand-to-tetris]
 | 
					tags: [nand-to-tetris]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Hardware simulation
 | 
					# Hardware simulation
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,6 +3,7 @@ categories:
 | 
				
			||||||
  - DSA
 | 
					  - DSA
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - algorithms
 | 
					  - algorithms
 | 
				
			||||||
 | 
					  - data-structures
 | 
				
			||||||
  - recursion
 | 
					  - recursion
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Databases
 | 
					  - Databases
 | 
				
			||||||
tags: [relational-database]
 | 
					tags: [relational-databases]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ACID principle
 | 
					# ACID principle
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Databases
 | 
					  - Databases
 | 
				
			||||||
tags: [mongodb, node-js, mongoose]
 | 
					tags: [mongo-db, mongoose, node-js]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Validating Mongoose schemas
 | 
					# Validating Mongoose schemas
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Databases
 | 
					  - Databases
 | 
				
			||||||
  - Networks
 | 
					  - Networks
 | 
				
			||||||
tags: [http]
 | 
					tags: []
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## GET
 | 
					## GET
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Databases
 | 
					  - Databases
 | 
				
			||||||
tags: [apis, REST]
 | 
					tags: [APIs, REST]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# RESTful APIs
 | 
					# RESTful APIs
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Databases
 | 
					  - Databases
 | 
				
			||||||
tags: [relational-database]
 | 
					tags: [relational-databases]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Relational database architecture
 | 
					# Relational database architecture
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Databases
 | 
					  - Databases
 | 
				
			||||||
  - Programming Languages
 | 
					  - Programming Languages
 | 
				
			||||||
tags: [SQL, relational-database]
 | 
					tags: [SQL, relational-databases]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Autoincrement and `SERIAL`
 | 
					# Autoincrement and `SERIAL`
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Databases
 | 
					  - Databases
 | 
				
			||||||
  - Programming Languages
 | 
					  - Programming Languages
 | 
				
			||||||
tags: [SQL, relational-database]
 | 
					tags: [SQL, relational-databases]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Create an SQL table
 | 
					# Create an SQL table
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Databases
 | 
					  - Databases
 | 
				
			||||||
  - Programming Languages
 | 
					  - Programming Languages
 | 
				
			||||||
tags: [SQL, relational-database]
 | 
					tags: [SQL, relational-databases]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Data types in MySQL
 | 
					# Data types in MySQL
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Databases
 | 
					  - Databases
 | 
				
			||||||
  - Programming Languages
 | 
					  - Programming Languages
 | 
				
			||||||
tags: [SQL, relational-database]
 | 
					tags: [SQL, relational-databases]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Deleting data in SQL
 | 
					# Deleting data in SQL
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Databases
 | 
					  - Databases
 | 
				
			||||||
  - Programming Languages
 | 
					  - Programming Languages
 | 
				
			||||||
tags: [SQL, relational-database]
 | 
					tags: [SQL, relational-databases]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Creating views with foreign keys
 | 
					# Creating views with foreign keys
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Databases
 | 
					  - Databases
 | 
				
			||||||
  - Programming Languages
 | 
					  - Programming Languages
 | 
				
			||||||
tags: [SQL, relational-database]
 | 
					tags: [SQL, relational-databases]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Insert data into table with SQL `INSERT` statement
 | 
					# Insert data into table with SQL `INSERT` statement
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Databases
 | 
					  - Databases
 | 
				
			||||||
  - Programming Languages
 | 
					  - Programming Languages
 | 
				
			||||||
tags: [SQL, relational-database, regex]
 | 
					tags: [SQL, relational-databases, regex]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Regular expressions in SQL
 | 
					# Regular expressions in SQL
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Databases
 | 
					  - Databases
 | 
				
			||||||
  - Programming Languages
 | 
					  - Programming Languages
 | 
				
			||||||
tags: [SQL, relational-database]
 | 
					tags: [SQL, relational-databases]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Retrieve data from table with SQL `SELECT` statement
 | 
					# Retrieve data from table with SQL `SELECT` statement
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Databases
 | 
					  - Databases
 | 
				
			||||||
  - Programming Languages
 | 
					  - Programming Languages
 | 
				
			||||||
tags: [SQL, relational-database]
 | 
					tags: [SQL, relational-databases]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Updating an SQL table
 | 
					# Updating an SQL table
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Databases
 | 
					  - Databases
 | 
				
			||||||
  - Programming Languages
 | 
					  - Programming Languages
 | 
				
			||||||
tags: [SQL, relational-database]
 | 
					tags: [SQL, relational-databases]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Update existing data with the SQL `UPDATE` command
 | 
					# Update existing data with the SQL `UPDATE` command
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Databases
 | 
					  - Databases
 | 
				
			||||||
  - Programming Languages
 | 
					  - Programming Languages
 | 
				
			||||||
tags: [SQL, relational-database]
 | 
					tags: [SQL, relational-databases]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Useful operators in SQL
 | 
					# Useful operators in SQL
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Databases
 | 
					  - Databases
 | 
				
			||||||
  - Programming Languages
 | 
					  - Programming Languages
 | 
				
			||||||
tags: [SQL, relational-database]
 | 
					tags: [SQL, relational-databases]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Wildcards in SQL
 | 
					# Wildcards in SQL
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
title: Analogue and digital
 | 
					title: Analogue and digital
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Hardware
 | 
					  - Hardware
 | 
				
			||||||
tags: [analogue, digital]
 | 
					tags: [analogue]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Analogue and digital
 | 
					# Analogue and digital
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Electronics
 | 
					  - Electronics
 | 
				
			||||||
tags: [electricity, electrical-circuits]
 | 
					tags: [electricity, circuits]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Circuits
 | 
					# Circuits
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Electronics
 | 
					  - Electronics
 | 
				
			||||||
tags: [electricity, electrical-circuits]
 | 
					tags: [electricity, circuits]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# LEDs
 | 
					# LEDs
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
title: Text encoding
 | 
					title: Text encoding
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Computer Architecture
 | 
					  - Computer Architecture
 | 
				
			||||||
tags: [binary, binary-encoding, ascii, unicode, utf-8]
 | 
					tags: [binary, binary-encoding]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Text encoding
 | 
					# Text encoding
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,7 @@ title: Why computers use binary
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Mathematics
 | 
					  - Mathematics
 | 
				
			||||||
  - Computer Architecture
 | 
					  - Computer Architecture
 | 
				
			||||||
tags: [binary, bits]
 | 
					tags: [binary]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Why computers use binary
 | 
					# Why computers use binary
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Electronics
 | 
					  - Electronics
 | 
				
			||||||
tags: [electrical-circuits]
 | 
					tags: [circuits]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Digital circuits
 | 
					# Digital circuits
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
title: Ohm's Law
 | 
					title: Ohm's Law
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Electronics
 | 
					  - Electronics
 | 
				
			||||||
tags: [physics, electricity, electrical-resistance]
 | 
					tags: [physics, electricity]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Ohm's Law
 | 
					# Ohm's Law
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Linux
 | 
					  - Linux
 | 
				
			||||||
tags: [compilers]
 | 
					tags: []
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Compile package from source
 | 
					# Compile package from source
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Linux
 | 
					  - Linux
 | 
				
			||||||
tags: [systems-programming, systemd]
 | 
					tags: [systems-programming]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Create timed `systemd` job
 | 
					# Create timed `systemd` job
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Linux
 | 
					  - Linux
 | 
				
			||||||
tags: [package-management]
 | 
					tags: []
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Pacman
 | 
					# Pacman
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,9 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Linux
 | 
					  - Linux
 | 
				
			||||||
tags: [user-management]
 | 
					tags: []
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# User management
 | 
					# User management
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Switch user
 | 
					## Switch user
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Linux
 | 
					  - Linux
 | 
				
			||||||
tags: [journaling, systemd, systems-programming]
 | 
					tags: [systems-programming]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# `journald`
 | 
					# `journald`
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Linux
 | 
					  - Linux
 | 
				
			||||||
tags: [systems-programming, systemd]
 | 
					tags: [systems-programming]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# `systemd`
 | 
					# `systemd`
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Logic
 | 
					  - Logic
 | 
				
			||||||
tags: [logic, laws]
 | 
					tags: []
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# DeMorgan's Laws
 | 
					# DeMorgan's Laws
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Logic
 | 
					  - Logic
 | 
				
			||||||
tags: [derivation-rules]
 | 
					tags: []
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Biconditional Elimination
 | 
					# Biconditional Elimination
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Logic
 | 
					  - Logic
 | 
				
			||||||
tags: [derivation-rules]
 | 
					tags: []
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Biconditional introduction
 | 
					# Biconditional introduction
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Logic
 | 
					  - Logic
 | 
				
			||||||
tags: [derivation-rules]
 | 
					tags: []
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Conditional elimination
 | 
					# Conditional elimination
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Logic
 | 
					  - Logic
 | 
				
			||||||
tags: [derivation-rules]
 | 
					tags: []
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Conditional Introduction
 | 
					# Conditional Introduction
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Logic
 | 
					  - Logic
 | 
				
			||||||
tags: [derivation-rules]
 | 
					tags: []
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Conditional Elimination
 | 
					# Conditional Elimination
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Logic
 | 
					  - Logic
 | 
				
			||||||
tags: [derivation-rules]
 | 
					tags: []
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
If two conjuncts have each been independently derived then they can be conjoined. Also known more simply as _Conjunction_
 | 
					If two conjuncts have each been independently derived then they can be conjoined. Also known more simply as _Conjunction_
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Logic
 | 
					  - Logic
 | 
				
			||||||
tags: [derivation-rules]
 | 
					tags: []
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Disjunction Elimination
 | 
					# Disjunction Elimination
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Logic
 | 
					  - Logic
 | 
				
			||||||
tags: [derivation-rules]
 | 
					tags: []
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Disjunction Introduction
 | 
					# Disjunction Introduction
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Logic
 | 
					  - Logic
 | 
				
			||||||
tags: [derivation-rules]
 | 
					tags: []
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Negation Elimination
 | 
					# Negation Elimination
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Logic
 | 
					  - Logic
 | 
				
			||||||
tags: [derivation-rules]
 | 
					tags: []
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Negation Introduction
 | 
					# Negation Introduction
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Logic
 | 
					  - Logic
 | 
				
			||||||
tags: [derivation-rules]
 | 
					tags: []
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Reiteration
 | 
					# Reiteration
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Logic
 | 
					  - Logic
 | 
				
			||||||
  - Computer Architecture
 | 
					  - Computer Architecture
 | 
				
			||||||
tags: [logic, propositional-logic, nand-to-tetris]
 | 
					tags: [propositional-logic, nand-to-tetris]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Boolean function synthesis
 | 
					# Boolean function synthesis
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Logic
 | 
					  - Logic
 | 
				
			||||||
  - Computer Architecture
 | 
					  - Computer Architecture
 | 
				
			||||||
tags: [logic, propositional-logic, nand-to-tetris]
 | 
					tags: [propositional-logic, nand-to-tetris]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Boolean functions
 | 
					# Boolean functions
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,8 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Mathematics
 | 
					  - Mathematics
 | 
				
			||||||
tags: [logic]
 | 
					  - Logic
 | 
				
			||||||
 | 
					tags: []
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Truth-tables
 | 
					# Truth-tables
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Mathematics
 | 
					  - Mathematics
 | 
				
			||||||
tags: [logic]
 | 
					tags: []
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Rationale
 | 
					## Rationale
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,6 @@ categories:
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - prealgebra
 | 
					  - prealgebra
 | 
				
			||||||
  - fractions
 | 
					  - fractions
 | 
				
			||||||
  - division
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Adding and subtracting fractions
 | 
					# Adding and subtracting fractions
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,6 @@ categories:
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - prealgebra
 | 
					  - prealgebra
 | 
				
			||||||
  - fractions
 | 
					  - fractions
 | 
				
			||||||
  - division
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Dividing fractions
 | 
					# Dividing fractions
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,8 +3,6 @@ categories:
 | 
				
			||||||
  - Mathematics
 | 
					  - Mathematics
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - prealgebra
 | 
					  - prealgebra
 | 
				
			||||||
  - factors
 | 
					 | 
				
			||||||
  - divisors
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Factors and divisors
 | 
					## Factors and divisors
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,6 @@ categories:
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - prealgebra
 | 
					  - prealgebra
 | 
				
			||||||
  - fractions
 | 
					  - fractions
 | 
				
			||||||
  - divisors
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Given the equivalence between factors and divisors we can increase fractions to higher terms in a very similar way to when we reduce fractions. In the latter case we are dividing by divisors to reduce. In the former, we are multiplying by factors to increase.
 | 
					Given the equivalence between factors and divisors we can increase fractions to higher terms in a very similar way to when we reduce fractions. In the latter case we are dividing by divisors to reduce. In the former, we are multiplying by factors to increase.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,6 @@ categories:
 | 
				
			||||||
  - Mathematics
 | 
					  - Mathematics
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - prealgebra
 | 
					  - prealgebra
 | 
				
			||||||
  - operators
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Addition, subtraction
 | 
					## Addition, subtraction
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,7 @@ categories:
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - prealgebra
 | 
					  - prealgebra
 | 
				
			||||||
  - fractions
 | 
					  - fractions
 | 
				
			||||||
  - multiplication
 | 
					  - arithmetic
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Multiplying fractions
 | 
					# Multiplying fractions
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,8 +3,7 @@ categories:
 | 
				
			||||||
  - Mathematics
 | 
					  - Mathematics
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - prealgebra
 | 
					  - prealgebra
 | 
				
			||||||
  - factors
 | 
					  - number-theory
 | 
				
			||||||
  - primes
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Prime factorisation
 | 
					### Prime factorisation
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,7 @@ categories:
 | 
				
			||||||
  - Mathematics
 | 
					  - Mathematics
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - prealgebra
 | 
					  - prealgebra
 | 
				
			||||||
  - primes
 | 
					  - number-theory
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Prime and composite numbers
 | 
					## Prime and composite numbers
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,6 @@ categories:
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - prealgebra
 | 
					  - prealgebra
 | 
				
			||||||
  - fractions
 | 
					  - fractions
 | 
				
			||||||
  - division
 | 
					 | 
				
			||||||
  - theorems
 | 
					  - theorems
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,6 @@ categories:
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - prealgebra
 | 
					  - prealgebra
 | 
				
			||||||
  - fractions
 | 
					  - fractions
 | 
				
			||||||
  - divisors
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Reducing fractions to their lowest terms
 | 
					## Reducing fractions to their lowest terms
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,6 @@ categories:
 | 
				
			||||||
  - Operating Systems
 | 
					  - Operating Systems
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - disks
 | 
					  - disks
 | 
				
			||||||
  - bootloader
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# The boot process
 | 
					# The boot process
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,6 @@ categories:
 | 
				
			||||||
  - Operating Systems
 | 
					  - Operating Systems
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - disks
 | 
					  - disks
 | 
				
			||||||
  - filesystems
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Filesystems
 | 
					# Filesystems
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,7 +5,6 @@ categories:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - disks
 | 
					  - disks
 | 
				
			||||||
  - devices
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Disk partitions
 | 
					# Disk partitions
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,7 +5,6 @@ categories:
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - memory
 | 
					  - memory
 | 
				
			||||||
  - disks
 | 
					  - disks
 | 
				
			||||||
  - devices
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Swap space
 | 
					# Swap space
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,6 @@ categories:
 | 
				
			||||||
  - Operating Systems
 | 
					  - Operating Systems
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - disks
 | 
					  - disks
 | 
				
			||||||
  - devices
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# What are disks?
 | 
					# What are disks?
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Operating Systems
 | 
					  - Operating Systems
 | 
				
			||||||
tags: [systems-programming, processes, memory]
 | 
					tags: [systems-programming, memory]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# The Kernel
 | 
					# The Kernel
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,7 +5,6 @@ tags:
 | 
				
			||||||
  - javascript
 | 
					  - javascript
 | 
				
			||||||
  - react
 | 
					  - react
 | 
				
			||||||
  - react-hooks
 | 
					  - react-hooks
 | 
				
			||||||
  - memoization
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Memoization with `useCallback` and `useMemo`
 | 
					# Memoization with `useCallback` and `useMemo`
 | 
				
			||||||
| 
						 | 
					@ -49,7 +48,7 @@ const handleSubmit = useCallback(
 | 
				
			||||||
      .finally(() => setPendSaveConfig(false))
 | 
					      .finally(() => setPendSaveConfig(false))
 | 
				
			||||||
      .catch((err) => console.error(err));
 | 
					      .catch((err) => console.error(err));
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  [blockId, project_id],
 | 
					  [blockId, project_id]
 | 
				
			||||||
);
 | 
					);
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -103,6 +102,6 @@ const List = React.useMemo(
 | 
				
			||||||
      itemProp1: expensiveFunction(props.first),
 | 
					      itemProp1: expensiveFunction(props.first),
 | 
				
			||||||
      itemProp2: anotherPriceyFunction(props.second),
 | 
					      itemProp2: anotherPriceyFunction(props.second),
 | 
				
			||||||
    })),
 | 
					    })),
 | 
				
			||||||
  [listOfItems],
 | 
					  [listOfItems]
 | 
				
			||||||
);
 | 
					);
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,6 @@ categories:
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - backend
 | 
					  - backend
 | 
				
			||||||
  - node-js
 | 
					  - node-js
 | 
				
			||||||
  - async
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# The Event Loop
 | 
					# The Event Loop
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,6 @@ categories:
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - backend
 | 
					  - backend
 | 
				
			||||||
  - node-js
 | 
					  - node-js
 | 
				
			||||||
  - node-modules
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## The Module Wrapper Function
 | 
					## The Module Wrapper Function
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,6 @@ categories:
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - backend
 | 
					  - backend
 | 
				
			||||||
  - node-js
 | 
					  - node-js
 | 
				
			||||||
  - node-modules
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Ports
 | 
					# Ports
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,6 @@ categories:
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - backend
 | 
					  - backend
 | 
				
			||||||
  - node-js
 | 
					  - node-js
 | 
				
			||||||
  - node-modules
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Node.js `events` module
 | 
					# Node.js `events` module
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,6 @@ categories:
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - backend
 | 
					  - backend
 | 
				
			||||||
  - node-js
 | 
					  - node-js
 | 
				
			||||||
  - node-modules
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# `fs` module
 | 
					# `fs` module
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,6 @@ categories:
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - backend
 | 
					  - backend
 | 
				
			||||||
  - node-js
 | 
					  - node-js
 | 
				
			||||||
  - node-modules
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# `http` module
 | 
					# `http` module
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,6 @@ categories:
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - backend
 | 
					  - backend
 | 
				
			||||||
  - node-js
 | 
					  - node-js
 | 
				
			||||||
  - node-modules
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Modules
 | 
					# Modules
 | 
				
			||||||
| 
						 | 
					@ -65,7 +64,7 @@ module.exports = function (...params) {
 | 
				
			||||||
Note the module is unnamed. We would name it when we import:
 | 
					Note the module is unnamed. We would name it when we import:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```js
 | 
					```js
 | 
				
			||||||
const myFunction = require('./filenme');
 | 
					const myFunction = require("./filenme");
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Exporting sub-components from a module
 | 
					### Exporting sub-components from a module
 | 
				
			||||||
| 
						 | 
					@ -85,7 +84,7 @@ var nonExportedVar = true;
 | 
				
			||||||
This time the exports are already name so we would import with the following:
 | 
					This time the exports are already name so we would import with the following:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```js
 | 
					```js
 | 
				
			||||||
const {myFunc, aVar} = require('./filename');
 | 
					const { myFunc, aVar } = require("./filename");
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
We can also do the exporting at the bottom when the individual components are named:
 | 
					We can also do the exporting at the bottom when the individual components are named:
 | 
				
			||||||
| 
						 | 
					@ -110,7 +109,7 @@ module.exports = {myNamedFunc, anotherNamedFunc};
 | 
				
			||||||
The import is the same:
 | 
					The import is the same:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```js
 | 
					```js
 | 
				
			||||||
const {myNamedFunc, anotherNamedFunc} = require('./modules/multiExports');
 | 
					const { myNamedFunc, anotherNamedFunc } = require("./modules/multiExports");
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Structuring modules
 | 
					## Structuring modules
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,6 @@ categories:
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - backend
 | 
					  - backend
 | 
				
			||||||
  - node-js
 | 
					  - node-js
 | 
				
			||||||
  - npm
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Package management
 | 
					# Package management
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Programming Languages
 | 
					  - Programming Languages
 | 
				
			||||||
tags: [backend, node-js, REST, APIs, validation]
 | 
					tags: [backend, node-js, REST, APIs]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Creating a RESTful API: Validation
 | 
					# Creating a RESTful API: Validation
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,6 @@ categories:
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - backend
 | 
					  - backend
 | 
				
			||||||
  - node-js
 | 
					  - node-js
 | 
				
			||||||
  - streams
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Handling streams with `fs`
 | 
					# Handling streams with `fs`
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,7 +5,7 @@ tags:
 | 
				
			||||||
  - shell
 | 
					  - shell
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Quote marks
 | 
					# Quote marks in Bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Single-quotes (aka _strong_ quotes)
 | 
					## Single-quotes (aka _strong_ quotes)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,7 +22,11 @@ awk [program] file1, file2, file3
 | 
				
			||||||
awk -f [ref_to_script_file] file1, file2, file3
 | 
					awk -f [ref_to_script_file] file1, file2, file3
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
We can also obviously pipe to it.
 | 
					We can also pipe to it. This piped command receives output from the `echo` command and prints the value in the last field for each record:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```bash
 | 
				
			||||||
 | 
					echo -e "1 2 3 5\n2 2 3 8" | awk '{print $(NF)}'
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Syntactic structure
 | 
					## Syntactic structure
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -54,6 +58,8 @@ Alfred 65
 | 
				
			||||||
Kate 46
 | 
					Kate 46
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					> `awk` particularly lends itself to inputs that are structured by whitespace or in columns, like what you get from commands like `ls` and `grep`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Patterns and actions
 | 
					### Patterns and actions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The basic structure of an `awk` script is as follows:
 | 
					The basic structure of an `awk` script is as follows:
 | 
				
			||||||
| 
						 | 
					@ -146,4 +152,38 @@ awk '$2 >= 90 { print $0 }' scores.txt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This returns the records where there is a secondary numerical field that is greater than 90.
 | 
					This returns the records where there is a secondary numerical field that is greater than 90.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**_Match a field against a regular expression_**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```bash
 | 
				
			||||||
 | 
					awk '$1 ~ /^[b,c]/ {print $1}' words.txt
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This matches all the fields in the `$1` place that begin with 'b' or 'c'.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The tilde is the regex match operator. You must be passing a regex to use it, otherwise use `==`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Syntactic shorthands
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- For a statement like `awk 'length($1) > 5 { print $0 }' list.txt`. We actually don't need to include the `{ print $0 }` action, as this is the default behaviour and it is implied. We could have just put `length($1) > 5  list.txt`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
https://zetcode.com/lang/awk/
 | 
					https://zetcode.com/lang/awk/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Built-in variables
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### `NF`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The value of `NF` is the **number** of **fields** in the current record. `Awk` automatically updates the value of `NF` every time it reads a record.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					No matter how many fields there are, the last value in a record can always be represented by `$NF`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### `NR`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					`NR` represents the **number** of **records**. It is set at the point at which the file is read.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### `FS`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					`FS` represents the **field separator**. The default field separator is a space. We can specify a different separator with the `-F` flag. E.g to separate by comma:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```bash
 | 
				
			||||||
 | 
					awk -F, '{print $1 }' list.txt
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,6 @@ categories:
 | 
				
			||||||
  - Programming Languages
 | 
					  - Programming Languages
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - shell
 | 
					  - shell
 | 
				
			||||||
  - unix
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Unix based systems
 | 
					## Unix based systems
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,6 @@ categories:
 | 
				
			||||||
  - Programming Languages
 | 
					  - Programming Languages
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - shell
 | 
					  - shell
 | 
				
			||||||
  - processes
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Processes (`ps`)
 | 
					# Processes (`ps`)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,7 +5,7 @@ tags:
 | 
				
			||||||
  - shell
 | 
					  - shell
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Test in bash
 | 
					# Test values in Bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
`test` is a built-in command that is used to compare values or determine whether something is the case.
 | 
					`test` is a built-in command that is used to compare values or determine whether something is the case.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,6 @@
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Mathematics
 | 
					  - Mathematics
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - logic
 | 
					 | 
				
			||||||
  - set-theory
 | 
					  - set-theory
 | 
				
			||||||
  - theorems
 | 
					  - theorems
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Mathematics
 | 
					  - Mathematics
 | 
				
			||||||
 | 
					  - Logic
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - logic
 | 
					 | 
				
			||||||
  - set-theory
 | 
					  - set-theory
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Software Engineering
 | 
					  - Software Engineering
 | 
				
			||||||
tags:
 | 
					tags: []
 | 
				
			||||||
  - callstack
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# The call-stack
 | 
					# The call-stack
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Software Engineering
 | 
					  - Software Engineering
 | 
				
			||||||
tags: [semver]
 | 
					tags: []
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Semantic versioning
 | 
					# Semantic versioning
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,7 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Software Engineering
 | 
					  - Software Engineering
 | 
				
			||||||
tags:
 | 
					tags: []
 | 
				
			||||||
  - resources
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## General
 | 
					## General
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,9 +3,10 @@ categories:
 | 
				
			||||||
  - Computer Architecture
 | 
					  - Computer Architecture
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - theory-of-computation
 | 
					  - theory-of-computation
 | 
				
			||||||
  - history
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Defining a computer
 | 
				
			||||||
 | 
					
 | 
				
			||||||
> A general-purpose computer is one that, given the appropriate instructions and required time, should be able to perform most common computing tasks.
 | 
					> A general-purpose computer is one that, given the appropriate instructions and required time, should be able to perform most common computing tasks.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This sets a general purpose computer aside from a special-purpose computer, like the one you might find in your dishwasher which may have its instructions hardwired or coded into the machine. Special purpose computers only perform a single set of tasks according to prewritten instructions. We’ll take the term _computer_ to mean general purpose computer.
 | 
					This sets a general purpose computer aside from a special-purpose computer, like the one you might find in your dishwasher which may have its instructions hardwired or coded into the machine. Special purpose computers only perform a single set of tasks according to prewritten instructions. We’ll take the term _computer_ to mean general purpose computer.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,6 @@ categories:
 | 
				
			||||||
  - Computer Architecture
 | 
					  - Computer Architecture
 | 
				
			||||||
tags:
 | 
					tags:
 | 
				
			||||||
  - theory-of-computation
 | 
					  - theory-of-computation
 | 
				
			||||||
  - turing
 | 
					 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## What is a Turing Machine?
 | 
					## What is a Turing Machine?
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue