Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
/* | |
* Available context bindings: | |
* COLUMNS List<DataColumn> | |
* ROWS Iterable<DataRow> | |
* OUT { append() } | |
* FORMATTER { format(row, col); formatValue(Object, col) } | |
* TRANSPOSED Boolean | |
* plus ALL_COLUMNS, TABLE, DIALECT | |
* | |
* where: |
// BEFORE YOU start | |
// npm init -y | |
// npm install --save node-fetch | |
const fetch = require('node-fetch'); | |
// INTRO | |
// Javascript is single threaded, meaning that two bits of script cannot run at the same time. | |
// Doing something which takes some time (a costly algorithm, a back-end call) causes everything else to halt | |
// until it completes. In browsers, this often means the UI becomes non-responsive, | |
// because the rendering of the screen is blocked. |
///////// | |
// LESSION MATERIAL FOR .map, .filter, .reduce, function composition and currying | |
///////// | |
const list = [1, 2, 3, 4, 5]; | |
const anotherList = ['h', 'e', 'l', 'l', 'o']; | |
let result; | |
// map is used to transform each element in the array |
Enable #enable-devtools-experiments
flag in chrome://flags
section.
Open Chorme Devtools and check Settings > Experiments > Allow extensions to load custom stylesheets
.
Create the following four files in a dedicated folder.
3.1. devtools.html
<html>
<head></head>
<body><script src="devtools.js"></script></body>
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
/* | |
* System Versioning Preprocessor Macros | |
*/ | |
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) | |
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) | |
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) | |
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) | |
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) |