| 325 |      1 | % !TEX program = xelatex
 | 
| 66 |      2 | \documentclass[dvipsnames,14pt,t,xelatex]{beamer}
 | 
|  |      3 | \usepackage{../slides}
 | 
|  |      4 | \usepackage{../graphics}
 | 
|  |      5 | \usepackage{../langs}
 | 
| 155 |      6 | %%\usepackage{../data}
 | 
| 67 |      7 | \usepackage[export]{adjustbox}
 | 
| 222 |      8 | \usetikzlibrary{shapes}
 | 
| 66 |      9 | 
 | 
|  |     10 | \hfuzz=220pt 
 | 
|  |     11 | 
 | 
|  |     12 | %\setmonofont[Scale=.88]{Consolas}
 | 
|  |     13 | %\newfontfamily{\consolas}{Consolas}
 | 
|  |     14 | 
 | 
|  |     15 | \lstset{language=Scala,
 | 
|  |     16 |         style=mystyle,
 | 
|  |     17 |         numbersep=0pt,
 | 
|  |     18 |         numbers=none,
 | 
|  |     19 |         xleftmargin=0mm}
 | 
|  |     20 | 
 | 
| 222 |     21 | \newcommand{\LEFTarrow}[3]{%
 | 
|  |     22 | \begin{textblock}{0}(#2,#3)%
 | 
|  |     23 | \onslide<#1>{%
 | 
|  |     24 | \begin{tikzpicture}%
 | 
|  |     25 | \node at (0,0) [single arrow, shape border rotate=180, fill=red,text=red]{a};%
 | 
|  |     26 | \end{tikzpicture}}%
 | 
|  |     27 | \end{textblock}}
 | 
|  |     28 | \newcommand{\DOWNarrow}[3]{%
 | 
|  |     29 | \begin{textblock}{0}(#2,#3)%
 | 
|  |     30 | \onslide<#1>{%
 | 
|  |     31 | \begin{tikzpicture}%
 | 
|  |     32 | \node at (0,0) [single arrow, shape border rotate=270, fill=red,text=red]{a};%
 | 
|  |     33 | \end{tikzpicture}}%
 | 
|  |     34 | \end{textblock}}
 | 
|  |     35 | 
 | 
|  |     36 | 
 | 
