Skip to content

Commit 661c57e

Browse files
committed
Convert existing exercises to new environment.
1 parent 7b34cb7 commit 661c57e

File tree

21 files changed

+52
-52
lines changed

21 files changed

+52
-52
lines changed

talk/basicconcepts/auto.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727

2828
\begin{frame}[fragile]
2929
\frametitlecpp[98]{Loops, references, auto}
30-
\begin{alertblock}{Exercise}
30+
\begin{exercise}{Loops, references, auto}
3131
Familiarise yourself with range-based for loops and references
3232
\begin{itemize}
3333
\item go to \texttt{code/loopsRefsAuto}
3434
\item Look at \texttt{loopsRefsAuto.cpp}
3535
\item Compile it (\texttt{make}) and run the program (\texttt{./loopsRefsAuto})
3636
\item Work on the tasks that you find in \texttt{loopsRefsAuto.cpp}
3737
\end{itemize}
38-
\end{alertblock}
38+
\end{exercise}
3939
\end{frame}

talk/basicconcepts/control.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,13 +272,13 @@
272272

273273
\begin{frame}[fragile]
274274
\frametitlecpp[11]{Control structures}
275-
\begin{alertblock}{Exercise}
275+
\begin{exercise}{Control structures}
276276
Familiarise yourself with different kinds of control structures. Re-implement them in different ways.
277277
\begin{itemize}
278278
\item Go to \texttt{code/control}
279279
\item Look at \texttt{control.cpp}
280280
\item Compile it (\texttt{make}) and run the program (\texttt{./control})
281281
\item Work on the tasks that you find in \texttt{README.md}
282282
\end{itemize}
283-
\end{alertblock}
283+
\end{exercise}
284284
\end{frame}

talk/basicconcepts/functions.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,15 @@
202202

203203
\begin{frame}[fragile]
204204
\frametitlecpp[98]{Functions}
205-
\begin{alertblock}{Exercise}
205+
\begin{exercise}{Functions}
206206
Familiarise yourself with pass by value / pass by reference.
207207
\begin{itemize}
208208
\item go to \texttt{code/functions}
209209
\item Look at \texttt{functions.cpp}
210210
\item Compile it (\texttt{make}) and run the program (\texttt{./functions})
211211
\item Work on the tasks that you find in \texttt{functions.cpp}
212212
\end{itemize}
213-
\end{alertblock}
213+
\end{exercise}
214214
\end{frame}
215215

216216
\begin{frame}[fragile]

talk/concurrency/atomic.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@
116116

117117
\begin{frame}[fragile]
118118
\frametitle{Atomic types in \cpp}
119-
\begin{alertblock}{Exercise Time}
119+
\begin{exercise}{Atomics}
120120
\begin{itemize}
121121
\item Go to \texttt{code/atomic}
122122
\item You'll find a program with the same race condition as in \texttt{race}
123123
\item Fix it using \mintinline{cpp}{std::atomic}
124124
\end{itemize}
125-
\end{alertblock}
125+
\end{exercise}
126126
\end{frame}

talk/concurrency/condition.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@
102102

103103
\begin{frame}[fragile]
104104
\frametitle{Condition variables}
105-
\begin{alertblock}{Exercise Time}
105+
\begin{exercise}{Condition variables}
106106
\begin{itemize}
107107
\item Go to code/condition\_variable
108108
\item Look at the code and run it\\
109109
See that it has a race condition
110110
\item Fix the race condition in the usage of the condition variable
111111
\item Try to make threads process data in parallel
112112
\end{itemize}
113-
\end{alertblock}
113+
\end{exercise}
114114
\end{frame}

talk/concurrency/mutexes.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,15 @@
134134

135135
\begin{frame}[fragile]
136136
\frametitle{Mutexes and Locks}
137-
\begin{alertblock}{Exercise Time}
137+
\begin{exercise}{Mutexes and Locks}
138138
\begin{itemize}
139139
\item Go to code/race
140140
\item Look at the code and try it\\
141141
See that it has a race condition
142142
\item Use a mutex to fix the issue
143143
\item See the difference in execution time
144144
\end{itemize}
145-
\end{alertblock}
145+
\end{exercise}
146146
\end{frame}
147147

148148
\begin{frame}[fragile]

talk/morelanguage/constness.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@
9393

9494
\begin{frame}[fragile]
9595
\frametitlecpp[98]{constness}
96-
\begin{alertblock}{Exercise Time}
96+
\begin{exercise}{Constness}
9797
\begin{itemize}
9898
\item go to code/constness
9999
\item open constplay.cpp
100100
\item try to find out which lines won't compile
101101
\item check your guesses by compiling for real
102102
\end{itemize}
103-
\end{alertblock}
103+
\end{exercise}
104104
\end{frame}

talk/morelanguage/lambda.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,11 @@
344344

345345
\begin{frame}[fragile]
346346
\frametitlecpp[11]{Lambdas}
347-
\begin{alertblock}{Exercise Time}
347+
\begin{exercise}{Lambdas}
348348
\begin{itemize}
349349
\item go to code/lambdas
350350
\item look at the code (it's the solution to the stl exercise)
351351
\item use lambdas to simplify it
352352
\end{itemize}
353-
\end{alertblock}
353+
\end{exercise}
354354
\end{frame}

talk/morelanguage/move.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@
269269

270270
\begin{frame}[fragile]
271271
\frametitlecpp[11]{Move Semantic}
272-
\begin{alertblock}{Exercise Time}
272+
\begin{exercise}{Move semantics}
273273
\begin{itemize}
274274
\item go to code/move
275275
\item look at the code and run it with callgrind
@@ -279,6 +279,6 @@
279279
\item understand why and fix test.cpp
280280
\item see efficiency improvements
281281
\end{itemize}
282-
\end{alertblock}
282+
\end{exercise}
283283
prerequisite: be able to use simple templated code
284284
\end{frame}

talk/morelanguage/raii.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@
258258

259259
\begin{frame}[fragile]
260260
\frametitlecpp[98]{smart pointers}
261-
\begin{alertblock}{Exercise Time}
261+
\begin{exercise}{Smart pointers}
262262
\begin{itemize}
263263
\item go to code/smartPointers
264264
\item compile and run the program. It doesn't generate any output.
@@ -271,5 +271,5 @@
271271
\item Go through {\ttfamily problem1()} to {\ttfamily problem3()} and fix the leaks using smart pointers.
272272
\item {\ttfamily problem4()} is the most difficult. Skip if not enough time.
273273
\end{itemize}
274-
\end{alertblock}
274+
\end{exercise}
275275
\end{frame}

0 commit comments

Comments
 (0)