36 |
36 |
37 \normalsize |
37 \normalsize |
38 \begin{center} |
38 \begin{center} |
39 \begin{tabular}{ll} |
39 \begin{tabular}{ll} |
40 Email: & christian.urban at kcl.ac.uk\\ |
40 Email: & christian.urban at kcl.ac.uk\\ |
41 Office: & N7.07 (North Wing, Bush House)\\ |
41 Office: & N\liningnums{7.07} (North Wing, Bush House)\\ |
42 Slides \& Code: & KEATS\medskip\\ |
42 Slides \& Code: & KEATS\medskip\\ |
43 Scala Office & \\ |
43 Office Hours: & Mondays 12:00 -- 14:00\\ |
44 Hours: & Thursdays 11 -- 13\\ |
|
45 \end{tabular} |
44 \end{tabular} |
46 \end{center} |
45 \end{center} |
47 |
46 |
48 |
47 |
49 \end{frame} |
48 \end{frame} |
50 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
49 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
51 |
50 |
52 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
51 |
53 \begin{frame}[t,fragile] |
52 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
54 \frametitle{Mea Culpa} |
53 \begin{frame}[c,fragile] |
55 \bigskip |
54 \frametitle{Scala on Lab Computers} |
|
55 |
|
56 \begin{lstlisting}[language={},numbers=none, |
|
57 basicstyle=\ttfamily\small,xleftmargin=-2mm] |
|
58 $ /usr/share/scala/bin/scala |
56 |
59 |
57 \mbox{\hspace{-4mm}}CW6, Part 3 (deadline 21 December)\bigskip\medskip |
60 Welcome to Scala 2.12.6 (Java HotSpot(TM) 64-Bit |
58 \small |
61 Server VM, Java 10.0.1). Type in expressions for |
59 \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-4mm] |
62 evaluation. Or try :help. |
60 val blchip_portfolio = |
63 |
61 List("GOOG", "AAPL", "MSFT", "IBM", "FB", |
64 scala> |
62 "YHOO", "AMZN", "BIDU") |
65 \end{lstlisting}%$ |
63 |
66 |
64 val rstate_portfolio = |
|
65 List("PLD", "PSA", "AMT", "AIV", "AVB", |
|
66 "BXP", "CBG", "CCI", |
|
67 "DLR", "EQIX", "EQR", "ESS", "EXR", |
|
68 "FRT", "GGP", "HCP") |
|
69 \end{lstlisting}\bigskip |
|
70 |
|
71 \onslide<2>{The results in the CW are calculated with YHOO and CBG deleted.} |
|
72 |
|
73 \only<2>{ |
|
74 \begin{textblock}{6}(8.5,6.6) |
|
75 \begin{tikzpicture} |
|
76 \node (B0) at (0,0) {}; |
|
77 \node (B1) at (0,0.5) {}; |
|
78 \node (B2) at (1.2,0) {}; |
|
79 \node (B3) at (1.2,0.5) {}; |
|
80 \draw [red,line width=1mm] (B0) -- (B3); |
|
81 \draw [red,line width=1mm] (B1) -- (B2); |
|
82 \end{tikzpicture} |
|
83 \end{textblock}} |
|
84 |
|
85 \only<2>{ |
|
86 \begin{textblock}{6}(10.5,9.9) |
|
87 \begin{tikzpicture} |
|
88 \node (B0) at (0,0) {}; |
|
89 \node (B1) at (0,0.5) {}; |
|
90 \node (B2) at (1.2,0) {}; |
|
91 \node (B3) at (1.2,0.5) {}; |
|
92 \draw [red,line width=1mm] (B0) -- (B3); |
|
93 \draw [red,line width=1mm] (B1) -- (B2); |
|
94 \end{tikzpicture} |
|
95 \end{textblock}} |
|
96 \end{frame} |
67 \end{frame} |
97 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
68 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
98 |
69 |
99 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
70 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
100 \begin{frame}[c] |
71 \begin{frame}[c] |
101 \frametitle{Mea Culpa 2} |
72 \frametitle{Scala on Lab Computers} |
102 |
73 |
103 Avoid at all costs, even in comments |
74 Avoid at all costs, even in comments |
104 |
75 |
105 \begin{itemize} |
76 \begin{itemize} |
106 \item \texttt{var} \only<2>{$\quad\Rightarrow\;$\texttt{Var}} |
77 \item \texttt{var} \only<2>{$\quad\Rightarrow\;$\texttt{Var}} |