This is particularly important in SQL: Nested set model in SQL, as it is an efficient way to transverse trees there, since querying parents every time would require multiple disk accesses.
The ASCII art visualizations from stackoverflow.com/questions/192220/what-is-the-most-efficient-elegant-way-to-parse-a-flat-table-into-a-tree/194031#194031 are worth reproducing.
As a tree:
- Root 1
- Child 1.1
- Child 1.1.1
- Child 1.1.2
- Child 1.2
- Child 1.2.1
- Child 1.2.2
- Child 1.1
As the sets:
__________________________________________________________________________
| Root 1 |
| ________________________________ ________________________________ |
| | Child 1.1 | | Child 1.2 | |
| | ___________ ___________ | | ___________ ___________ | |
| | | C 1.1.1 | | C 1.1.2 | | | | C 1.2.1 | | C 1.2.2 | | |
1 2 3___________4 5___________6 7 8 9___________10 11__________12 13 14
| |________________________________| |________________________________| |
|__________________________________________________________________________|
Consider the following nested set:
0, 8, root
1, 7, mathematics
2, 3, geometry
3, 6, calculus
4, 5, derivative
5, 6, integral
6, 7, algebra
7, 8, physics
When we want to insert one element, e.g. so we have a method:
limit
, normally under calculus
, we have to specify:- parent
- index within parent
insert(parent, previousSibling)
As mentioned at Video "Are we living in the matrix? by David Tong (2020)" somehow implies that it is difficult or impossible to simulate physics on a computer. Big news!!!
Crush the current grossly inefficient educational system, replace today's students + teachers + researchers with unified "online content creators/consumers".
Gamify them, and pay the best creators so they can work it full time, until some company hires for more them since they are so provenly good.
Destroy useless exams, the only metrics of society are either:
Reduce the entry barrier to education, like Uber has done for taxis.
Help create much greater equal opportunity to talented poor students as described at free gifted education.
Give the students a flexible choice of what to learn, which basically implies that a much large proportion of students get a de-facto gifted education.
In some ways, Ciro wants the website to feel like a video game, where you fluidly interact with headers, comments and their metadata. If game developers can achieve impressively complicated game engines, why can't we achieve a decent amazing elearning website? :-)
Related:
Has the best opening scene of all time.
Top quotes:
- 3 evil guys: looks like we're short one horse. The good guy, shaking his head: you brought two too many.
- "So, you found out you're not a businessman after all." dialogue, see: www.imdb.com/title/tt0064116/characters/nm0000314
SQL's implementation of database triggers.
This feature is really cool, as it allows you to keep caches up to date!
In particular, everything that happens in a trigger happens as if it were in a transaction. This way, you can do less explicit transactions when you use triggers. It is a bit like the advantages of SQL CASCADE.
DBMS:
Test buy 2023-04-10 in the UK:
- fee: 0.99 pounds, minimum buy: 1.99 pounds
- bought 10 pounds, minus 0.99 fee, totalled: 0.00039162 BTC (£8.92) presumably after further fees/spread
- bitcoin price on Google on that day: 22,777.54 GBP / BTC
- bitcoin transaction fees were about 2.7 BTC on that day
Sending 5 pounds to wallet
12dg2FaiZLp3VzDtLvwPinaKz41TQcEGbs
- network fee: 0.00001989 BTC
- total bitcoin cost: -0.00023928 BTC
- new balance: 15,234 satoshi (39,162 - 23,928).
- total spent: £5.45
- time est.: about 30 minutes
This worked and I received 21939 satoshis (23928 - 1989) on Electrum on one of the outputs of transaction 1177268091cbeaacbcaac5dc4f6d1774c4ec11b4bcffafa555cd2775eafb954c.
Sending 1 satoshi back! The lowest fee in Electron is 1120 Satoshis targeting 25 blocks (4 hours). Let's do it. Failed, server forbids dust, minimum is 1000 satoshi. OK, sending 1000 satoshi, at 1139 fee.
Unlisted articles are being shown, click here to show only listed articles.