equal
deleted
inserted
replaced
9 \hfuzz=220pt |
9 \hfuzz=220pt |
10 |
10 |
11 % beamer stuff |
11 % beamer stuff |
12 \renewcommand{\slidecaption}{APP 01, King's College London} |
12 \renewcommand{\slidecaption}{APP 01, King's College London} |
13 |
13 |
14 \lstset{language=Scala, |
14 \lstset{language=JavaScript, |
15 style=mystyle, |
15 style=mystyle, |
16 numbersep=0pt, |
16 numbersep=0pt, |
17 numbers=none, |
17 numbers=none, |
18 xleftmargin=0mm} |
18 xleftmargin=0mm} |
19 |
19 |
655 \frametitle{JavaScript + Node.js} |
655 \frametitle{JavaScript + Node.js} |
656 |
656 |
657 A simple response from the server: |
657 A simple response from the server: |
658 |
658 |
659 \small |
659 \small |
660 \lstinputlisting[language=JavaScript]{../progs/ap0.js} |
660 \lstinputlisting{../progs/ap0.js} |
661 \medskip\pause |
661 \medskip\pause |
662 |
662 |
663 \small |
663 \small |
664 alternative response:\smallskip\\ |
664 alternative response:\smallskip\\ |
665 |
665 |
666 |
666 |
667 \lstinline[language=JavaScript]{response.write('<H1>Hello World</H1>');} |
667 \lstinline{response.write('<H1>Hello World</H1>');} |
668 |
668 |
669 \end{frame} |
669 \end{frame} |
670 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
670 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
671 |
671 |
672 |
672 |
673 |
673 |
674 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
674 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
675 \begin{frame}[c] |
675 \begin{frame}[c] |
676 |
676 |
677 \footnotesize |
677 \footnotesize |
678 \lstinputlisting[language=JavaScript]{../progs/ap1.js} |
678 \lstinputlisting{../progs/ap1.js} |
679 |
679 |
680 \end{frame} |
680 \end{frame} |
681 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
681 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
682 |
682 |
683 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
683 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
849 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
849 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
850 \begin{frame}[c] |
850 \begin{frame}[c] |
851 \mbox{}\\[-9mm] |
851 \mbox{}\\[-9mm] |
852 |
852 |
853 \footnotesize |
853 \footnotesize |
854 \lstinputlisting[language=JavaScript]{../progs/ap2.js} |
854 \lstinputlisting{../progs/ap2.js} |
855 |
855 |
856 \end{frame} |
856 \end{frame} |
857 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
857 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
858 |
858 |
859 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
859 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
874 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
874 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
875 \begin{frame}[c] |
875 \begin{frame}[c] |
876 \mbox{}\\[-7mm] |
876 \mbox{}\\[-7mm] |
877 |
877 |
878 \footnotesize |
878 \footnotesize |
879 \lstinputlisting[language=JavaScript]{../progs/ap3.js} |
879 \lstinputlisting{../progs/ap3.js} |
880 |
880 |
881 \end{frame} |
881 \end{frame} |
882 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
882 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
883 |
883 |
884 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
884 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
899 |
899 |
900 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
900 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
901 \begin{frame}[c] |
901 \begin{frame}[c] |
902 \mbox{}\\[-2mm] |
902 \mbox{}\\[-2mm] |
903 |
903 |
904 {\footnotesize\lstinputlisting[language=JavaScript]{../progs/ap4.js}} |
904 {\footnotesize\lstinputlisting{../progs/ap4.js}} |
905 |
905 |
906 \begin{textblock}{1}(9,0) |
906 \begin{textblock}{1}(9,0) |
907 \begin{tikzpicture}[scale=1.3] |
907 \begin{tikzpicture}[scale=1.3] |
908 \draw[white] (0,0) node (X) {}; |
908 \draw[white] (0,0) node (X) {}; |
909 \draw[white] (3.5,0) node (Y) {}; |
909 \draw[white] (3.5,0) node (Y) {}; |
1232 |
1232 |
1233 \begin{itemize} |
1233 \begin{itemize} |
1234 \item Never store passwords in plain text.\medskip |
1234 \item Never store passwords in plain text.\medskip |
1235 \item Always salt your hashes!\medskip |
1235 \item Always salt your hashes!\medskip |
1236 \item Use an existing crypto algorithm; do not write your own!\medskip |
1236 \item Use an existing crypto algorithm; do not write your own!\medskip |
1237 \item Make the party responsible for losses, who is in the position to improve |
1237 \item Make the party responsible for losses that is in the position to improve |
1238 security. |
1238 security. |
1239 \end{itemize} |
1239 \end{itemize} |
1240 |
1240 |
1241 \end{frame} |
1241 \end{frame} |
1242 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1242 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |