Copenhagen notes.

c-declarations
Joshua Potter 2024-05-09 14:29:12 -06:00
parent 464512dc38
commit a9d0925080
19 changed files with 110 additions and 71 deletions

View File

@ -234,7 +234,7 @@
"c17/strings.md": "8f23005c9f8e25c72e2ac6b74b6afd7e",
"c17/index.md": "78576ee41d0185df82c59999142f4edb",
"c17/escape-sequences.md": "a8b99070336878b4e8c11e9e4525a500",
"c17/declarations.md": "155c5472e56e87c54a563cfaaa1dbd7e",
"c17/declarations.md": "65d2faaf8cc50878ad80126109e98b1f",
"algorithms/sorting/merge-sort.md": "6506483f7df6507cee0407bd205dbedd",
"_journal/2024-02-24.md": "9bb319d5014caf962a9ce3141076cff4",
"_journal/2024-02/2024-02-23.md": "0aad297148e8cc4058b48b7e45787ca7",
@ -248,15 +248,15 @@
"_journal/2024-02/2024-02-27.md": "f75a0d04a875aeee932343dae0c78768",
"filesystems/index.md": "cbd2b0290a3ba3b32abec4bd8bfefad5",
"filesystems/cas.md": "d41c0d2e943adecbadd10a03fd1e4274",
"git/objects.md": "c6b7e6a26666386790d25d4ece38175d",
"git/index.md": "a4762d9f897f45ee13a2681828778820",
"git/objects.md": "8c1da67ac3f568624c3f9623eb2133e1",
"git/index.md": "ca842957bda479dfa1170ae85f2f37b8",
"encoding/integer.md": "2ab21152b9468f547ebee496e03bc410",
"_journal/2024-02-29.md": "f610f3caed659c1de3eed5f226cab508",
"_journal/2024-02/2024-02-28.md": "7489377c014a2ff3c535d581961b5b82",
"_journal/2024-03-01.md": "a532486279190b0c12954966cbf8c3fe",
"_journal/2024-02/2024-02-29.md": "0e502a2c8baf90c2f12859b03f10b5a1",
"algebra/sequences.md": "97c217823aacf8910a1a37bde694ecfe",
"algebra/sequences/index.md": "50de3bdd4d56af118cf3c8670ccf7fcc",
"algebra/sequences/index.md": "2385d1db23c1753f9dc744029c357283",
"_journal/2024-03-02.md": "08c3cae1df0079293b47e1e9556f1ce1",
"_journal/2024-03/2024-03-01.md": "70da812300f284df72718dd32fc39322",
"algebra/sequences/triangular-numbers.md": "39a84ee317d3760a2eda7279c83e921a",
@ -382,16 +382,16 @@
"_journal/2024-04-28.md": "46726bf76a594b987c63ba8b9b6d13d3",
"_journal/2024-04/2024-04-27.md": "b0f3753821c232bf819b00fb49415bd0",
"_journal/2024-04/2024-04-26.md": "3ce37236a9e09e74b547a4f7231df5f0",
"algorithms/sorting/heapsort.md": "94ac936dac6c841b4d0c9b7df3eba0d3",
"algorithms/sorting/heapsort.md": "c5641af1431021751cba9bef96ee30bb",
"_journal/2024-04-29.md": "7888f4e9497c9d8bd6f4aa759d9abc4d",
"_journal/2024-04/2024-04-28.md": "b34a9fe3bccb1f224b96ca00e78ad061",
"programming/assertions.md": "cf7996590c9f5eefd6f7862c4f92132e",
"programming/assertions.md": "d663ab31fc7e7296b6636edbffe9d8c7",
"programming/text-sub.md": "4bf5287353fc6571dd15be8f9f509bee",
"programming/equiv-trans.md": "fbadd593688e364ea92f74f23e54bcfc",
"programming/index.md": "bb082325e269a95236aa6aff9307fe59",
"_journal/2024-04-30.md": "369f98b9d91de89cc1f4f581bc530c0d",
"_journal/2024-04/2024-04-29.md": "b4fa2fd62e1b4fe34c1f71dc1e9f5b0b",
"proofs/induction.md": "ab9e939efe32a4fb7ef2a0808eeb569f",
"proofs/induction.md": "d7f456e0a696fa89198bbf6661a5f616",
"proofs/index.md": "51a7bc4e30b7a6cc0d4c5712ad603448",
"_journal/2024-05-01.md": "959ff67fe3db585ba6a7b121d853bbac",
"_journal/2024-05-02.md": "d7d6ba7e065d807986f0bd77281c0bb1",
@ -399,7 +399,14 @@
"data-structures/heaps.md": "0cba4acb7667dcab80fa4e7778e86cc8",
"data-structures/index.md": "2605977fad54956b5dc2d8dda9be2b10",
"abstract-data-types/priority-queues.md": "d3dad736cb05c47bdc93c52a3a4af083",
"abstract-data-types/index.md": "d07dd52473c7bfeb9eabdcc16f4c7e30"
"abstract-data-types/index.md": "2c287ebe88f9cce0ea9fba1311b6a3a6",
"_journal/2024-05-04.md": "679934dc63ded49503d573b8d2046e5d",
"_journal/2024-05/2024-05-03.md": "be21fe4d9c1c24f74a74d06d07f8e90b",
"_journal/2024-05/2024-05-02.md": "d7d6ba7e065d807986f0bd77281c0bb1",
"_journal/2024-05/2024-05-01.md": "959ff67fe3db585ba6a7b121d853bbac",
"_journal/2024-04/2024-04-30.md": "369f98b9d91de89cc1f4f581bc530c0d",
"_journal/2024-05-06.md": "bc9306348b7063b87741768391d9d8a7",
"_journal/2024-05/2024-05-04.md": "866af1876896a343e7a7d9d09d0c24bb"
},
"fields_dict": {
"Basic": [

View File

@ -0,0 +1,15 @@
---
title: "2024-05-09"
---
- [x] Anki Flashcards
- [x] KoL
- [ ] Sheet Music (10 min.)
- [ ] Go (1 Life & Death Problem)
- [ ] Korean (Read 1 Story)
* Back from Copenhagen trip.
* Accepted job with Pranav so can drop the work and interview prep TODOs.
* Databases
* Watched [Lecture #08](https://www.youtube.com/watch?v=9QPr8Ufzt5M8&list=PLSE8ODhjZXjaKScG3l0nuOiDTTqpfnWFf&index=8) on tree indices.
* Read chapter 14.1-14.4 of "Database Concepts".

View File

@ -0,0 +1,11 @@
---
title: "2024-05-03"
---
- [x] Anki Flashcards
- [x] KoL
- [ ] Sheet Music (10 min.)
- [ ] Go (1 Life & Death Problem)
- [ ] Korean (Read 1 Story)
- [ ] Interview Prep (1 Practice Problem)
- [ ] Log Work Hours (Max 3 hours)

View File

@ -0,0 +1,11 @@
---
title: "2024-05-04"
---
- [x] Anki Flashcards
- [x] KoL
- [ ] Sheet Music (10 min.)
- [ ] Go (1 Life & Death Problem)
- [ ] Korean (Read 1 Story)
- [ ] Interview Prep (1 Practice Problem)
- [ ] Log Work Hours (Max 3 hours)

View File

@ -0,0 +1,11 @@
---
title: "2024-05-06"
---
- [x] Anki Flashcards
- [x] KoL
- [ ] Sheet Music (10 min.)
- [ ] Go (1 Life & Death Problem)
- [ ] Korean (Read 1 Story)
- [ ] Interview Prep (1 Practice Problem)
- [ ] Log Work Hours (Max 3 hours)

View File

@ -0,0 +1,11 @@
---
title: "2024-05-07"
---
- [x] Anki Flashcards
- [x] KoL
- [ ] Sheet Music (10 min.)
- [ ] Go (1 Life & Death Problem)
- [ ] Korean (Read 1 Story)
- [ ] Interview Prep (1 Practice Problem)
- [ ] Log Work Hours (Max 3 hours)

View File

@ -0,0 +1,11 @@
---
title: "2024-05-09"
---
- [x] Anki Flashcards
- [x] KoL
- [ ] Sheet Music (10 min.)
- [ ] Go (1 Life & Death Problem)
- [ ] Korean (Read 1 Story)
- [ ] Interview Prep (1 Practice Problem)
- [ ] Log Work Hours (Max 3 hours)

View File

@ -6,6 +6,4 @@ title: "{{date:YYYY-MM-DD}}"
- [ ] KoL
- [ ] Sheet Music (10 min.)
- [ ] Go (1 Life & Death Problem)
- [ ] Korean (Read 1 Story)
- [ ] Interview Prep (1 Practice Problem)
- [ ] Log Work Hours (Max 3 hours)
- [ ] Korean (Read 1 Story)

View File

@ -28,7 +28,7 @@ END%%
%%ANKI
Cloze
An {1:ADT} is to an {2:ISA} as a {2:data structure} is to a {1:uarch}.
An {1:ADT} is to a {2:data structure} as an {2:ISA} is to a {1:uarch}.
Reference: “Abstract Data Type.” In _Wikipedia_, March 18, 2024. [https://en.wikipedia.org/w/index.php?title=Abstract_data_type&oldid=1214359576](https://en.wikipedia.org/w/index.php?title=Abstract_data_type&oldid=1214359576).
<!--ID: 1714669011572-->
END%%

View File

@ -509,21 +509,13 @@ END%%
%%ANKI
Basic
Using the characteristic root technique, what determines the form of the closed solution?
Using the quadratic characteristic root technique, what distinguishes the form of the closed solution?
Back: The number of distinct roots of the characteristic polynomial.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
Tags: algebra::polynomial
<!--ID: 1714487050079-->
END%%
%%ANKI
Basic
Using the characteristic root technique, what determines the form of the closed solution?
Back: The number of distinct roots of the characteristic polynomial.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
Tags: algebra::polynomial
END%%
%%ANKI
Basic
Suppose the characteristic polynomial of $a_n = \alpha a_{n-1} + \beta a_{n-2}$ has distinct roots $r_1$ and $r_2$. What is its solution?
@ -544,7 +536,7 @@ END%%
%%ANKI
Basic
If $a_n = \alpha a_{n-1} + \beta a_{n-2}$ has solution $a_n = ar^n + bnr^n$, how many roots does its characteristic polynomial have?
How many distinct roots does the characteristic polynomial of the following have? $$a_n = \alpha a_{n-1} + \beta a_{n-2} = ar^n + bnr^n$$
Back: One.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
Tags: algebra::polynomial
@ -553,7 +545,7 @@ END%%
%%ANKI
Basic
If $a_n = \alpha a_{n-1} + \beta a_{n-2}$ has solution $a_n = ar_1^n + br_2^n$, how many roots does its characteristic polynomial have?
How many distinct roots does the characteristic polynomial of the following have? $$a_n = \alpha a_{n-1} + \beta a_{n-2} = ar_1^n + br_2^n$$
Back: Two.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
Tags: algebra::polynomial

View File

@ -168,16 +168,24 @@ We prove $P$ maintains the requisite properties:
%%ANKI
Basic
Given array `A[0:n-1]`, what two properties make up `HEAPSORT`'s loop invariant?
Back: `A[0:i-1]` is a max-heap of the `i` smallest elements. `A[i+1:n]` contains the `n - i` largest elements sorted.
What loop invariant does `HEAPSORT` maintain on `A[0:i-1]`?
Back: `A[0:i-1]` is a max-heap of the `i` smallest elements.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1714410566843-->
<!--ID: 1714840899537-->
END%%
%%ANKI
Basic
What loop invariant does `HEAPSORT` maintain on `A[i:n-1]`?
Back: `A[i:n-1]` contains the `n - i` largest elements sorted.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1714840899581-->
END%%
%%ANKI
Basic
What is initialization of `HEAPSORT`'s loop invariant?
Back: `A` is a max-heap.
Back: The input array is a max-heap.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1714410566845-->
END%%
@ -185,7 +193,7 @@ END%%
%%ANKI
Basic
What is maintenance of `HEAPSORT`'s loop invariant?
Back: Each iteration puts the next largest element in sorted order and then heapifies the remaining elements again.
Back: Swap the root with the last position of the heap. Heapify the new root.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1714410566846-->
END%%

View File

@ -395,7 +395,7 @@ Given `short sx`, why is the following not an identity?
```c
(unsigned) sx = (unsigned) (unsigned short) sx
```
Back: `(unsigned) sx` is equivalent to casting size before "signedness".
Back: `(unsigned) sx` casts size before "signedness".
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1714677608767-->
END%%

View File

@ -87,42 +87,6 @@ Reference: Scott Chacon, *Pro Git*, Second edition, The Experts Voice in Soft
<!--ID: 1714478450660-->
END%%
%%ANKI
Basic
You can convert an untracked file to a tracked file with what status?
Back: Staged.
Reference: Scott Chacon, *Pro Git*, Second edition, The Experts Voice in Software Development (New York, NY: Apress, 2014).
<!--ID: 1714478450664-->
END%%
%%ANKI
Cloze
An {1:unmodified} tracked file becomes a {2:modified} tracked file after {2:editing} the file.
Reference: Scott Chacon, *Pro Git*, Second edition, The Experts Voice in Software Development (New York, NY: Apress, 2014).
<!--ID: 1714478450668-->
END%%
%%ANKI
Cloze
A {1:modified} tracked file becomes a {2:staged} tracked file after {2:staging} the file.
Reference: Scott Chacon, *Pro Git*, Second edition, The Experts Voice in Software Development (New York, NY: Apress, 2014).
<!--ID: 1714478450673-->
END%%
%%ANKI
Cloze
A {1:staged} tracked file becomes an {2:unmodified} tracked file after {2:committing}.
Reference: Scott Chacon, *Pro Git*, Second edition, The Experts Voice in Software Development (New York, NY: Apress, 2014).
<!--ID: 1714478450678-->
END%%
%%ANKI
Cloze
An untracked file becomes a {1:staged} tracked file after {1:adding} the file.
Reference: Scott Chacon, *Pro Git*, Second edition, The Experts Voice in Software Development (New York, NY: Apress, 2014).
<!--ID: 1714478450683-->
END%%
## Bibliography
* Scott Chacon, *Pro Git*, Second edition, The Experts Voice in Software Development (New York, NY: Apress, 2014).

View File

@ -157,8 +157,8 @@ END%%
%%ANKI
Basic
How do you decode e.g. `.git/objects/d6/70460b4b4aece5915caf5c68d12f560a9fe3e4`?
Back: By decompressing the `zlib` data formatted file.
How is e.g. `.git/objects/d6/70460b4b4aece5915caf5c68d12f560a9fe3e4` encoded?
Back: As a `zlib` data formatted file.
Reference: Scott Chacon, *Pro Git*, Second edition, The Experts Voice in Software Development (New York, NY: Apress, 2014).
<!--ID: 1709345254705-->
END%%

View File

@ -63,7 +63,7 @@ END%%
%%ANKI
Basic
What is the consequenct of $\{Q\}\; S\; \{R\}$ in English?
What is the consequent of $\{Q\}\; S\; \{R\}$ in English?
Back: $S$ terminates in a finite amount of time in a state satisfying $R$.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1714420640231-->

View File

@ -34,7 +34,7 @@ END%%
%%ANKI
Basic
Let $(a_n)_{n \geq 0} = P(n)$ and $P(n) \Leftrightarrow n \geq 2$. How is $(a_n)$ written with terms expanded?
Back: $F$, $F$, $F$, $T$, $T$, $\ldots$
Back: $F$, $F$, $T$, $T$, $T$, $\ldots$
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1714530152705-->
END%%
@ -73,14 +73,14 @@ END%%
%%ANKI
Cloze
{Closed forms} are to recursive definitions as {direct} is to proofs.
{Closed formulas} are to recursive definitions as {direct proofs} are to proof strategies.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1714532476735-->
END%%
%%ANKI
Cloze
{Recurrence relations} are to recursive definitions as {induction} is to proofs.
{Recurrence relations} are to recursive definitions as {induction} is to proof strategies.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1714532476742-->
END%%