add extra and exercise slide themes, apply to 13 and 14

main
borb 3 weeks ago
parent cc779adf08
commit 7d02fbcc82

@ -42,4 +42,22 @@
.tableborderless td, th {
border: none!important;
border-collapse: collapse;
}
}
section.extra {
background-color: #5d275d;
background-image: linear-gradient(to bottom, #401a40, #1d0c1d);
color: white;
}
section.extra a {
color: rgb(145, 255, 209);
}
section.exercise {
background-color: #29366f;
background-image: linear-gradient(to bottom, #20636a, #173742);
color: white;
}
section.exercise a {
color: rgb(211, 173, 255);
}

@ -83,7 +83,7 @@ GenericMethodExample&lt;<span class="hljs-built_in">string</span>&gt;(<span clas
<li data-marpit-fragment="1"><em><strong>Note:</strong></em> You could name the generic type as anything, e.g. <code>&lt;GenericType&gt;</code>. It is named <code>&lt;T&gt;</code> by convention.</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="6" data-paginate="true" data-class="invert" data-background-color="#29366f" data-heading-divider="5" lang="en-US" class="invert" data-marpit-pagination="6" style="--paginate:true;--class:invert;--background-color:#29366f;--heading-divider:5;background-color:#29366f;background-image:none;" data-marpit-pagination-total="29">
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="6" data-paginate="true" data-class="exercise" data-heading-divider="5" lang="en-US" class="exercise" data-marpit-pagination="6" style="--paginate:true;--class:exercise;--heading-divider:5;" data-marpit-pagination-total="29">
<h2 id="exercise-1-initializing-a-populated-list">Exercise 1: Initializing a populated list</h2>
<p>Create a generic method <code>GetPopulatedList&lt;T&gt;</code> which takes two parameters: <code>T value</code> and <code>int length</code>, and returns a new list of type <code>T</code> which is populated with the <code>value</code> variables and has a length of <code>length</code>.</p>
@ -496,7 +496,7 @@ Console.WriteLine(userArray.First(GetUserWithId).Name); <span class="hljs-com
</div>
</div>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="27" data-marpit-fragments="4" data-paginate="true" data-class="invert" data-background-color="#29366f" data-heading-divider="5" lang="en-US" class="invert" data-marpit-pagination="27" style="--paginate:true;--class:invert;--background-color:#29366f;--heading-divider:5;background-color:#29366f;background-image:none;" data-marpit-pagination-total="29">
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="27" data-marpit-fragments="4" data-paginate="true" data-class="exercise" data-heading-divider="5" lang="en-US" class="exercise" data-marpit-pagination="27" style="--paginate:true;--class:exercise;--heading-divider:5;" data-marpit-pagination-total="29">
<h2 id="exercise-2-filtering-names">Exercise 2: Filtering Names</h2>
<ul>
@ -506,7 +506,7 @@ Console.WriteLine(userArray.First(GetUserWithId).Name); <span class="hljs-com
<li data-marpit-fragment="4">If there are less than 10 resulting names, print the names as well!</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="28" data-marpit-fragments="5" data-paginate="true" data-class="invert" data-background-color="#29366f" data-heading-divider="5" lang="en-US" class="invert" data-marpit-pagination="28" style="--paginate:true;--class:invert;--background-color:#29366f;--heading-divider:5;background-color:#29366f;background-image:none;" data-marpit-pagination-total="29">
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="28" data-marpit-fragments="5" data-paginate="true" data-class="exercise" data-heading-divider="5" lang="en-US" class="exercise" data-marpit-pagination="28" style="--paginate:true;--class:exercise;--heading-divider:5;" data-marpit-pagination-total="29">
<h2 id="exercise-3-queries-on-object-lists">Exercise 3: Queries on Object Lists</h2>
<ul>
@ -517,8 +517,9 @@ Console.WriteLine(userArray.First(GetUserWithId).Name); <span class="hljs-com
<li data-marpit-fragment="5">Print the names and id:s of the users in the sorted list</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="29" data-marpit-fragments="3" data-paginate="true" data-class="invert" data-heading-divider="5" lang="en-US" class="invert" data-marpit-pagination="29" style="--paginate:true;--class:invert;--heading-divider:5;" data-marpit-pagination-total="29">
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="29" data-marpit-fragments="3" data-paginate="true" data-class="extra" data-heading-divider="5" lang="en-US" class="extra" data-marpit-pagination="29" style="--paginate:true;--class:extra;--heading-divider:5;" data-marpit-pagination-total="29">
<h2 id="going-further-extension-methods">Going Further: Extension Methods</h2>
<ul>
<li data-marpit-fragment="1">Recap: <code>IEnumerable</code> itself only contains one method</li>
<li data-marpit-fragment="2">How does the LINQ library suddenly add all these methods to our Enumerables?</li>

@ -86,7 +86,7 @@ GenericMethodExample<string>("ABC");
* ***Note:*** You could name the generic type as anything, e.g. `<GenericType>`. It is named `<T>` by convention.
## Exercise 1: Initializing a populated list
<!-- _backgroundColor: #29366f -->
<!-- _class: exercise -->
Create a generic method `GetPopulatedList<T>` which takes two parameters: `T value` and `int length`, and returns a new list of type `T` which is populated with the `value` variables and has a length of `length`.
@ -437,7 +437,7 @@ No error!
## Exercise 2: Filtering Names
<!-- _backgroundColor: #29366f -->
<!-- _class: exercise -->
* Download this file of names and add it to your project folder: [https://raw.githubusercontent.com/dominictarr/random-name/master/names.txt](https://raw.githubusercontent.com/dominictarr/random-name/master/names.txt)
* Read all the contents into a string array with `File.ReadAllLines()`
@ -445,7 +445,7 @@ No error!
* If there are less than 10 resulting names, print the names as well!
## Exercise 3: Queries on Object Lists
<!-- _backgroundColor: #29366f -->
<!-- _class: exercise -->
* Expand on the exercise 2.
* Create a new class User with two properties, int Id and string Name
@ -454,6 +454,7 @@ No error!
* Print the names and id:s of the users in the sorted list
## Going Further: Extension Methods
<!-- _class: extra -->
* Recap: `IEnumerable` itself only contains one method
* How does the LINQ library suddenly add all these methods to our Enumerables?

File diff suppressed because one or more lines are too long

@ -94,8 +94,7 @@ title: 14. Exceptions, Threads and Tasks
```
## Exercise 1: Debugging Exceptions
<!-- _backgroundColor: #29366f -->
<!-- _class: exercise -->
Create a savings calculator which asks the user for a target amount of money the user is aiming for (in integers), and the users monthly salary. For parsing, use the int.Parse() method instead of int.TryParse().
@ -204,7 +203,7 @@ The method keeps executing indefinitely, but the main thread continues execution
```
## Exercise 2: Threaded Loading
<!-- _backgroundColor: #29366f -->
<!-- _class: exercise -->
Create a method `public static void LoadData()` which simulates loading resources by printing progress from $0 \%$ to $100 \%$. Increase the progress in a loop with $1 \%$ increments. Use the `Thread.Sleep()` method to wait $10\,\mathrm{ms}$ between each increment.
@ -279,7 +278,7 @@ class Program
</div>
## Exercise 3: Asynchronous Loading
<!-- _backgroundColor: #29366f -->
<!-- _class: exercise -->
Re-create the exercise 2, but instead of using separate threads for "loading the data", use an asynchronous method `LoadDataAsync()`

Loading…
Cancel
Save