\documentclass[11pt,english,table,dvipsnames]{beamer}
\usetheme{ubslides}

%\setbeameroption{show notes on second screen=right}

%%% set up literature
\setbeamertemplate{bibliography item}{\insertbiblabel}
\usepackage[%
  backend=bibtex      % biber or bibtex
%,style=authoryear    % Alphabeticalsch
 ,style=numeric-comp  % numerical-compressed
 ,sorting=none        % no sorting
 ,sortcites=true      % some other example options ...
 ,block=none
 ,indexing=false
 ,citereset=none
 ,isbn=true
 ,url=true
 ,doi=true            % prints doi
 ,natbib=true         % if you need natbib functions
]{biblatex}
\addbibresource{slides.bib}

% set up stuff for the title page and slides footer
\title[Short Title]{Long Title of the Presentation}
\subtitle{Subtitle of the Presentation}
\author[Max Mustermann]{Max Mustermann}
\date{\today}
\institute[Uni Potsdam]{\includegraphics[width=1.5cm]{./images/bsvs-logo}\\Universtität Potsdam\\ Institut für Informatik und Computational Science\\ Professur Betriebssysteme und Verteilte Systeme}

\lstset{
language=C,
breaklines=true,
breakatwhitespace=true,
frame=tb,
numbers=left,
stepnumber=1,
showstringspaces=false            % 
}

\begin{document}

\begin{frame}[plain]
    \titlepage
\end{frame}
\begin{frame}
\frametitle{Agenda}
\tableofcontents[hidesubsections]
\end{frame}
\section{How to use}
\begin{frame}{How to use}
    \begin{enumerate}
        \item put the beamerthemeubslides in one of the following places
            \begin{itemize}
                \item next to your tex file
                \item in your TEXMFHOME directory (usually \textasciitilde /texmf/, see texmf.cnf)
            \end{itemize}
        \item include the theme via \textbackslash usetheme\{ubslides\} after documentclass
        \item the theme needs the bsvs-logo in the image subdirectory
        \item for 16:9 format include aspectratio=169 in the documentclass options
        \item to update citations, references and pagenumbering multiple pdflatex executions might be needed!
        \item if references are missing run \texttt{bibtex slides} or use tools like latexmk to compile
    \end{enumerate}
\end{frame}
\subsection{Title Page}
\begin{frame}{Changing the Slides}
    Use the following commands to customize the title page:
    \begin{itemize}
        \item \textbackslash title
        \item \textbackslash subtitle
        \item \textbackslash author
        \item \textbackslash date
        \item \textbackslash institute
    \end{itemize}
    \vfill
    Footer and Header
    \begin{itemize}
        \item On slides the short author and title is displaced at the bottom
        \item the section is displaced on the top left
        \item if there are subsection there are displaced on the top right
    \end{itemize}
    \vfill
\end{frame}
\section{Figures}%
\begin{frame}{My Figures}
    This is my own figure so I don't need to provide sources!
    \begin{center}
        \includegraphics[width=0.8\linewidth]{images/results.png}
    \end{center}
\end{frame}
\begin{frame}{My Figures}
    \begin{figure}[htpb]
        \centering
        \includegraphics[width=0.8\linewidth]{images/results.png}
        \caption*{\textcolor{red}{\textbf{If you want to use captions do it without the \glqq Figure\grqq ~in front!}} }
    \end{figure}
\end{frame}
\begin{frame}{Not My Figures}
    Always provide sources if it is not your figure!
    \begin{center}
        \includegraphics[width=0.7\linewidth]{images/spectre.jpeg}\end{center}
\let\thefootnote\relax\footnotetext{\tiny https://spectrum.ieee.org/computing/hardware/how-the-spectre-and-meltdown-hacks-really-worked}
\end{frame}
\begin{frame}{Not My Figures}
    If you do not like footnotes use the cite command.
    \begin{figure}[h]
        \centering
        \includegraphics[width=0.8\linewidth]{images/spectre.jpeg}
        \vspace*{-0.8cm}\caption*{\hspace*{9cm}\cite{abu-ghazaleh}}
    \end{figure}
\end{frame}
\section{Source Code}
\begin{frame}[fragile]{Source Code}
For Source code use either: 
\begin{itemize}
    \item verbatim
    \item lstlisting
    \item minted
\end{itemize}
\vfill
Don't forget to set the \textbf{fragile} frame option!
\vfill
\begin{lstlisting}
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char** argv){
    printf("Hello World!");
    exit(0);
}
\end{lstlisting}
\end{frame}
\section{Notes}
\begin{frame}{Notes}
Notes can be include for presentations:
    \begin{itemize}
        \item the pdf presenter needs to support notes
        \item pympress or pdfpc support it
        \item to activate notes include the following:\\ \texttt{\textbackslash setbeameroption\{show notes on second screen=right\}}
        \item use \texttt{\textbackslash note\{my note\}} to add notes
    \end{itemize}
\end{frame}
\begin{frame}{Blocks}
    \begin{block}{Block}
        This is a normal block.
    \end{block}
    \begin{exampleblock}{Example Block}
        This is an example block.
    \end{exampleblock}
    \begin{alertblock}{Alert Block}
        This is an alert block!
    \end{alertblock}
\end{frame}
\begin{frame}{References}
    \begin{itemize}
        \item include all used sources
        \item make sure that the following informations are included:
            \begin{itemize}
                \item author
                \item title
                \item publication date
                \item journal (for papers)
                \item publisher 
                \item url (for websites)
                \item access date (for websites)
            \end{itemize}
    \end{itemize}
\end{frame}
\cleardoublepage
\backupbegin
\pagenumbering{arabic}
\begin{frame}[allowframebreaks]{References}
\nocite{*}
\printbibliography
    %{\scriptsize \bibliography{slides}}
%\bibliographystyle{plain}
\end{frame}
\begin{frame}{Backup Slide}
    Include backup slides with additional information for possible questions or if too much time is left. 

\end{frame}
\backupend
\end{document}
