added
authorChristian Urban <urbanc@in.tum.de>
Wed, 09 Nov 2016 06:02:31 +0000
changeset 21 610f7a4a9ede
parent 20 07860dd35c2b
child 22 9830203b058d
added
langs.sty
pics/edf.png
pics/foursquare.png
pics/hsbc.png
pics/linked.png
pics/morgan.png
pics/novell.png
pics/suisse.png
pics/twitter.png
progs/lecture1.scala
slides.sty
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langs.sty	Wed Nov 09 06:02:31 2016 +0000
@@ -0,0 +1,70 @@
+\usepackage{listings}
+\usepackage{etoolbox}
+\setmonofont[Scale=.95]{Consolas}
+\newfontfamily{\consolas}{Consolas}
+
+\definecolor{codered}{rgb}{0.6,0,0}            % for strings
+\definecolor{codegreen}{rgb}{0.25,0.5,0.35}    % comments
+\definecolor{codepurple}{rgb}{0.5,0,0.35}      % keywords
+\definecolor{codedocblue}{rgb}{0.25,0.35,0.75} % doc
+\definecolor{codeblue}{rgb}{0.25,0.35,0.75}    % types
+
+\BeforeBeginEnvironment{lstlisting}{\par\noindent\begin{minipage}{\linewidth}}
+\AfterEndEnvironment{lstlisting}{\end{minipage}\par}
+
+\lstdefinelanguage{Scala}{
+  morekeywords={abstract,case,catch,class,def,%
+    do,else,extends,false,final,finally,%
+    for,if,implicit,import,match,mixin,%
+    new,null,object,override,package,%
+    private,protected,requires,return,sealed,%
+    super,this,throw,trait,true,try,%
+    type,val,var,while,with,yield,write,read},%
+  otherkeywords={=>,<-,<\%,<:,>:,\#},%
+  sensitive=true,%
+  %directives={Int,Char,Rexp,String,Boolean,BigInt,Unit,List,Set},%
+  %moredelim=*[directive]:,%
+  morecomment=[l]{//},%
+  morecomment=[n]{/*}{*/},
+  morestring=[s]{"""}{"""},
+  morestring=[b]",
+  morestring=[b]',
+}[keywords,comments,strings]
+
+\lstdefinelanguage{While}{
+  morekeywords={if,then,else,while,do,true,false,write,upto,read,for,skip},
+  morecomment=[l]{//},
+  morecomment=[n]{/*}{*/},
+  morestring=[b]",
+  otherkeywords={=,!=,:=,<,>,\%;*,/},
+}[keywords,comments,strings]
+
+\lstdefinestyle{mystyle}
+       {basicstyle=\ttfamily,
+	keywordstyle=\color{codepurple}\bfseries,
+	stringstyle=\color{codegreen},
+	commentstyle=\color{codegreen},
+	morecomment=[s][\color{codedocblue}]{/**}{*/},
+	numbers=left,
+	numberstyle=\tiny\color{black},
+	stepnumber=1,
+	numbersep=10pt,
+	tabsize=2,
+	showspaces=false,
+	showstringspaces=false,
+        xleftmargin=8mm,
+        emphstyle=\color{codeblue}\bfseries,
+        keepspaces
+}
+
+\lstset{language=Scala,
+        style=mystyle}
+
+
+\newcommand{\code}[1]{{\lstinline{#1}}}
+\newcommand{\pcode}[1]{\mbox{\lstset{language={},keywordstyle=\color{black}}\lstinline!#1!}}
+\newcommand{\scode}[1]{\mbox{\lstset{language={},basicstyle=\ttfamily\color{codegreen}}\lstinline!#1!}}
+\makeatother
+
+%%\lstset{escapeinside={(*@}{@*)}}
+\lstset{escapeinside={/*@}{@*/}}
Binary file pics/edf.png has changed
Binary file pics/foursquare.png has changed
Binary file pics/hsbc.png has changed
Binary file pics/linked.png has changed
Binary file pics/morgan.png has changed
Binary file pics/novell.png has changed
Binary file pics/suisse.png has changed
Binary file pics/twitter.png has changed
--- a/progs/lecture1.scala	Wed Nov 09 01:18:08 2016 +0000
+++ b/progs/lecture1.scala	Wed Nov 09 06:02:31 2016 +0000
@@ -1,10 +1,10 @@
-
-// webpages
-
+// Lecture 1
+//==========
 
 //**Assignments (values)**
 //(variable names should be lower case)
 //=====================================
+
 val x = 42
 val y = 3 + 4
 
@@ -39,7 +39,7 @@
 println(lst.mkString("\n"))
 
 // some methods take more than one argument
-println(lst.mkString("[",",","]"))
+println(lst.mkString("[", ",", "]"))
 
 //**Conversion methods**
 //======================
@@ -78,6 +78,9 @@
 
 def square(x: Int): Int = x * x
 
+
+
+
 //**Ifs control structures**
 //==========================
 
@@ -116,3 +119,6 @@
 val mtable = for (n <- (1 to 10).toList; m <- (1 to 10).toList) yield m * n
 
 mtable.sliding(10,10).toList.mkString(
+
+
+// webpages
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/slides.sty	Wed Nov 09 06:02:31 2016 +0000
@@ -0,0 +1,88 @@
+\usepackage[absolute,overlay]{textpos}
+\usepackage{xcolor}
+\usepackage{fontspec}
+\usepackage[sc]{mathpazo}
+\usefonttheme{serif}
+\defaultfontfeatures{Ligatures=TeX}
+\defaultfontfeatures{Mapping=tex-text}
+\setromanfont{Hoefler Text}
+\setmonofont[Scale=.88]{Consolas}
+\newfontfamily{\consolas}{Consolas}
+
+\definecolor{darkblue}{rgb}{0,0,0.6}
+\hypersetup{colorlinks=true}
+\hypersetup{linkcolor=darkblue}
+\hypersetup{urlcolor=darkblue}
+
+\newcommand{\tttext}[1]{{\consolas{#1}}}
+
+\newcommand{\ZERO}{\mbox{\bf 0}}
+\newcommand{\ONE}{\mbox{\bf 1}}
+\newcommand{\Der}{\textit{Der}}
+\newcommand{\der}{\textit{der}}
+\newcommand{\Ders}{\textit{Ders}}
+\newcommand{\ders}{\textit{ders}}
+\newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}%
+\newcommand{\slidecaption}{}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Frametitles
+
+\setbeamerfont{frametitle}{size={\LARGE}}
+\setbeamerfont{frametitle}{family={\fontspec{Hoefler Text Black}}}
+\setbeamercolor{frametitle}{fg=ProcessBlue,bg=white}
+
+\setbeamertemplate{frametitle}{%
+\vskip 2mm  % distance from the top margin
+\hskip -3mm % distance from left margin
+\vbox{%
+\begin{minipage}{1.05\textwidth}%
+\centering%
+\begin{tabular}{@{}c@{}}%
+\insertframetitle%
+\end{tabular}%
+\end{minipage}\vspace{-10pt}}%
+}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Foot
+%
+\setbeamertemplate{navigation symbols}{} 
+\usefoottemplate{%
+\vbox{%
+  \tinyline{%
+    \tiny\hfill\textcolor{gray!50}{\slidecaption{} --
+      p.~\insertframenumber/\inserttotalframenumber}}}%
+}
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\beamertemplateballitem
+\setlength\leftmargini{2mm}
+\setlength\leftmarginii{0.6cm}
+\setlength\leftmarginiii{1.5cm}
+\setbeamertemplate{itemize/enumerate body end}{\vspace{-2mm}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% blocks
+%\definecolor{cream}{rgb}{1,1,.65}
+\definecolor{cream}{rgb}{1,1,.8}
+\setbeamerfont{block title}{size=\normalsize}
+\setbeamercolor{block title}{fg=black,bg=cream}
+\setbeamercolor{block body}{fg=black,bg=cream}
+
+\setbeamertemplate{blocks}[rounded][shadow=true]
+
+\setbeamercolor{boxcolor}{fg=black,bg=cream}
+
+\mode
+<all>
+
+
+
+
+
+