| 66 |     37 | \newcommand{\bl}[1]{\textcolor{blue}{#1}}     
 | 
|  |     38 | 
 | 
|  |     39 | % beamer stuff 
 | 
| 222 |     40 | \renewcommand{\slidecaption}{PEP (Scala) 04, King's College London}
 | 
| 66 |     41 | 
 | 
| 155 |     42 | \begin{filecontents}{re3a.data}
 | 
|  |     43 | 1 0.00003
 | 
|  |     44 | 500001 0.22527
 | 
|  |     45 | 1000001 0.62752
 | 
|  |     46 | 1500001 0.88485
 | 
|  |     47 | 2000001 1.39815
 | 
|  |     48 | 2500001 1.68619
 | 
|  |     49 | 3000001 1.94957
 | 
|  |     50 | 3500001 2.15878
 | 
|  |     51 | 4000001 2.59918
 | 
|  |     52 | 4500001 5.90679
 | 
|  |     53 | 5000001 13.11295
 | 
|  |     54 | 5500001 19.15376
 | 
|  |     55 | 6000001 40.16373
 | 
|  |     56 | \end{filecontents}
 | 
|  |     57 | \begin{filecontents}{re-python2.data}
 | 
|  |     58 | 1 0.033
 | 
|  |     59 | 5 0.036
 | 
|  |     60 | 10 0.034
 | 
|  |     61 | 15 0.036
 | 
|  |     62 | 18 0.059
 | 
|  |     63 | 19 0.084
 | 
|  |     64 | 20 0.141
 | 
|  |     65 | 21 0.248
 | 
|  |     66 | 22 0.485
 | 
|  |     67 | 23 0.878
 | 
|  |     68 | 24 1.71
 | 
|  |     69 | 25 3.40
 | 
|  |     70 | 26 7.08
 | 
|  |     71 | 27 14.12
 | 
|  |     72 | 28 26.69
 | 
|  |     73 | \end{filecontents}
 | 
|  |     74 | 
 | 
| 222 |     75 | \begin{filecontents}{re-js.data}
 | 
|  |     76 | 5   0.061
 | 
|  |     77 | 10  0.061
 | 
|  |     78 | 15  0.061
 | 
|  |     79 | 20  0.070
 | 
|  |     80 | 23  0.131
 | 
|  |     81 | 25  0.308
 | 
|  |     82 | 26  0.564
 | 
|  |     83 | 28  1.994
 | 
|  |     84 | 30  7.648
 | 
|  |     85 | 31  15.881 
 | 
|  |     86 | 32  32.190
 | 
|  |     87 | \end{filecontents}
 | 
|  |     88 | 
 | 
| 155 |     89 | \begin{filecontents}{re-java.data}
 | 
|  |     90 | 5  0.00298
 | 
|  |     91 | 10  0.00418
 | 
|  |     92 | 15  0.00996
 | 
|  |     93 | 16  0.01710
 | 
|  |     94 | 17  0.03492
 | 
|  |     95 | 18  0.03303
 | 
|  |     96 | 19  0.05084
 | 
|  |     97 | 20  0.10177
 | 
|  |     98 | 21  0.19960
 | 
|  |     99 | 22  0.41159
 | 
|  |    100 | 23  0.82234
 | 
|  |    101 | 24  1.70251
 | 
|  |    102 | 25  3.36112
 | 
|  |    103 | 26  6.63998
 | 
|  |    104 | 27  13.35120
 | 
|  |    105 | 28  29.81185
 | 
|  |    106 | \end{filecontents}
 | 
| 66 |    107 | 
 | 
| 222 |    108 | \begin{filecontents}{re-java9.data}
 | 
|  |    109 | 1000  0.01410
 | 
|  |    110 | 2000  0.04882
 | 
|  |    111 | 3000  0.10609
 | 
|  |    112 | 4000  0.17456
 | 
|  |    113 | 5000  0.27530
 | 
|  |    114 | 6000  0.41116
 | 
|  |    115 | 7000  0.53741
 | 
|  |    116 | 8000  0.70261
 | 
|  |    117 | 9000  0.93981
 | 
|  |    118 | 10000 0.97419
 | 
|  |    119 | 11000 1.28697
 | 
|  |    120 | 12000 1.51387
 | 
|  |    121 | 14000 2.07079
 | 
|  |    122 | 16000 2.69846
 | 
|  |    123 | 20000 4.41823
 | 
|  |    124 | 24000 6.46077
 | 
|  |    125 | 26000 7.64373
 | 
|  |    126 | 30000 9.99446
 | 
|  |    127 | 34000 12.966885
 | 
|  |    128 | 38000 16.281621
 | 
|  |    129 | 42000 19.180228
 | 
|  |    130 | 46000 21.984721
 | 
|  |    131 | 50000 26.950203
 | 
|  |    132 | 60000 43.0327746
 | 
|  |    133 | \end{filecontents}
 | 
|  |    134 | 
 | 
|  |    135 | 
 | 
| 66 |    136 | \begin{document}
 | 
|  |    137 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    138 | \begin{frame}[t]
 | 
|  |    139 | \frametitle{%
 | 
|  |    140 |   \begin{tabular}{@ {}c@ {}}
 | 
|  |    141 |   \\[5mm]
 | 
| 222 |    142 |   \huge PEP Scala (4) 
 | 
| 66 |    143 |   \end{tabular}}
 | 
|  |    144 | 
 | 
|  |    145 |   \normalsize
 | 
|  |    146 |   \begin{center}
 | 
|  |    147 |   \begin{tabular}{ll}
 | 
| 155 |    148 |     Email:  & christian.urban at kcl.ac.uk\\
 | 
| 325 |    149 |     Office: & N\liningnums{7.07} (North Wing, Bush House)\bigskip\\
 | 
|  |    150 |     Slides \& Code: & KEATS\\
 | 
| 326 |    151 |                     & \onslide<2>{\alert{PDF: A Crash-Course in Scala}}\bigskip\\
 | 
| 325 |    152 |     Office Hours: &  Thursdays 12:00 -- 14:00\\
 | 
|  |    153 |     Additionally: & (for Scala) Tuesdays 10:45 -- 11:45\\ 
 | 
| 66 |    154 |   \end{tabular}
 | 
|  |    155 |   \end{center}
 | 
|  |    156 | 
 | 
|  |    157 | 
 | 
|  |    158 | \end{frame}
 | 
|  |    159 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
 | 
|  |    160 | 
 | 
| 325 |    161 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
| 222 |    162 | \begin{frame}[c]
 | 
| 325 |    163 | \frametitle{Hints in CW}
 | 
| 222 |    164 | 
 | 
| 325 |    165 | \begin{center}  
 | 
|  |    166 | \includegraphics[scale=0.4]{../pics/hints.png}
 | 
| 222 |    167 | \end{center}
 | 
|  |    168 | 
 | 
| 325 |    169 | \small
 | 
|  |    170 | \begin{itemize}
 | 
|  |    171 |   \item Scala Library, e.g.~\texttt{span} in \\
 | 
|  |    172 |   \url{https://www.scala-lang.org/api/current/scala/collection/immutable/List.html}
 | 
|  |    173 | \end{itemize}
 | 
|  |    174 | \end{frame}
 | 
|  |    175 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    176 |   
 | 
| 326 |    177 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    178 | \begin{frame}[c]
 | 
|  |    179 | \frametitle{Discussion Forum}
 | 
| 222 |    180 | 
 | 
| 326 |    181 | \begin{center}  
 | 
|  |    182 | \includegraphics[scale=0.38]{/Users/cu/discussion.png}
 | 
|  |    183 | \end{center}
 | 
|  |    184 | 
 | 
|  |    185 | \end{frame}
 | 
|  |    186 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
| 222 |    187 | 
 | 
|  |    188 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
 | 
| 325 |    189 | \begin{frame}[c]
 | 
|  |    190 | \frametitle{Preliminary 7}
 | 
| 222 |    191 | 
 | 
| 325 |    192 | Raw marks (261 submissions):\bigskip
 | 
| 222 |    193 | 
 | 
| 325 |    194 | \begin{itemize}
 | 
|  |    195 | \item 4\%: \hspace{4mm}236
 | 
|  |    196 | \item 3\%: \hspace{4mm}10
 | 
|  |    197 | \item 2\%: \hspace{4mm}1
 | 
|  |    198 | \item 1\%: \hspace{4mm}0
 | 
|  |    199 | \item 0\%: \hspace{4mm}15 
 | 
|  |    200 | \end{itemize}\bigskip\bigskip  
 | 
| 222 |    201 | 
 | 
| 325 |    202 | \footnotesize
 | 
| 326 |    203 | (plagiarism/collusion interviews ongoing!)
 | 
| 222 |    204 | 
 | 
|  |    205 | \end{frame}
 | 
|  |    206 | 
 | 
|  |    207 | 
 | 
|  |    208 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
| 66 |    209 | 
 | 
| 325 |    210 | 
 | 
| 66 |    211 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
| 67 |    212 | \begin{frame}[c,fragile]
 | 
| 222 |    213 | \small
 | 
|  |    214 |   
 | 
| 325 |    215 | \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=1mm]
 | 
|  |    216 | def is_legal(dim: Int, p: Path, x: Pos) = {
 | 
|  |    217 |   if (...some_really_long_condition...) false
 | 
| 222 |    218 |   else true
 | 
|  |    219 | }
 | 
|  |    220 | \end{lstlisting}
 | 
| 67 |    221 | 
 | 
| 222 |    222 | \pause
 | 
|  |    223 | \bigskip
 | 
|  |    224 | \rule{11cm}{0.3mm}
 | 
|  |    225 | \bigskip
 | 
|  |    226 | 
 | 
| 325 |    227 | \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=1mm]
 | 
|  |    228 | def is_legal(dim: Int, p: Path, x: Pos) = 
 | 
|  |    229 |   !(...some_really_long_condition...)
 | 
|  |    230 | \end{lstlisting}
 | 
|  |    231 | 
 | 
|  |    232 | \end{frame}
 | 
|  |    233 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 | 
|  |    234 | 
 | 
|  |    235 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    236 | \begin{frame}[c,fragile]
 | 
|  |    237 | \small
 | 
|  |    238 |   
 | 
|  |    239 | \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=1mm]
 | 
|  |    240 | def foobar(...) = {
 | 
|  |    241 |   val cs = for (c <- str) yield c.toLowerCase
 | 
|  |    242 |   ...
 | 
|  |    243 | }
 | 
|  |    244 | \end{lstlisting}
 | 
|  |    245 | 
 | 
|  |    246 | \pause
 | 
|  |    247 | \bigskip
 | 
|  |    248 | \rule{11cm}{0.3mm}
 | 
|  |    249 | \bigskip
 | 
|  |    250 | 
 | 
|  |    251 | \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=1mm]
 | 
