Skip to content

Commit

Permalink
Software tools, math
Browse files Browse the repository at this point in the history
- LaTeX, yabai, gdb
- Small cleanup to media folder
  • Loading branch information
jzkyu committed Nov 11, 2023
1 parent c724afc commit 42b1b7e
Show file tree
Hide file tree
Showing 28 changed files with 192 additions and 6 deletions.
5 changes: 5 additions & 0 deletions docs/Public/Math/Analysis/analysis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*See:* [[real analysis]], [[complex analysis]]

*Analysis* is like the formal, rigorous version of [[calculus]]. It takes the aspect taught in calculus classes and examines them more closely, seeking to generalize the rules of calculus and derive them from [[axioms]], or logically prove them. [^1]

[^1]: https://www.reddit.com/r/explainlikeimfive/comments/g4b4wd/eli5_what_is_real_analysis/
3 changes: 3 additions & 0 deletions docs/Public/Math/Analysis/real analysis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*Real analysis* deals with [[analysis]] of the functions of the [[real numbers]].

Topics include [[continuous]] functions, [[differentiation]], [[integral]], [[limit]], [[sequence]], and [[series]].
44 changes: 44 additions & 0 deletions docs/Public/Math/LaTeX cheat sheet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
`a_b`: $a_b$

`\mathbf{R}`: $\mathbf{R}$

`\mathbb{R}`: $\mathbb{R}$

`\frac{a}{b}`: $\frac{a}{b}$

`\{x\}`: $\{x\}$

`\cdot`: $\cdot$

`\in`: $\in$

`\subset`: $\subset$

`\cap`: $\cap$

`\cup`: $\cup$

`\emptyset`: $\emptyset$

`\begin{enumerate}`: Creates a numerated list

![[enumerate.png]]

`\exists`: $\exists$

`\forall`: $\forall$

`\therefore`: $\therefore$

`\x_{a}^{b}`: $x_{a}^{b}$

`\text{Hello World}`: $\text{Hello World}$

`\implies`: $\implies$







2 changes: 1 addition & 1 deletion docs/Public/Math/Logic/and.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ An *AND* of two or more [[literal]] is called a [[product]].
| 1 | 0 | 0 |
| 1 | 1 | 1 |

![[and.png.png]]
![[and.png]]

4 changes: 2 additions & 2 deletions docs/Public/Math/Logic/not.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ $!n$
| 0 | 1 |
| 1 | 0 |

![[not.png.png]]

![[not.png]]

![[not_transistor.png]]
2 changes: 1 addition & 1 deletion docs/Public/Math/Logic/or.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Truth table:

Logical circuit:

![[or.png.png]]
![[or.png]]
10 changes: 10 additions & 0 deletions docs/Public/Math/Proofs/principle of mathematical induction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*Principle of mathematical induction*, sometimes referred to as *strong mathematical induction*, is as follows:

Let $S$ be a subset of $\mathbb{N}$ with these two properties:
1. $1\in S$, and
2. for all $n\in \mathbb{N}$, if $n\in S$, then $n+1\in S$
Then $S = \mathbb{N}$.

In other words, to prove the statement: $p(n)$ is true for all $n\in \mathbb{N}$
- $p(1)$ is true (base)
- If $p(j)$ is true for all integers $1\le j \le m$, then $p(m+1)$ is true
Empty file.
1 change: 1 addition & 0 deletions docs/Public/Math/Sets/real numbers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*Real numbers* contain the set of [[rational numbers]] and [[irrational numbers]].
Binary file removed docs/Public/Media/FullAdder 1.png
Binary file not shown.
Binary file removed docs/Public/Media/HalfAdder 1.png
Binary file not shown.
Binary file not shown.
File renamed without changes
Binary file added docs/Public/Media/enumerate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file modified docs/Public/Media/not.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/Public/Media/not.png.png
Binary file not shown.
Binary file added docs/Public/Media/not_transistor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion docs/Public/Software/Computer Architecture/xor.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ $a$ ^ $b$
| 1 | 0 | 1 |
| 1 | 1 | 0 |

