
diff -r 1cd2dbdb6a0e -r 03d55eb6a0b7 slides/slides02.tex
--- a/slides/slides02.tex	Sat Nov 09 22:04:53 2019 +0000
+++ b/slides/slides02.tex	Mon Nov 11 13:24:12 2019 +0000
@@ -1,3 +1,4 @@
+% !TEX program = xelatex
 \documentclass[dvipsnames,14pt,t,xelatex]{beamer}
 \usepackage{chessboard}
 \usepackage[LSBC4,T1]{fontenc}
@@ -38,9 +39,10 @@
   \begin{center}
   \begin{tabular}{ll}
     Email:  & christian.urban at kcl.ac.uk\\
-    Office: & N\liningnums{7.07} (North Wing, Bush House)\\
-    Slides \& Code: & KEATS\medskip\\
-    Office Hours: &  Mondays 12:00 -- 14:00\\
+    Office: & N\liningnums{7.07} (North Wing, Bush House)\bigskip\\
+    Slides \& Code: & KEATS\bigskip\\
+    Office Hours: &  Thursdays 12:00 -- 14:00\\
+    Additionally: & (for Scala) Tuesdays 10:45 -- 11:45\\ 
   \end{tabular}
   \end{center}
 
@@ -48,24 +50,63 @@
 \end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
+\begin{frame}[c,fragile]
+  \frametitle{My Scala Version}
+  
+  \begin{lstlisting}[language={},numbers=none,
+    basicstyle=\ttfamily\small,xleftmargin=-2mm]
+  $ scala
+    
+  Welcome to Scala 2.13.1 (Java HotSpot(TM) 
+  64-Bit Server VM, Java 9). Type in expressions 
+  for evaluation. Or try :help.
+  
+  scala>
+  \end{lstlisting}%$
+  \bigskip\bigskip
+  
+  With older versions you will get strange results with my reference implementation.
+  
+  \end{frame}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
 \begin{frame}[c,fragile]
-\frametitle{Scala on Lab Computers}
+\frametitle{Reference Implementation}
+  
+Keep your implementation and my reference implementation separate.\bigskip
 
-\begin{lstlisting}[language={},numbers=none,
-  basicstyle=\ttfamily\small,xleftmargin=-2mm]
-$ /usr/share/scala/bin/scala
+  \begin{lstlisting}[language={},numbers=none,
+    basicstyle=\ttfamily\small,xleftmargin=-2mm]
+  $ scala -cp collatz.jar
   
-Welcome to Scala 2.12.6 (Java HotSpot(TM) 64-Bit
-Server VM, Java 10.0.1). Type in expressions for
-evaluation. Or try :help.
+  scala> CW6a.collatz(6)
+  res0: Long = 8
+
 
-scala>
-\end{lstlisting}%$
+  scala> import CW6a._
+  scala> collatz(9)
+  res1: Long = 19
+  \end{lstlisting}%$
 
 \end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+  
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
+\begin{frame}[t]
+  \frametitle{Preliminary Part 7}
+  
+  \Large
+  \[
+    \texttt{overlap}(d_1, d_2) = \frac{d_1 \cdot d_2}{max(d_1^2, d_2^2)}  
+  \]\bigskip
+
+  \large
+  \quad{}\;where \;$d_1^2$\; means \;$d_1 \cdot d_1$\; and so on
+\end{frame}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+  
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
 \begin{frame}[c]
@@ -275,31 +316,23 @@
 \end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{frame}[c,fragile]
-\frametitle{\begin{tabular}{c}\\[1cm]\alert{Questions?}\end{tabular}}
+\begin{frame}[c]
+\frametitle{\begin{tabular}{c}\\[0cm]\alert{Questions?}\end{tabular}}
 
-%\begin{center}
-%\chessboard[maxfield=g7,
-%            color=blue!50,
-%            linewidth=0.2em,
-%            shortenstart=0.5ex,
-%            shortenend=0.5ex,
-%            markstyle=cross,
-%            markfields={a4, c4, Z3, d3, Z1, d1, a0, c0},
-%            color=red!50,
-%            markfields={f5, e6},
-%            boardfontsize=12pt,labelfontsize=8pt,
-%            setpieces={Ng7, Nb2},showmover=false]
-%\end{center}
-            
 \begin{center}
-My Office Hours: Mondays 12 -- 14
+  \begin{tabular}[t]{@{}l@{}l@{}}
+    \includegraphics[scale=0.1]{../pics/mand4.png} & \hspace{4mm}
+    \raisebox{0mm}{\includegraphics[scale=0.1]{../pics/mand3.png}}      
+  \end{tabular}     
+\end{center}
+
+\begin{center}
+  My Office Hours: Thursdays 12 -- 14\\
+  And specifically for Scala: Tuesdays 10:45 -- 11:45
 \end{center}
 \end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
-\end{document}
 
 
 \end{document}