|  |    252 | def foobar(...) = {
 | 
|  |    253 |   val cs = str.map(_.toLowerCase)
 | 
|  |    254 |   ...
 | 
|  |    255 | }
 | 
|  |    256 | \end{lstlisting}
 | 
|  |    257 | 
 | 
|  |    258 | \end{frame}
 | 
|  |    259 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 | 
|  |    260 | 
 | 
|  |    261 | 
 | 
|  |    262 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    263 | \begin{frame}[c,fragile]
 | 
|  |    264 | \small
 | 
|  |    265 |   
 | 
| 222 |    266 | \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-7mm]
 | 
| 325 |    267 | def RomanNumeral2Int(rs: RomanNumeral): Int = 
 | 
|  |    268 |  rs match { 
 | 
|  |    269 |    case Nil => 0
 | 
|  |    270 |    case M::r    => 1000 + RomanNumeral2Int(r)  
 | 
|  |    271 |    case C::M::r => 900 + RomanNumeral2Int(r)
 | 
|  |    272 |    case D::r    => 500 + RomanNumeral2Int(r)
 | 
|  |    273 |    case C::D::r => 400 + RomanNumeral2Int(r)
 | 
|  |    274 |    case C::r    => 100 + RomanNumeral2Int(r)
 | 
|  |    275 |    case X::C::r => 90 + RomanNumeral2Int(r)
 | 
|  |    276 |    case L::r    => 50 + RomanNumeral2Int(r)
 | 
|  |    277 |    case X::L::r => 40 + RomanNumeral2Int(r)
 | 
|  |    278 |    case X::r    => 10 + RomanNumeral2Int(r)
 | 
|  |    279 |    case I::X::r => 9 + RomanNumeral2Int(r)
 | 
|  |    280 |    case V::r    => 5 + RomanNumeral2Int(r)
 | 
|  |    281 |    case I::V::r => 4 + RomanNumeral2Int(r)
 | 
|  |    282 |    case I::r    => 1 + RomanNumeral2Int(r)
 | 
|  |    283 |  }
 | 