![[xor.png.png]]
![[xor.png]]
3 changes: 3 additions & 0 deletions docs/Public/Software/Engineering/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ The MINS problem solving model works like this:
- Solve
- After locating the bug, generate a solution and test it

- For production, probably better to disable the debug support and activate all possible optimization support
- Reduce size, increase performance




20 changes: 20 additions & 0 deletions docs/Public/Software/Networks/SSH cheat sheet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Log into UC Davis CSIF computers:
```bash
ssh [email protected]
```

Referencing files on the host:
```
host:[/path]
```
Transferring files from local to CSIF:
```bash
scp
```

Transfer files from CSIF to local:
```bash

```


75 changes: 75 additions & 0 deletions docs/Public/Software/Operating Systems/GDB.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
*GDB* stands for the [[GNU]] debugger, which helps finds errors like segmentation faults.

Canonical complication command line:
```bash
gcc [cflags] -o <output> <input
```

Optimize for speed: (-O2)

```bash
gcc -Wall -Werror -O2 -o myprogram main.c
```

Enable debugging support (-g):
```bash
gcc -Wall -Error -g myprogram main.c
```
- To balance performance with debugging experience use `-Og`
- Not recommended to use debugging along with other optimizations
- No optimization option is equivalent to `-O8`

Start GDB with the program to debug as an argument:
```bash
gdb myprogram
```

Running the program:
- Without any argument: `gdb run`
- With arguments: `gdb run argv1, argv2... `

GDB offers an interactive shell:
- Can ask `gdb help <argument>`

Possible scenarios:
1. Program doesn't have bugs
2. Best-case scenario: Segmentation fault
3. Worst-case scenario: Doesn't crash, but wrong output

Backtrace:
- First thing to do when getting a segfault
- Understand what is the sequence of calls that brought us there
```bash
gdb backtrace
```
Breakpoints:
- Stop the program during the execution at a designated point
- At a line:
```bash
gdb break string-test.c.:13
Breakpoint 1 at 0x4005ef: file string-test.c, line 13.
```
- At a function:
```bash
gdb b main
Breakpoint 1 at 0x40059f: file string-test.c, line 8
```
- At a condition:
```bash
gdb b string-test.c:13 if i == 5
```
- Show info of all declared breakpoints:
```
gdb info b
```
Dealing with Breakpoints:
- Once the program has stopped and the gdb shell is available, you can:
1. Continue the execution until the next breakpoint: `gdb continue` or `gdb c`
2. Execute only the next line of code and break again: `gdb step` or `gdb s`
3. Jump over function calls: `gdb next` or `gdb n`
- Tip: Typing `<enter>` in the interactive gdb shell repeats the last command
3 changes: 3 additions & 0 deletions docs/Public/Software/Operating Systems/segmentation fault.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
A *segmentation fault* occurs when a program attempts to access a memory location it is not allowed to access. [^1]

[^1]: https://en.wikipedia.org/wiki/Segmentation_fault
2 changes: 1 addition & 1 deletion docs/Public/Software/Tools/flowchart.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ Some building blocks are:
- Decision: Represents a question with a finite number of answers
- Terminal: Represents the beginning or ending of a chart

![[flowchart.png.png]]
![[flowchart.png]]

Think about what the program should accomplish in terms of inputs and outputs.
17 changes: 17 additions & 0 deletions docs/Public/Software/Tools/yabai cheat sheet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Change window focus within space:
- `alt` + `j/k/h/l`

Swap windows:
- `shift` + `alt` + `j/k/h/l`

Change focus between external displays:
- `alt` + `s/g`

Maximize a window:
- `shift` + `alt` + `m`

Balance windows:
- `shift` + `alt` + `e`

Start / stop / restart yabai:
- `ctrl` + `alt` + `q/s/r`
5 changes: 5 additions & 0 deletions docs/Public/Software/Tools/yabai.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*See:* [[yabai cheat sheet]]

*yabai* is a window tiling manager.

It is used with skhd to map keybinds to tiling functions.

0 comments on commit 42b1b7e

Please sign in to comment.