Skip to content

Commit f5e1281

Browse files
authored
Fix slide template (#90)
* Fix slide template * Add minor fixes to some slides * Ignore some sites for link checker in CI
1 parent bcf6cd3 commit f5e1281

12 files changed

+293
-252
lines changed

.github/mcl_config.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
{
2-
"aliveStatusCodes": [200, 206, 403]
2+
"aliveStatusCodes": [200, 206, 403],
3+
"ignorePatterns": [
4+
{
5+
"bazel": "^https://bazel.build",
6+
"make": "^https://makefiletutorial.com"
7+
}
8+
]
39
}

lectures/associative_containers.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
marp: true
33
math: katex
44
theme: custom-theme
5-
footer: ![width:80px](images/C++ForYourselfIcon.png)
5+
paginate: true
66
---
77

88
# Associative containers
@@ -13,7 +13,7 @@ footer: ![width:80px](images/C++ForYourselfIcon.png)
1313
- `std::set`
1414
- `std::unordered_set`
1515

16-
### 📺 Watch the related [YouTube video](https://youtu.be/TCu76SYmVCg)!
16+
### 📺 Watch the related [YouTube video](https://youtu.be/TCu76SYmVCg)!
1717

1818
---
1919
# Special symbols used in slides
@@ -24,8 +24,8 @@ footer: ![width:80px](images/C++ForYourselfIcon.png)
2424
- ❌ - Whatever is marked with this is wrong
2525
- 🚨 - Alert! Important information!
2626
- 💡 - Hint or a useful exercise
27-
- 🔼1️⃣7️⃣ - Holds for this version of C++(here, `17`) and **above**
28-
- 🔽1️⃣1️⃣ - Holds for versions **until** this one C++(here, `11`)
27+
- 🔼1️⃣7️⃣ - Holds for this version of C++ (here, `17`) and **above**
28+
- 🔽1️⃣1️⃣ - Holds for versions **until** this one C++ (here, `11`)
2929

3030
Style (🎨) and software design (🎓) recommendations mostly come from [Google Style Sheet](https://google.github.io/styleguide/cppguide.html) and the [CppCoreGuidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines)
3131

@@ -36,7 +36,7 @@ Style (🎨) and software design (🎓) recommendations mostly come from [Google
3636
- Implemented _usually_ as a **Red-Black tree** (not guaranteed)
3737
- Key can be any type with operator `<` defined
3838
- By default takes two template parameters:
39-
<!--
39+
<!--
4040
`CPP_SETUP_START`
4141
#include <map>
4242
int main() {
@@ -49,7 +49,7 @@ Style (🎨) and software design (🎓) recommendations mostly come from [Google
4949
std::map<char, double> map_default{};
5050
```
5151
- We can also use `>` operator by creating the map like this:
52-
<!--
52+
<!--
5353
`CPP_SETUP_START`
5454
#include <map>
5555
int main() {
@@ -62,11 +62,11 @@ Style (🎨) and software design (🎓) recommendations mostly come from [Google
6262
std::map<int, float, std::greater<int>> map_greater{};
6363
```
6464
- Access, add, remove data in $\mathcal{O}(\log{}n)$
65-
65+
6666
---
6767
# Add data to `std::map`
6868
- We can create a map from data:
69-
<!--
69+
<!--
7070
`CPP_SETUP_START`
7171
#include <map>
7272
int main() {
@@ -79,7 +79,7 @@ Style (🎨) and software design (🎓) recommendations mostly come from [Google
7979
const std::map<int, double> map_explicit = {{42, 42.42}};
8080
```
8181
- 🔼1️⃣7️⃣
82-
<!--
82+
<!--
8383
`CPP_SETUP_START`
8484
#include <map>
8585
int main() {
@@ -102,8 +102,8 @@ Style (🎨) and software design (🎓) recommendations mostly come from [Google
102102
- Erase key: `my_map.erase(key);`
103103

104104
---
105-
106105
# Example using `std::map`
106+
<!-- _class: center_code -->
107107
```cpp
108108
#include <iostream>
109109
#include <map>
@@ -146,8 +146,7 @@ int main() {
146146
- Elements of `map2` not in `map1` are added to `map1`
147147
- Elements of `map2` with keys already in `map1` are ignored
148148
- Works for both: `std::map` and `std::unordered_map`:
149-
-
150-
<!--
149+
<!--
151150
`CPP_SETUP_START`
152151
#include <string>
153152
#include <map>
@@ -164,7 +163,7 @@ int main() {
164163
{"A", 4}, {"B", 2}, {"D", 4}};
165164
map1.merge(map2);
166165
```
167-
<!--
166+
<!--
168167
`CPP_SETUP_START`
169168
#include <string>
170169
#include <unordered_map>
@@ -213,4 +212,4 @@ We will cover the reason behind this in a later video!
213212

214213
---
215214

216-
![bg](https://fakeimg.pl/1280x1024/226699/fff/?text=Good%20luck!&font=bebas)
215+
![bg](https://fakeimg.pl/1280x1024/226699/fff/?text=Good%20luck!&font=bebas)

lectures/build_systems.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
marp: true
33
math: katex
44
theme: custom-theme
5-
# paginate: true
5+
paginate: true
66
footer: ![width:80px](images/C++ForYourselfIcon.png)
77
---
88

@@ -108,7 +108,7 @@ int main() {
108108
- Can have many targets with many dependencies
109109
- If `target` **file** exists and is **not older** than its `dependencies` --- **nothing happens**!
110110
- :bulb: This allows us to **avoid doing the work twice**!
111-
- :bulb: A very good `make` tutorial is [here](https://web.archive.org/web/20230826174108/https://makefiletutorial.com/)
111+
- :bulb: A very good `make` tutorial is [here](https://makefiletutorial.com/)
112112

113113
---
114114
# A [`Makefile`](code/make/simple_build/Makefile) to build C++ code

lectures/cmake.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ marp: true
33
math: katex
44
theme: custom-theme
55
paginate: true
6-
# footer: ![width:80px](images/C++ForYourselfIcon.png)
6+
footer: ![width:80px](images/C++ForYourselfIcon.png)
77
---
88

99
# CMake introduction
@@ -296,6 +296,7 @@ make -j8 # Run make with 8 threads
296296
- (generally any command that starts with `target_`)
297297

298298
---
299+
<!-- _backgroundColor: #0000 -->
299300
![bg width:100%](images/follow_deer.jpg)
300301

301302
---
@@ -362,9 +363,8 @@ Stay tuned for the `*_test.cpp` files in a later video :wink:
362363
```
363364
364365
---
365-
<!-- _paginate: false -->
366366
# The main `CMakeLists.txt` file
367-
`our_project/CMakeLists.txt`<br>
367+
`our_project/CMakeLists.txt`
368368
<!--
369369
`CPP_COPY_SNIPPET` our_project/CMakeLists.txt
370370
-->

lectures/control_structures.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
marp: true
33
math: katex
44
theme: custom-theme
5+
paginate: true
56
footer: ![width:80px](images/C++ForYourselfIcon.png)
67
---
78

@@ -11,7 +12,7 @@ footer: ![width:80px](images/C++ForYourselfIcon.png)
1112
- `if` statements and ternary operator
1213
- Loops: `for` and `while`
1314

14-
### 📺 Watch the related [YouTube video](https://youtu.be/jzgTxosgGIA)!
15+
### 📺 Watch the related [YouTube video](https://youtu.be/jzgTxosgGIA)!
1516

1617
---
1718
# Special symbols used in slides
@@ -55,9 +56,9 @@ if (STATEMENT) {
5556
- 💡 Curly brackets can be omitted for single-line statements
5657
<!--
5758
`CPP_SETUP_START`
58-
59+
5960
inline void DoThis(){}
60-
61+
6162
int main() {
6263
bool STATEMENT{};
6364
$PLACEHOLDER
@@ -91,7 +92,7 @@ if (STATEMENT) {
9192
```cpp
9293
bool condition = GetRandomTrueOrFalse();
9394
condition ? CallIfTrue() : CallIfFalse();
94-
```
95+
```
9596
- This is **equivalent** to the following `if` statement:
9697
<!--
9798
`CPP_SETUP_START`
@@ -276,7 +277,7 @@ for (int i = 0; i < kIterationCount; ++i) {
276277

277278
---
278279
# 🔼1️⃣1️⃣ Range for loop
279-
- ✅ Iterate over a standard containers with simpler syntax:
280+
- ✅ Iterate over a standard containers with simpler syntax:
280281
`std::array`, `std::vector`, or even `std::map`, *etc*.
281282
- Allows us to avoid mistakes with indices and shows intent
282283
<!--
@@ -351,7 +352,7 @@ for (int i = 0; i < kIterationCount; ++i) {
351352
// Do this forever
352353
}
353354
```
354-
355+
355356

356357
---
357358
# Exit loops and iterations
@@ -380,4 +381,4 @@ int main() {
380381
---
381382

382383

383-
![bg](https://fakeimg.pl/1280x1024/226699/fff/?text=Good%20luck!&font=bebas)
384+
![bg](https://fakeimg.pl/1280x1024/226699/fff/?text=Good%20luck!&font=bebas)

0 commit comments

Comments
 (0)