|  |    284 | \end{lstlisting}
 | 
| 67 |    285 | 
 | 
|  |    286 | \end{frame}
 | 
|  |    287 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 | 
|  |    288 | 
 | 
|  |    289 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
| 325 |    290 | \begin{frame}[c,fragile]
 | 
|  |    291 | \frametitle{Last Week: Pattern Matching} 
 | 
|  |    292 | \small
 | 
|  |    293 |   
 | 
|  |    294 | \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=3mm]
 | 
|  |    295 | def fizz_buzz(n: Int) : String = 
 | 
|  |    296 |   (n % 3, n % 5) match {
 | 
|  |    297 |     case (0, 0) => "fizz buzz"
 | 
|  |    298 |     case (0, _) => "fizz"
 | 
|  |    299 |     case (_, 0) => "buzz"
 | 
|  |    300 |     case _ => n.toString  
 | 
|  |    301 |   }
 | 
|  |    302 | \end{lstlisting}
 | 
|  |    303 | 
 | 
|  |    304 | \end{frame}
 | 
|  |    305 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 | 
|  |    306 | 
 | 
|  |    307 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
 | 
|  |    308 | \begin{frame}[c,fragile]
 | 
|  |    309 | \frametitle{Reverse Polish Notation}
 | 
|  |    310 | 
 | 
|  |    311 | {\Large\bl{$(3 + 1) * (2 + 9)$}}\bigskip
 | 
|  |    312 | 
 | 
|  |    313 | {\Large$\Rightarrow$}\bigskip
 | 
|  |    314 | 
 | 
|  |    315 | {\;\;\Large\bl{$3\;\;1\;+\;2\;\;9\;+\;*$}}
 | 
|  |    316 | 
 | 
|  |    317 | \begin{textblock}{3}(11,4)
 | 
|  |    318 | \begin{onlyenv}<2>
 | 
|  |    319 | \begin{lstlisting}[language=JVMIS]
 | 
|  |    320 | ldc 3
 | 
|  |    321 | ldc 1
 | 
|  |    322 | iadd
 | 
|  |    323 | ldc 2
 | 
|  |    324 | ldc 9
 | 
|  |    325 | iadd
 | 
