Rearrange files.
parent
a480e48e3b
commit
4ad55dc8bf
|
@ -97,7 +97,7 @@
|
|||
"c/escape-sequences.md": "7b4bbf159908320249158acfe47a9074",
|
||||
"c/index.md": "a021c92f19831bdd2bca4cbf813882fe",
|
||||
"gawk/index.md": "e4da41ba6a2c2602d9f15f2930608e3c",
|
||||
"gawk/variables.md": "6797b75269d1e6c6a5f3fe8c4a029f8f",
|
||||
"gawk/variables.md": "8274b72f2a3ae6d0dda15a0b0b4dde45",
|
||||
"index.md": "e48e895feeed7046425bb2ee15419770",
|
||||
"journal/2024-01-31.md": "7c7fbfccabc316f9e676826bf8dfe970",
|
||||
"journal/2024-02-01.md": "3aa232387d2dc662384976fd116888eb",
|
||||
|
@ -109,7 +109,7 @@
|
|||
"nix/callPackage.md": "140a02e57cd01d646483e3c21d72243d",
|
||||
"nix/index.md": "4efc7fcc4ea22834ba595497e5fb715c",
|
||||
"posix/index.md": "97b1b8ecb9a953e855a9acf0ab25b8c8",
|
||||
"posix/signals.md": "df397d7198c6904d26396a79c72e32a0",
|
||||
"posix/signals.md": "51b7399fa84a9528e319a758017013f9",
|
||||
"templates/daily.md": "7866014e730e85683155207a02e367d8",
|
||||
"posix/regexp.md": "f5fb177c7356faf1bf768023c2563c54",
|
||||
"journal/2024-02-04.md": "e2b5678fc53d7284b71ed6820c02b954",
|
||||
|
@ -175,7 +175,7 @@
|
|||
"algorithms/binary-search.md": "dbbaf8d4be7aabef1ed232c1906b4c99",
|
||||
"_journal/2024-02-17.md": "7c37cb10515ed3d2f5388eaf02a67048",
|
||||
"_journal/2024-02/2024-02-16.md": "e701902e369ec53098fc2deed4ec14fd",
|
||||
"binary/integer-encoding.md": "81b7d429c05b5bc95c0b3d4d8d3e27f0",
|
||||
"binary/integer-encoding.md": "7ace6ab6c5a4191ae0abdfe7e5abb6a2",
|
||||
"combinatorics/index.md": "9a85e8858c50c9797243d6d01e1dcbe7",
|
||||
"_journal/2024-02-18.md": "67e36dbbb2cac699d4533b5a2eaeb629",
|
||||
"_journal/2024-02/2024-02-17.md": "7c37cb10515ed3d2f5388eaf02a67048",
|
||||
|
@ -184,13 +184,13 @@
|
|||
"_journal/2024-02-19.md": "30d16c5373deb9cb128d2e7934ae256a",
|
||||
"_journal/2024-02/2024-02-18.md": "67e36dbbb2cac699d4533b5a2eaeb629",
|
||||
"combinatorics/permutations.md": "7ff83dd8784eb08fc9389d38adc8862c",
|
||||
"combinatorics/combinations.md": "a080e43827e792e100fcc8df2f280a4b",
|
||||
"combinatorics/combinations.md": "b53ac22d03941b697597377c7c8da346",
|
||||
"_journal/2024-02-20.md": "b85ba0eeeb16e30a602ccefabcc9763e",
|
||||
"_journal/2024-02/2024-02-19.md": "df1a9ab7ab89244021b3003c84640c78",
|
||||
"combinatorics/inclusion-exclusion.md": "ca5c967be774ce204f1ca47cc8df14b8",
|
||||
"_journal/2024-02-21.md": "b9d944ecebe625da5dd72aeea6a916a2",
|
||||
"_journal/2024-02/2024-02-20.md": "af2ef10727726200c4defe2eafc7d841",
|
||||
"algebra/radices.md": "0fcd901c798eaed8075ff1375e2429dd",
|
||||
"algebra/radices.md": "88c6c5657eca99f3d274f0c3fc0e3af0",
|
||||
"_journal/2024-02-22.md": "e01f1d4bd2f7ac2a667cdfd500885a2a",
|
||||
"_journal/2024-02/2024-02-21.md": "f423137ae550eb958378750d1f5e98c7",
|
||||
"_journal/2024-02-23.md": "219ce9ad15a8733edd476c97628b71fd",
|
||||
|
@ -198,7 +198,7 @@
|
|||
"c17/strings.md": "6bc3f41f111a7386b1abb2a196f1c683",
|
||||
"c17/index.md": "78576ee41d0185df82c59999142f4edb",
|
||||
"c17/escape-sequences.md": "ebc63c6cdfbe60bbc2708c1b0c8da8bb",
|
||||
"c17/declarations.md": "46b135d583a992991c889d518fec1c0f",
|
||||
"c17/declarations.md": "20e200f2b7abcab8f873cd080f4c9770",
|
||||
"algorithms/sorting/merge-sort.md": "f66f482e5bd551c765fcba564c938d67",
|
||||
"_journal/2024-02-24.md": "9bb319d5014caf962a9ce3141076cff4",
|
||||
"_journal/2024-02/2024-02-23.md": "0aad297148e8cc4058b48b7e45787ca7",
|
||||
|
@ -207,7 +207,9 @@
|
|||
"_journal/2024-02-26.md": "ccbee662c1b2c42027bce1ed6f9a5ac4",
|
||||
"_journal/2024-02/2024-02-25.md": "426be827fe8483e4ab432304a2aa6df3",
|
||||
"_journal/2024-02-27.md": "851180f1f7c1aaacd4c0b0ec2639bdf2",
|
||||
"_journal/2024-02/2024-02-26.md": "417b84be5d96f9d8adcdedca3b68b141"
|
||||
"_journal/2024-02/2024-02-26.md": "417b84be5d96f9d8adcdedca3b68b141",
|
||||
"_journal/2024-02-28.md": "3d69115853814aaff435b3a4c05f97b7",
|
||||
"_journal/2024-02/2024-02-27.md": "f75a0d04a875aeee932343dae0c78768"
|
||||
},
|
||||
"fields_dict": {
|
||||
"Basic": [
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
---
|
||||
title: "2024-02-27"
|
||||
---
|
||||
|
||||
- [x] Anki Flashcards
|
||||
- [x] KoL
|
||||
- [ ] Sheet Music (10 min.)
|
||||
- [x] Go (1 Life & Death Problem)
|
||||
- [ ] Korean (Read 1 Story)
|
||||
- [ ] Interview Prep (1 Practice Problem)
|
||||
- [x] Log Work Hours (Max 3 hours)
|
||||
|
||||
* Added many flashcards on $\Theta$-, $O$-, and $\Omega$-notation.
|
||||
* Yet more notes on two's-complement.
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
title: "2024-02-28"
|
||||
---
|
||||
|
||||
- [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)
|
||||
|
||||
* 101weiqi (serial numbers)
|
||||
* Q-314990
|
||||
* Q-264202
|
||||
* Q-305178
|
||||
* Q-51685
|
||||
* Q-11821
|
||||
* Q-5014
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
title: "2024-02-27"
|
||||
---
|
||||
|
||||
- [x] Anki Flashcards
|
||||
- [x] KoL
|
||||
- [ ] Sheet Music (10 min.)
|
||||
- [x] Go (1 Life & Death Problem)
|
||||
- [x] Korean (Read 1 Story)
|
||||
- [x] Interview Prep (1 Practice Problem)
|
||||
- [x] Log Work Hours (Max 3 hours)
|
||||
|
||||
* Added many flashcards on $\Theta$-, $O$-, and $\Omega$-notation.
|
||||
* Yet more notes on two's-complement.
|
||||
* Read 견우와 직녀 (The Story of Gyeon-Uh and Jik-Nyeo).
|
||||
* Leetcode Problems
|
||||
* [Divide Two Integers](https://leetcode.com/problems/divide-two-integers)
|
||||
* [Find the Index of the First Occurrence in a String](https://leetcode.com/problems/find-the-index-of-the-first-occurrence-in-a-string/)
|
|
@ -20,8 +20,15 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Basic
|
||||
What does the first step in the subtraction process of $100_2 - 10_2$ *look* like?
|
||||
Back: $020_2 - 10_2$
|
||||
What does the process of "borrowing" in subtraction $100_2 - 10_2$ *look* like?
|
||||
Back:
|
||||
```
|
||||
2
|
||||
000
|
||||
- 10
|
||||
-----
|
||||
010
|
||||
```
|
||||
Reference: “Radix,” in *Wikipedia*, August 6, 2023, [https://en.wikipedia.org/w/index.php?title=Radix&oldid=1169046173](https://en.wikipedia.org/w/index.php?title=Radix&oldid=1169046173).
|
||||
<!--ID: 1708534662989-->
|
||||
END%%
|
||||
|
|
|
@ -3,3 +3,39 @@ title: Bash
|
|||
tags:
|
||||
- bash
|
||||
---
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
How do you escape a `'` within a single-quote string?
|
||||
Back: This is impossible.
|
||||
Reference: Robbins, Arnold D. “GAWK: Effective AWK Programming,” October 2023. [https://www.gnu.org/software/gawk/manual/gawk.pdf](https://www.gnu.org/software/gawk/manual/gawk.pdf)
|
||||
<!--ID: 1706816752230-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What does the null string refer to?
|
||||
Back: The empty string, i.e. `""`.
|
||||
Reference: Robbins, Arnold D. “GAWK: Effective AWK Programming,” October 2023. [https://www.gnu.org/software/gawk/manual/gawk.pdf](https://www.gnu.org/software/gawk/manual/gawk.pdf)
|
||||
<!--ID: 1706816752237-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
When does Bash remove null strings from a command?
|
||||
Back: When they occur as part of a non-null command-line argument.
|
||||
Reference: Robbins, Arnold D. “GAWK: Effective AWK Programming,” October 2023. [https://www.gnu.org/software/gawk/manual/gawk.pdf](https://www.gnu.org/software/gawk/manual/gawk.pdf)
|
||||
<!--ID: 1706816752241-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
Why does the following not work correctly?
|
||||
```bash
|
||||
$ # -F specifies the field separator
|
||||
$ awk -F"" 'program' files
|
||||
```
|
||||
Back: Bash removes the null string before executing the command.
|
||||
Reference: Robbins, Arnold D. “GAWK: Effective AWK Programming,” October 2023. [https://www.gnu.org/software/gawk/manual/gawk.pdf](https://www.gnu.org/software/gawk/manual/gawk.pdf)
|
||||
<!--ID: 1706816764555-->
|
||||
END%%
|
|
@ -1,47 +0,0 @@
|
|||
---
|
||||
title: Quoting
|
||||
TARGET DECK: Obsidian::STEM
|
||||
FILE TAGS: bash
|
||||
tags:
|
||||
- bash
|
||||
---
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
How do you escape a `'` within a single-quote string?
|
||||
Back: This is impossible.
|
||||
Reference: Robbins, Arnold D. “GAWK: Effective AWK Programming,” October 2023. [https://www.gnu.org/software/gawk/manual/gawk.pdf](https://www.gnu.org/software/gawk/manual/gawk.pdf)
|
||||
<!--ID: 1706816752230-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What does the null string refer to?
|
||||
Back: The empty string, i.e. `""`.
|
||||
Reference: Robbins, Arnold D. “GAWK: Effective AWK Programming,” October 2023. [https://www.gnu.org/software/gawk/manual/gawk.pdf](https://www.gnu.org/software/gawk/manual/gawk.pdf)
|
||||
<!--ID: 1706816752237-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
When does Bash remove null strings from a command?
|
||||
Back: When they occur as part of a non-null command-line argument.
|
||||
Reference: Robbins, Arnold D. “GAWK: Effective AWK Programming,” October 2023. [https://www.gnu.org/software/gawk/manual/gawk.pdf](https://www.gnu.org/software/gawk/manual/gawk.pdf)
|
||||
<!--ID: 1706816752241-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
Why does the following not work correctly?
|
||||
```bash
|
||||
$ # -F specifies the field separator
|
||||
$ awk -F"" 'program' files
|
||||
```
|
||||
Back: Bash removes the null string before executing the command.
|
||||
Reference: Robbins, Arnold D. “GAWK: Effective AWK Programming,” October 2023. [https://www.gnu.org/software/gawk/manual/gawk.pdf](https://www.gnu.org/software/gawk/manual/gawk.pdf)
|
||||
<!--ID: 1706816764555-->
|
||||
END%%
|
||||
|
||||
## References
|
||||
|
||||
* Robbins, Arnold D. “GAWK: Effective AWK Programming,” October 2023. [https://www.gnu.org/software/gawk/manual/gawk.pdf](https://www.gnu.org/software/gawk/manual/gawk.pdf)
|
|
@ -184,7 +184,7 @@ END%%
|
|||
%%ANKI
|
||||
Basic
|
||||
Is declaration `char` signed or unsigned?
|
||||
Back: Unknown.
|
||||
Back: This is implementation-dependent.
|
||||
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
|
||||
<!--ID: 1707493017239-->
|
||||
END%%
|
||||
|
|
|
@ -410,7 +410,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Basic
|
||||
What *is* the distribution corresponding to the following stars and bars chart? $$*||*$$
|
||||
What distribution does the following stars and bars chart represent? $$*||*$$
|
||||
Back: A single object in the first and last bucket. No object in the middle.
|
||||
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: 1708532069719-->
|
||||
|
|
|
@ -94,7 +94,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Basic
|
||||
According to the C standard, Is `unsigned` underflow/overflow safe?
|
||||
According to the C standard, Is `unsigned` overflow well-defined?
|
||||
Back: Yes
|
||||
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
|
||||
<!--ID: 1708551236389-->
|
||||
|
@ -102,7 +102,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Basic
|
||||
According to the C standard, Is `signed` underflow/overflow safe?
|
||||
According to the C standard, Is `signed` overflow well-defined?
|
||||
Back: No
|
||||
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
|
||||
<!--ID: 1708551236392-->
|
||||
|
@ -127,7 +127,7 @@ END%%
|
|||
%%ANKI
|
||||
Basic
|
||||
*Why* is it $UMax = 2 \cdot TMax + 1$?
|
||||
Back: All bit patterns denoting negative numbers in two's-complement are positive in unsigned encoding.
|
||||
Back: All bit strings representing negative numbers in two's-complement are positive in unsigned encoding.
|
||||
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
|
||||
<!--ID: 1708613447880-->
|
||||
END%%
|
||||
|
@ -308,16 +308,16 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Basic
|
||||
How does `n` relate to `~n` in unsigned encoding?
|
||||
Back: `~n = UMax - n`
|
||||
How does $n$ relate to $\textasciitilde n$ in unsigned encoding?
|
||||
Back: $n + \textasciitilde n = UMax$
|
||||
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: 1708545383259-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
Using unsigned encoding, *why* does `n + ~n = UMax`?
|
||||
Back: Because this always yields a bit string of all `1`s.
|
||||
Using unsigned encoding, *why* does $n + \textasciitilde n = UMax$?
|
||||
Back: Because the sum always yields a bit string of all `1`s.
|
||||
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: 1708545574154-->
|
||||
END%%
|
|
@ -259,7 +259,7 @@ END%%
|
|||
Cloze
|
||||
{`FS`} is to `awk` as {`IFS`} is to Bash.
|
||||
Reference: Robbins, Arnold D. “GAWK: Effective AWK Programming,” October 2023. [https://www.gnu.org/software/gawk/manual/gawk.pdf](https://www.gnu.org/software/gawk/manual/gawk.pdf)
|
||||
/END%%
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
|
|
|
@ -158,6 +158,8 @@ END%%
|
|||
|
||||
### SIGILL (4)
|
||||
|
||||
Indicates the CPU encountered an instruction it does not understand or does not have permission to execute. Can often indicate corruption in some way or perhaps an attempt to execute data instead of code.
|
||||
|
||||
%%ANKI
|
||||
Cloze
|
||||
Signal {`SIGILL`} corresponds to number {4}.
|
||||
|
@ -197,6 +199,52 @@ Reference: Dowling, “A List of Signals and What They Mean.”
|
|||
<!--ID: 1708812571668-->
|
||||
END%%
|
||||
|
||||
### SIGABRT (6)
|
||||
|
||||
A signal, usually sent when the process itself invokes `abort()`. Indicates an "emergency stop".
|
||||
|
||||
%%ANKI
|
||||
Cloze
|
||||
Signal {`SIGABRT`} corresponds to number {6}.
|
||||
Reference: Dowling, “A List of Signals and What They Mean.”
|
||||
<!--ID: 1709131892335-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What function is usually used to invoke `SIGABRT`?
|
||||
Back: `abort()`
|
||||
Reference: Dowling, “A List of Signals and What They Mean.”
|
||||
Tags: c17
|
||||
<!--ID: 1709131892339-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What signal corresponds to the idea of an "emergency stop"?
|
||||
Back: `SIGABRT`
|
||||
Reference: Dowling, “A List of Signals and What They Mean.”
|
||||
<!--ID: 1709131892342-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
Which header contains the `abort()` function prototype?
|
||||
Back: `<stdlib.h>`
|
||||
Reference: N/A
|
||||
Tags: c17
|
||||
<!--ID: 1709131892345-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What distinguishes `abort()` from `exit()`?
|
||||
Back: The former sends a `SIGABRT` signal. The latter closes the application normally.
|
||||
Reference: N/A
|
||||
Tags: c17
|
||||
<!--ID: 1709131892349-->
|
||||
END%%
|
||||
|
||||
## References
|
||||
|
||||
* Cooper, Mendel. “Advanced Bash-Scripting Guide,” n.d., 916.
|
||||
|
|
Loading…
Reference in New Issue