Week of notes.
parent
cdb916c2b4
commit
db1d3dd14e
|
@ -95,7 +95,8 @@
|
|||
"floor-negative.png",
|
||||
"floor-positive.png",
|
||||
"ceil-positive.png",
|
||||
"ceil-negative.png"
|
||||
"ceil-negative.png",
|
||||
"pascals-triangle.png"
|
||||
],
|
||||
"File Hashes": {
|
||||
"algorithms/index.md": "cd7c7ba91fb2f961c9f2437777e8e2ac",
|
||||
|
@ -139,7 +140,7 @@
|
|||
"algorithms/loop-invariants.md": "cbefc346842c21a6cce5c5edce451eb2",
|
||||
"algorithms/loop-invariant.md": "29f9f9090a3109890d333a78acc18b50",
|
||||
"algorithms/running-time.md": "5efc0791097d2c996f931c9046c95f65",
|
||||
"algorithms/order-growth.md": "80801ebb1a9142150699b05b0b41d819",
|
||||
"algorithms/order-growth.md": "0148c1e9f4aa89cc8a7fcf44666805d0",
|
||||
"_journal/2024-02-08.md": "19092bdfe378f31e2774f20d6afbfbac",
|
||||
"algorithms/sorting/selection-sort.md": "3e4f059f01210d050ec6e7279e93e43c",
|
||||
"algorithms/index 1.md": "6fada1f3d5d3af64687719eb465a5b97",
|
||||
|
@ -147,7 +148,7 @@
|
|||
"binary/index.md": "9089c6f0e86a0727cd03984f51350de0",
|
||||
"_journal/2024-02-09.md": "a798d35f0b2bd1da130f7ac766166109",
|
||||
"c/types.md": "cf3e66e5aee58a94db3fdf0783908555",
|
||||
"logic/quantification.md": "5d7579a511e9ff683edeec62bcc291b8",
|
||||
"logic/quantification.md": "346ebe70e1fad9d95d81056ec9029793",
|
||||
"c/declarations.md": "2de27f565d1020819008ae80593af435",
|
||||
"algorithms/sorting/bubble-sort.md": "96c4b9426bcb4284de60b9144ba09b9e",
|
||||
"_journal/2024-02-10.md": "562b01f60ea36a3c78181e39b1c02b9f",
|
||||
|
@ -195,7 +196,7 @@
|
|||
"combinatorics/additive-principle.md": "e968028670f95ee9a7c5499ff7cb6792",
|
||||
"_journal/2024-02-19.md": "30d16c5373deb9cb128d2e7934ae256a",
|
||||
"_journal/2024-02/2024-02-18.md": "67e36dbbb2cac699d4533b5a2eaeb629",
|
||||
"combinatorics/permutations.md": "d257cab50c2767419b0cc3f7b86bd528",
|
||||
"combinatorics/permutations.md": "989c076a9f6909627f4decafd4118266",
|
||||
"combinatorics/combinations.md": "5ae0152180a1af7187c43606a4002202",
|
||||
"_journal/2024-02-20.md": "b85ba0eeeb16e30a602ccefabcc9763e",
|
||||
"_journal/2024-02/2024-02-19.md": "df1a9ab7ab89244021b3003c84640c78",
|
||||
|
@ -207,7 +208,7 @@
|
|||
"_journal/2024-02/2024-02-21.md": "f423137ae550eb958378750d1f5e98c7",
|
||||
"_journal/2024-02-23.md": "219ce9ad15a8733edd476c97628b71fd",
|
||||
"_journal/2024-02/2024-02-22.md": "312e55d57868026f6e80f7989a889c2b",
|
||||
"c17/strings.md": "6bc3f41f111a7386b1abb2a196f1c683",
|
||||
"c17/strings.md": "62b53cc9156eba2b565e33d07813cf50",
|
||||
"c17/index.md": "78576ee41d0185df82c59999142f4edb",
|
||||
"c17/escape-sequences.md": "ebc63c6cdfbe60bbc2708c1b0c8da8bb",
|
||||
"c17/declarations.md": "20e200f2b7abcab8f873cd080f4c9770",
|
||||
|
@ -226,7 +227,7 @@
|
|||
"filesystems/cas.md": "34906013a2a60fe5ee0e31809b4838aa",
|
||||
"git/objects.md": "e9b98576291ca04496c2f0863f526cfa",
|
||||
"git/index.md": "83d2d95fc549d9e8436946c7bd058d15",
|
||||
"encoding/integer.md": "e15129fc5ae9a8348c57c2d533feda41",
|
||||
"encoding/integer.md": "ef26036d0c0d215e8b626b5db872b028",
|
||||
"_journal/2024-02-29.md": "f610f3caed659c1de3eed5f226cab508",
|
||||
"_journal/2024-02/2024-02-28.md": "7489377c014a2ff3c535d581961b5b82",
|
||||
"_journal/2024-03-01.md": "a532486279190b0c12954966cbf8c3fe",
|
||||
|
@ -235,7 +236,7 @@
|
|||
"algebra/sequences/index.md": "d668df1467c7cc70691aeb1d9b17e39d",
|
||||
"_journal/2024-03-02.md": "08c3cae1df0079293b47e1e9556f1ce1",
|
||||
"_journal/2024-03/2024-03-01.md": "70da812300f284df72718dd32fc39322",
|
||||
"algebra/sequences/triangular-numbers.md": "c6626d8aa86776b6ce794c3551862d5a",
|
||||
"algebra/sequences/triangular-numbers.md": "dc3707088423708f2d55708d8b11f81f",
|
||||
"algebra/sequences/square-numbers.md": "886fb22fb8dbfffdd2cd233558ea3424",
|
||||
"_journal/2024-03-03.md": "c4977a3778ed227b768c3f9ad5512670",
|
||||
"_journal/2024-03/2024-03-02.md": "8136792b0ee6e08232e4f60c88d461d2",
|
||||
|
@ -244,13 +245,27 @@
|
|||
"_journal/2024-03-05.md": "e9a911c19bb4c0ff451db793248cb4bb",
|
||||
"_journal/2024-03/2024-03-04.md": "4948d90a08af2cff58c629c9a2e11ee4",
|
||||
"algebra/sequences/geometric.md": "53936ec392b3b714bd4a9bdb4554b582",
|
||||
"algebra/sequences/arithmetic.md": "80381ca0f2b3b9a1c155c597a7dea75a",
|
||||
"algebra/sequences/arithmetic.md": "674256494cdec6f12be553b27918e2d9",
|
||||
"_journal/2024-03-06.md": "ac7a3d764934f49b2be7aa76e402d853",
|
||||
"_journal/2024-03/2024-03-05.md": "94b28d0b9bc62cc0bd99d315fb7c6d30",
|
||||
"_journal/2024-03-07.md": "7bf68d6d81e89aa00f5ddd7510b69e3e",
|
||||
"_journal/2024-03/2024-03-06.md": "c1d8b6b0d3c5ad34b8135230ec102443",
|
||||
"_journal/2024-03-08.md": "07b6c200dcdc7116e1209c7ba6a01613",
|
||||
"_journal/2024-03/2024-03-07.md": "58b84cabda4e875ab0c9e5317b2b6e2c"
|
||||
"_journal/2024-03-08.md": "cc2df3428b965ae469904c1a21e00b8f",
|
||||
"_journal/2024-03/2024-03-07.md": "58b84cabda4e875ab0c9e5317b2b6e2c",
|
||||
"_journal/2024-03-09.md": "55cfba7bb14232007a2c4e11c839388a",
|
||||
"_journal/2024-03-10.md": "b206d34f6fd1c9efec33a15dd146c87f",
|
||||
"_journal/2024-03/2024-03-09.md": "a3eb6ddcae0806f3bf47d08971eff380",
|
||||
"_journal/2024-03/2024-03-08.md": "cc2df3428b965ae469904c1a21e00b8f",
|
||||
"_journal/2024-03-11.md": "87aed4a4a842b0a277c752487f48cb4b",
|
||||
"_journal/2024-03/2024-03-10.md": "4d3ccad4c8408e1ad7e5bea8269c0a2f",
|
||||
"_journal/2024-03-12.md": "4ee623a47f951e94b979da93dc20eddf",
|
||||
"_journal/2024-03/2024-03-11.md": "a70c73727b441a7714c764a59537d69c",
|
||||
"_journal/2024-03-13.md": "2c0dd770d7eb17129aeb21fcbbe48532",
|
||||
"_journal/2024-03/2024-03-12.md": "1b93e0b6fdc25301ec6053cfe3c7c7ba",
|
||||
"_journal/2024-03-14.md": "1c173cab2e903aad876c5f11d49a8b20",
|
||||
"_journal/2024-03/2024-03-13.md": "6a2ad92d0983c36acef93932bfec1758",
|
||||
"git/references.md": "73792b2c7a0700a58336e045915ba0d4",
|
||||
"_journal/2024-03-15.md": "879afe6bc882e494be20a284196747a5"
|
||||
},
|
||||
"fields_dict": {
|
||||
"Basic": [
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
title: "2024-03-15"
|
||||
---
|
||||
|
||||
- [x] Anki Flashcards
|
||||
- [x] KoL
|
||||
- [ ] Sheet Music (10 min.)
|
||||
- [ ] Go (1 Life & Death Problem)
|
||||
- [ ] Korean (Read 1 Story)
|
||||
- [ ] Interview Prep (1 Practice Problem)
|
||||
- [x] Log Work Hours (Max 3 hours)
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
title: "2024-03-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)
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "2024-03-10"
|
||||
---
|
||||
|
||||
- [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)
|
||||
|
||||
* Implemented an extendible hash map in C.
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "2024-03-11"
|
||||
---
|
||||
|
||||
- [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)
|
||||
|
||||
* Got the bustub project up and running on NixOS.
|
||||
* Worked further on the extendible hash table implementation.
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
title: "2024-03-12"
|
||||
---
|
||||
|
||||
- [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)
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "2024-03-13"
|
||||
---
|
||||
|
||||
- [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)
|
||||
|
||||
* Read through floating point representations once in "Computer Systems: A Programmer's Perspective".
|
||||
* Reached chapter 4 in "Introduction to Algorithms".
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: "2024-03-14"
|
||||
---
|
||||
|
||||
- [x] Anki Flashcards
|
||||
- [x] KoL
|
||||
- [ ] Sheet Music (10 min.)
|
||||
- [ ] Go (1 Life & Death Problem)
|
||||
- [ ] Korean (Read 1 Story)
|
||||
- [ ] Interview Prep (1 Practice Problem)
|
||||
- [x] Log Work Hours (Max 3 hours)
|
||||
|
||||
* Continued working through floating point formats (IEEE 754). Did related practice problems.
|
||||
* Added flashcards on floating point `printf` flags.
|
||||
* Add notes on git references.
|
||||
* Implemented LRU-K replacer for database project.
|
|
@ -115,8 +115,8 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Basic
|
||||
The triangular numbers belong to what larger class of sequences?
|
||||
Back: Arithmetic sequences.
|
||||
Interpreted as an arithmetic sequence, what is the common ratio of the triangular numbers?
|
||||
Back: $1$
|
||||
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: 1709664600178-->
|
||||
END%%
|
||||
|
|
|
@ -117,8 +117,8 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Basic
|
||||
Algebraically speaking, *what* is the $n$th triangular number?
|
||||
Back: $\sum_{k=1}^n k$.
|
||||
How is the $n$th triangular number written as a summation?
|
||||
Back: $\sum_{k=1}^n k$
|
||||
Reference: “Triangular Number,” in _Wikipedia_, January 13, 2024, [https://en.wikipedia.org/w/index.php?title=Triangular_number&oldid=1195279122](https://en.wikipedia.org/w/index.php?title=Triangular_number&oldid=1195279122).
|
||||
<!--ID: 1709419325914-->
|
||||
END%%
|
||||
|
@ -212,7 +212,7 @@ END%%
|
|||
Basic
|
||||
Where in Pascal's triangle are the natural numbers embedded?
|
||||
Back: Along the second leftward diagonal:
|
||||
![[pascals-triangle.webp]]
|
||||
![[pascals-triangle.png]]
|
||||
Reference: “Triangular Number,” in _Wikipedia_, January 13, 2024, [https://en.wikipedia.org/w/index.php?title=Triangular_number&oldid=1195279122](https://en.wikipedia.org/w/index.php?title=Triangular_number&oldid=1195279122).
|
||||
<!--ID: 1709419325963-->
|
||||
END%%
|
||||
|
@ -221,7 +221,7 @@ END%%
|
|||
Basic
|
||||
Where in Pascal's triangle are the triangular numbers embedded?
|
||||
Back: Along the third leftward diagonal:
|
||||
![[pascals-triangle.webp]]
|
||||
![[pascals-triangle.png]]
|
||||
Reference: “Triangular Number,” in _Wikipedia_, January 13, 2024, [https://en.wikipedia.org/w/index.php?title=Triangular_number&oldid=1195279122](https://en.wikipedia.org/w/index.php?title=Triangular_number&oldid=1195279122).
|
||||
<!--ID: 1709419325970-->
|
||||
END%%
|
||||
|
|
|
@ -1093,7 +1093,7 @@ END%%
|
|||
%%ANKI
|
||||
Basic
|
||||
What names are usually given to the existentially quantified identifers in $\omega(g(n))$'s definition?
|
||||
Back: $n_0$.
|
||||
Back: $n_0$
|
||||
Reference: Thomas H. Cormen et al., *Introduction to Algorithms*, 3rd ed (Cambridge, Mass: MIT Press, 2009).
|
||||
<!--ID: 1709519002380-->
|
||||
END%%
|
||||
|
@ -1179,7 +1179,7 @@ END%%
|
|||
%%ANKI
|
||||
Basic
|
||||
What condition must $g(n)$ satisfy such that $\omega(g(n))$ is nonempty?
|
||||
Back: $g(n)$ must be asymptotically positive.
|
||||
Back: $g(n)$ must be asymptotically nonnegative.
|
||||
Reference: Thomas H. Cormen et al., *Introduction to Algorithms*, 3rd ed (Cambridge, Mass: MIT Press, 2009).
|
||||
<!--ID: 1709750359826-->
|
||||
END%%
|
||||
|
|
|
@ -333,9 +333,10 @@ Specifier | Description
|
|||
--------- | -----------
|
||||
`d`, `i` | a decimal `signed int`
|
||||
`u` | a decimal `unsigned int`
|
||||
`x` | a hexadecimal `unsigned int` (lowercase)
|
||||
`X` | a hexadecimal `unsigned int` (uppercase)
|
||||
`x`, `X` | a hexadecimal `unsigned int`
|
||||
`o` | an octal `unsigned int`
|
||||
`f`, `F` | a `double` in fixed-point notation
|
||||
`e`, `E` | a `double` in standard notation
|
||||
`s` | a `NUL`-terminated string
|
||||
`c` | a `char` character
|
||||
`p` | `void*` address in an implementation-defined format
|
||||
|
@ -452,6 +453,156 @@ Tags: printf
|
|||
<!--ID: 1707852083086-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Cloze
|
||||
The {`%f`} format specifier outputs a {lowercase fixed-point `double`}.
|
||||
Reference: “Printf,” in *Wikipedia*, January 18, 2024, [https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962](https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962).
|
||||
Tags: printf
|
||||
<!--ID: 1710450347005-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Cloze
|
||||
The {`%F`} format specifier outputs an {uppercase fixed-point `double`}.
|
||||
Reference: “Printf,” in *Wikipedia*, January 18, 2024, [https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962](https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962).
|
||||
Tags: printf
|
||||
<!--ID: 1710450347008-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What distinguishes format specifiers `%f` and `%F`?
|
||||
Back: The former outputs lowercase identifiers, the latter uppercase.
|
||||
Reference: “Printf,” in *Wikipedia*, January 18, 2024, [https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962](https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962).
|
||||
Tags: printf
|
||||
<!--ID: 1710450347010-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What three special identifiers might specifier `%f` output?
|
||||
Back: `inf`, `infinity`, and `nan`
|
||||
Reference: “Printf,” in *Wikipedia*, January 18, 2024, [https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962](https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962).
|
||||
Tags: printf
|
||||
<!--ID: 1710450347012-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What three special identifiers might specifier `%F` output?
|
||||
Back: `INF`, `INFINITY`, and `NAN`
|
||||
Reference: “Printf,” in *Wikipedia*, January 18, 2024, [https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962](https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962).
|
||||
Tags: printf
|
||||
<!--ID: 1710450452444-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
Which format specifier was probably used to yield `printf` output `inf`?
|
||||
Back: `%f`
|
||||
Reference: “Printf,” in *Wikipedia*, January 18, 2024, [https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962](https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962).
|
||||
Tags: printf
|
||||
<!--ID: 1710450347014-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Cloze
|
||||
{1:Fixed-point} notation is to {2:`%f`} whereas {2:standard/exponential} notation is to {1:`%e`}.
|
||||
Reference: “Printf,” in *Wikipedia*, January 18, 2024, [https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962](https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962).
|
||||
Tags: printf
|
||||
<!--ID: 1710450347015-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
Which format specifier was probably used to yield `printf` output `172.345000`?
|
||||
Back: `%f`
|
||||
Reference: “Printf,” in *Wikipedia*, January 18, 2024, [https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962](https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962).
|
||||
Tags: printf
|
||||
<!--ID: 1710450347017-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What term describes the kind of output notation corresponding to `%f`?
|
||||
Back: Fixed-point notation.
|
||||
Reference: “Printf,” in *Wikipedia*, January 18, 2024, [https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962](https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962).
|
||||
Tags: printf
|
||||
<!--ID: 1710450347018-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What distinguishes format specifiers `%e` and `%E`?
|
||||
Back: The former outputs an `e`, the latter an `E`.
|
||||
Reference: “Printf,” in *Wikipedia*, January 18, 2024, [https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962](https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962).
|
||||
Tags: printf
|
||||
<!--ID: 1710450347020-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
How many digits follows `e` in the output of `printf` specifier `%e`?
|
||||
Back: At least `2`.
|
||||
Reference: “Printf,” in *Wikipedia*, January 18, 2024, [https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962](https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962).
|
||||
Tags: printf
|
||||
<!--ID: 1710450452447-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
Which format specifier was probably used to yield `printf` output `1.723450e+02`?
|
||||
Back: `%e`
|
||||
Reference: “Printf,” in *Wikipedia*, January 18, 2024, [https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962](https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962).
|
||||
Tags: printf
|
||||
<!--ID: 1710450347022-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What is the default precision of `%f`?
|
||||
Back: `6`
|
||||
Reference: “Printf,” in *Wikipedia*, January 18, 2024, [https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962](https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962).
|
||||
Tags: printf
|
||||
<!--ID: 1710452502031-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What is the output of `printf("%e", 3.14)`?
|
||||
Back: `3.140000e00`
|
||||
Reference: “Printf,” in *Wikipedia*, January 18, 2024, [https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962](https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962).
|
||||
Tags: printf
|
||||
<!--ID: 1710450347023-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What is the output of `printf("%e", 314)`?
|
||||
Back: `3.140000e02`
|
||||
Reference: “Printf,” in *Wikipedia*, January 18, 2024, [https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962](https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962).
|
||||
Tags: printf
|
||||
<!--ID: 1710450347025-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What term describes the kind of output notation corresponding to `%e`?
|
||||
Back: Standard or exponential notation.
|
||||
Reference: “Printf,” in *Wikipedia*, January 18, 2024, [https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962](https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962).
|
||||
Tags: printf
|
||||
<!--ID: 1710450347026-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What is the default precision of `%e`?
|
||||
Back: `6`
|
||||
Reference: “Printf,” in *Wikipedia*, January 18, 2024, [https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962](https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962).
|
||||
Tags: printf
|
||||
<!--ID: 1710452502034-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Cloze
|
||||
The {`%o`} format specifier outputs an {octal `unsigned int`}.
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
Binary file not shown.
Before Width: | Height: | Size: 14 KiB |
|
@ -314,7 +314,7 @@ Basic
|
|||
```
|
||||
[ a₁ a₂ ... aᵢ | aᵢ₊₁ aᵢ₊₂ ... aₙ ]
|
||||
```
|
||||
Back: Values are in decreasing order.
|
||||
Back: Values are in non-increasing order.
|
||||
Reference: [https://leetcode.com/problems/next-permutation/description/](https://leetcode.com/problems/next-permutation/description/)
|
||||
<!--ID: 1709756610384-->
|
||||
END%%
|
||||
|
@ -336,7 +336,7 @@ Basic
|
|||
```
|
||||
[ a₁ a₂ ... aⱼ | aₙ ... aᵢ ... aᵢ₊₂ aᵢ₊₁ ]
|
||||
```
|
||||
Back: Values are in decreasing order.
|
||||
Back: Values are in non-increasing order.
|
||||
Reference: [https://leetcode.com/problems/next-permutation/description/](https://leetcode.com/problems/next-permutation/description/)
|
||||
<!--ID: 1709756610399-->
|
||||
END%%
|
||||
|
|
|
@ -643,7 +643,7 @@ END%%
|
|||
|
||||
## Casting
|
||||
|
||||
Most implementations of C cast an object of one type to another by simply re-interpreting the object's binary representation. This casting may happen implicitly if comparing or operating on e.g. `signed` and `unsigned` objects in the same expression. $T2U$ and $U2T$ reflect this method of casting:
|
||||
Most implementations of C cast an object of `signed` type to `unsigned` type and vice versa, most implementations simply re-interpret the object's binary representation. This casting may happen implicitly if comparing or operating on `signed` and `unsigned` objects in the same expression. $T2U$ and $U2T$ reflect this method of casting:
|
||||
|
||||
$$T2U_w(x) = \begin{cases}
|
||||
x + 2^w & x < 0 \\
|
||||
|
@ -657,7 +657,7 @@ x - 2^w & x > TMax_w
|
|||
|
||||
%%ANKI
|
||||
Basic
|
||||
How do most implementations of C perform casting?
|
||||
How do most implementations of C perform casting of `signed` and `unsigned` types?
|
||||
Back: As a reinterpretation of the same byte pattern of the object being casted.
|
||||
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
|
||||
Tags: c17
|
||||
|
@ -1714,7 +1714,7 @@ END%%
|
|||
%%ANKI
|
||||
Basic
|
||||
What pre-processing step is done when multiplying to a $w$-bit two's-complement result by hand?
|
||||
Back: Sign extend the factors to width $w$.
|
||||
Back: Sign extend the factors to width $2w$.
|
||||
Reference: “Two’s-Complement.” In *Wikipedia*, January 9, 2024. [https://en.wikipedia.org/w/index.php?title=Two%27s_complement&oldid=1194543561](https://en.wikipedia.org/w/index.php?title=Two%27s_complement&oldid=1194543561).
|
||||
<!--ID: 1709563221449-->
|
||||
END%%
|
||||
|
|
|
@ -0,0 +1,197 @@
|
|||
---
|
||||
title: References
|
||||
TARGET DECK: Obsidian::STEM
|
||||
FILE TAGS: git
|
||||
tags:
|
||||
- git
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
A **reference** is essentially a file containing an oid. The name of the file can then be used to reference the oid. A **symbolic reference** is a file containing the name of another reference.
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What is a git ref?
|
||||
Back: A user-friendly name for referring to some git object.
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454031260-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
How is a git ref realized on disk?
|
||||
Back: It is a file containing an oid.
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454031263-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What shorter terminology refers to "git references"?
|
||||
Back: Git refs.
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454031266-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
Where on disk are git refs stored?
|
||||
Back: In the `.git/refs` directory.
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454031269-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
Where on disk are git local branch refs stored?
|
||||
Back: `.git/refs/heads`
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454031271-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
Where on disk are git remote branch refs stored?
|
||||
Back: `.git/refs/remotes`
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454031273-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Cloze
|
||||
The {`update-ref`} plumbing command is used to manage {reference files}.
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454031275-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
Why is the `update-ref` command's name a slight misnomer?
|
||||
Back: It is also used to create references.
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454031277-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What plumbing command is used in favor of manually editing reference files?
|
||||
Back: `update-ref`
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454031279-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
How do I complete the following command to update `master` to the new oid?
|
||||
```bash
|
||||
$ git update-ref ___ 1a410efbd13591db07496601ebc7a059dd55cfe9
|
||||
```
|
||||
Back: `refs/heads/master`
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454031281-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
Git (basically) invokes what plumbing command on new branch creation?
|
||||
Back: `update-ref`
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454031283-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What is a git symbolic ref?
|
||||
Back: A git ref that points to another ref (as opposed to an oid).
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454758061-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
Which symbolic ref is most commonly used?
|
||||
Back: `HEAD`
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454758064-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What does it mean to be in "detached head state"?
|
||||
Back: `HEAD` refers to an oid instead of another ref.
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454758066-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What term describes when `HEAD` is a normal ref instead of a symbolic ref?
|
||||
Back: Detached head state.
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454758068-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
Where on disk is `HEAD` normally located?
|
||||
Back: `.git/HEAD`
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454758070-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What does the contents of `.git/HEAD` normally look like?
|
||||
Back: `ref: refs/heads/<BRANCH>`
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454758071-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What does the contents of `.git/HEAD` look like in detached head state?
|
||||
Back: `<OID>`
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454758073-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What plumbing command is used in favor of manually editing symbolic reference files?
|
||||
Back: `symbolic-ref`
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454758074-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Cloze
|
||||
Normal refs are to {`update-ref`} whereas symbolic refs are to {`symbolic-ref`}.
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454758076-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Cloze
|
||||
The {`symbolic-ref`} plumbing command is used to manage {symbolic reference files}.
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454758077-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
How do you correctly write the following command?
|
||||
```bash
|
||||
$ git symbolic-ref HEAD test
|
||||
```
|
||||
Back:
|
||||
```bash
|
||||
$ git symbolic-ref HEAD refs/heads/test
|
||||
```
|
||||
Reference: Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
||||
<!--ID: 1710454758079-->
|
||||
END%%
|
||||
|
||||
## References
|
||||
|
||||
* Scott Chacon, *Pro Git*, Second edition, The Expert’s Voice in Software Development (New York, NY: Apress, 2014).
|
|
@ -39,7 +39,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Basic
|
||||
How many members must satisfy a property in existential quantification?
|
||||
How many members in the domain of discourse must satisfy a property in existential quantification?
|
||||
Back: At least one.
|
||||
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
|
||||
<!--ID: 1707494819967-->
|
||||
|
@ -81,7 +81,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Basic
|
||||
How many members must satisfy a property in universal quantification?
|
||||
How many members in the domain of discourse must satisfy a property in universal quantification?
|
||||
Back: All of them.
|
||||
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
|
||||
<!--ID: 1707494819973-->
|
||||
|
|
Loading…
Reference in New Issue