|  |    326 | imul
 | 
|  |    327 | \end{lstlisting}
 | 
|  |    328 | \end{onlyenv} 
 | 
|  |    329 | \end{textblock}
 | 
|  |    330 | 
 | 
|  |    331 | \end{frame}
 | 
|  |    332 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    333 |  
 | 
|  |    334 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
 | 
|  |    335 | \begin{frame}[c,fragile]
 | 
|  |    336 | \frametitle{Sudoku}
 | 
|  |    337 | 
 | 
|  |    338 | A very simple-minded version on 110 problems:\bigskip
 | 
|  |    339 | 
 | 
|  |    340 | \begin{itemize}
 | 
|  |    341 | \item 1 core: 800 secs
 | 
|  |    342 | \item 2 cores: 400 secs
 | 
|  |    343 | \item 8 cores: 290 secs
 | 
|  |    344 | \item 18 cores: 142 secs
 | 
|  |    345 | \end{itemize}
 | 
|  |    346 | 
 | 
|  |    347 | \end{frame}
 | 
|  |    348 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    349 |  
 | 
| 155 |    350 | 
 | 
| 325 |    351 | 
 | 
|  |    352 | \begin{frame}[t]
 | 
|  |    353 | 
 | 
|  |    354 |   \begin{center}  
 | 
|  |    355 |   \includegraphics[scale=0.3]{../pics/blow.png}
 | 
|  |    356 |   \end{center}
 | 
|  |    357 |   
 | 
|  |    358 |   \begin{textblock}{14}(2,11.4)
 | 
|  |    359 |   \large\bf{}Mind-Blowing Regular Expressions:\\ 
 | 
|  |    360 |   \centering in Python, JavaScript, Java
 | 
|  |    361 |   \end{textblock}
 | 
|  |    362 | \end{frame}
 | 
| 67 |    363 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
| 325 |    364 | 
 | 
|  |    365 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    366 | \begin{frame}[c,fragile]
 | 
|  |    367 | \frametitle{Regular Expressions} 
 | 
|  |    368 |   
 | 
| 326 |    369 | Suppose you have the regular expression 
 | 
| 325 |    370 | \only<1-3>{\alert{\texttt{(a*)b}}}%
 | 
|  |    371 | \only<4->{\alert{\texttt{(a*)*b}}} :\bigskip
 | 
|  |    372 | 
 | 
|  |    373 | \begin{center}
 | 
|  |    374 | \only<1>{\code{"aaaaaaaaaaaaaaab"}}
 | 
|  |    375 | \only<2>{\code{"aaaaa...........aaaaaaaaaaaaaaaaaaaab"}}
 | 
|  |    376 | \only<3>{\code{"aaaaa...........aaaaaaaaaaaaaaaaaaaa"}}
 | 
|  |    377 | \only<4>{\code{"aaaaa...........aaaaaaaaaaaaaaaaaaaab"}}
 | 
|  |    378 | \only<5->{\code{"aaaaa...........aaaaaaaaaaaaaaaaaaaa"}}
 | 
|  |    379 | \end{center}
 | 
|  |    380 | 
 | 
|  |    381 | \only<6>{
 | 
|  |    382 | \begin{textblock}{13}(5,12)
 | 
|  |    383 | How long does Python need to find out?
 | 
|  |    384 | \end{textblock}}
 | 
|  |    385 | 
 | 
|  |    386 | \end{frame}
 | 
|  |    387 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 | 
|  |    388 | 
 | 
|  |    389 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    390 | \begin{frame}<1>[c]
 | 
|  |    391 |   \frametitle{CW 9: Regexes}
 | 
| 68 |    392 |   
 | 
|  |    393 | \begin{center}
 | 
| 325 |    394 |   Graphs: \alert{\texttt{(a*)*b}} and strings $\underbrace{\;\texttt{a}\ldots \texttt{a}\;}_{n}$\bigskip
 | 
| 68 |    395 |   
 | 
|  |    396 | \begin{tabular}[t]{@{\hspace{-8mm}}c@{\hspace{-4mm}}c@{}}
 | 
| 222 |    397 | \only<1>{\raisebox{6mm}{\begin{tikzpicture}
 | 
| 68 |    398 | \begin{axis}[
 | 
|  |    399 |     xlabel={$n$},
 | 
|  |    400 |     x label style={at={(1.05,0.0)}},
 | 
|  |    401 |     ylabel={time in secs},
 | 
|  |    402 |     enlargelimits=false,
 | 
|  |    403 |     xtick={0,5,...,30},
 | 
|  |    404 |     xmax=33,
 | 
|  |    405 |     ymax=35,
 | 
|  |    406 |     ytick={0,5,...,30},
 | 
|  |    407 |     scaled ticks=false,
 | 
|  |    408 |     axis lines=left,
 | 
|  |    409 |     width=5.5cm,
 | 
|  |    410 |     height=5cm, 
 | 
| 222 |    411 |     legend entries={\small{}Python,  \small{}Java 8,  \small{}JavaScript},  
 | 
| 68 |    412 |     legend pos=north west,
 | 
|  |    413 |     legend cell align=left]
 | 
|  |    414 | \addplot[blue,mark=*, mark options={fill=white}] table {re-python2.data};  
 | 
|  |    415 | \addplot[cyan,mark=*, mark options={fill=white}] table {re-java.data};
 | 
| 222 |    416 | \addplot[red,mark=*, mark options={fill=white}] table {re-js.data};
 | 
| 68 |    417 | \end{axis}
 | 
| 222 |    418 | \end{tikzpicture}}}%
 | 
|  |    419 | \only<2>{\raisebox{0mm}{\begin{tikzpicture}
 | 
|  |    420 | \begin{axis}[
 | 
|  |    421 |     xlabel={$n$},
 | 
|  |    422 |     x label style={at={(1.05,0.0)}},
 | 
|  |    423 |     ylabel={time in secs},
 | 
|  |    424 |     %y label style={at={(0.06,0.5)}},
 | 
|  |    425 |     enlargelimits=false,
 | 
|  |    426 |     %xtick={0,30000,...,60000},
 | 
|  |    427 |     xmax=65000,
 | 
|  |    428 |     ymax=35,
 | 
|  |    429 |     ytick={0,5,...,30},
 | 
|  |    430 |     scaled ticks=true,
 | 
|  |    431 |     axis lines=left,
 | 
|  |    432 |     width=5.5cm,
 | 
|  |    433 |     height=5cm, 
 | 
|  |    434 |     legend entries={\small{}Java 9},  
 | 
|  |    435 |     legend pos=north west]
 | 
|  |    436 | \addplot[cyan,mark=*, mark options={fill=white}] table {re-java9.data};
 | 
|  |    437 | \end{axis}
 | 
|  |    438 | \end{tikzpicture}}}
 | 
| 68 |    439 |   &
 | 
| 222 |    440 | \onslide<1-2>{\begin{tikzpicture}
 | 
| 68 |    441 |   \begin{axis}[
 | 
|  |    442 |     xlabel={$n$},
 | 
|  |    443 |     x label style={at={(1.05,0.0)}},
 | 
|  |    444 |     ylabel={time in secs},
 | 
|  |    445 |     enlargelimits=false,
 | 
|  |    446 |     ymax=35,
 | 
|  |    447 |     ytick={0,5,...,30},
 | 
|  |    448 |     axis lines=left,
 | 
|  |    449 |     %%scaled ticks=false,
 | 
|  |    450 |     width=5.5cm, 
 | 
|  |    451 |     height=5cm]
 | 
|  |    452 | %%\addplot[green,mark=square*,mark options={fill=white}] table {re2a.data};    
 | 
| 222 |    453 | \addplot[magenta,mark=square*,mark options={fill=white}] table {re3a.data};
 | 
| 68 |    454 | \end{axis}
 | 
| 70 |    455 | \end{tikzpicture}}
 | 
| 68 |    456 | \end{tabular}
 | 
|  |    457 | \end{center}
 | 
| 66 |    458 | 
 | 
| 68 |    459 | \hfill\small\url{https://vimeo.com/112065252}
 | 
| 66 |    460 | \end{frame}
 | 
| 325 |    461 | 
 | 
|  |    462 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
| 67 |    463 | 
 | 
| 70 |    464 | 
 | 
| 66 |    465 | 
 | 
|  |    466 | 
 | 
|  |    467 | \end{document}
 | 
|  |    468 | 
 | 
|  |    469 | %%% Local Variables:  
 | 
|  |    470 | %%% mode: latex
 | 
|  |    471 | %%% TeX-master: t
 | 
|  |    472 | %%% End: 
 | 
|  |    473 | 
 |