\usepackage{algorithm}
\usepackage{booktabs}
\usepackage{calc}
\usepackage{caption}
\usepackage{datenumber}
\usepackage{datetime}
\usepackage{environ}
\usepackage{float}
\usepackage{flafter}
\usepackage{graphicx}
\usepackage{hyphenat}
\usepackage{upquote,textcomp}
\usepackage{tocloft}
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
\usepackage{parskip}
\usepackage{refcount}
\usepackage[automark,nouppercase]{scrpage2}
\usepackage{url}
\usepackage[dvipsnames,svgnames,x11names,table]{xcolor}
\usepackage{tikz}
\usepackage{titlesec}
\usetikzlibrary{backgrounds,shadows,shapes,snakes}
\usepackage{pst-grad}
\usepackage{hyperref}
\input{colours.tex}
\setlength{\cftbeforechapskip}{1.5ex}
\setlength{\cftbeforesecskip}{0.5ex}
\makeatletter
\renewcommand{\l@section}{\@dottedtocline{1}{1.5em}{2.6em}}
\renewcommand{\l@subsection}{\@dottedtocline{2}{4.0em}{3.6em}}
\renewcommand{\l@subsubsection}{\@dottedtocline{3}{7.4em}{4.5em}}
\makeatother
\colorlet{tableheader}{zebrastripecolour!80}
\colorlet{zebra}{zebrastripecolour!5}
\input{sections.tex}
\input{companies.tex}
\input{header-footer.tex}
\input{hypersetup-indispensable.tex}
\floatname{algorithm}{Listing}
\renewcommand{\algorithmname}{Listing}
\makeatletter
\newcommand\fs@algorithm{
\let\@fs@capt\floatc@algorithm
\def\@fs@pre{\hrule height.8pt depth0pt\relax}
\def\@fs@mid{\hrule\kern2pt}
\def\@fs@post{\kern2pt\hrule\relax}
\let\@fs@iftopcapt\iftrue}
\makeatother
\floatstyle{algorithm}
\restylefloat{algorithm}
\DeclareCaptionFormat{algorithm}{
\colorbox[HTML]{A6BFF2}{
\parbox{\textwidth}{\hspace{0.25em}#1#2#3}
}
}
\captionsetup{hypcapspace=0.5\baselineskip}
\captionsetup{labelfont=bf,labelsep=endash}
\captionsetup[ruled]{labelfont=bf,labelsep=endash}
\captionsetup[algorithm]{format=algorithm}
\newcommand*{\subfigureautorefname}{\figureautorefname}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\newcommand{\ChapterTitle}{\leftmark}
\makeatletter
\def\ChapterNumberIfNeededEven{
\ifnum \value{chapter}>0 ~$ \star $ \chaptername{} \thechapter{} \fi
}
\def\ChapterNumberIfNeededOdd{
\ifnum \value{chapter}>0 \chaptername{} \thechapter{} $ \star $ \fi
}
\makeatother
\let\oldtable\table
\let\endoldtable\endtable
\renewenvironment{table}[1][ht]{
\rowcolors{2}{zebra}{white}
\oldtable[#1]
\centering}
{\endoldtable}
\let\temptt\texttt
\renewcommand\texttt[1]{\mbox{\temptt{#1}}}
\renewcommand{\toprule}{\specialrule{\heavyrulewidth}{\abovetopsep}{0pt}}
\renewcommand{\midrule}{\specialrule{\lightrulewidth}{0pt}{\belowrulesep}}
\renewcommand{\bottomrule}{\specialrule{\lightrulewidth}{0pt}{\belowrulesep}}
\date{}
\renewcommand{\topfraction}{0.85}
\renewcommand{\textfraction}{0.1}
\renewcommand{\floatpagefraction}{0.75}
\makeatletter
\def\ScaleIfNeeded{
\ifdim\Gin@nat@width>\linewidth
\linewidth
\else
\Gin@nat@width
\fi
}
\makeatother
\let\oldincludegraphics\includegraphics
\renewcommand\includegraphics[2][]{
\graphicsformat{
\oldincludegraphics[width=\ScaleIfNeeded,#1]{#2}
}
}
\let\graphicsformat\centering
\let\oldalgorithm\algorithm
\let\endoldalgorithm\endalgorithm
\renewenvironment{algorithm}[1][htbp]{
\let\graphicsformat\justifiedandcolored
\oldalgorithm[#1]
}
{\endoldalgorithm}
\def\justifiedandcolored#1{
\setlength\fboxrule{0pt}
\setlength\fboxsep{0pt}
\kern-1.6pt
\tikz[background rectangle/.style={
top color=sourcecolour!60,bottom color=white},
tight background,
show background rectangle]
\node [inner sep=0pt] (0,0) {#1};
\par
\kern-1.6pt
}
\tolerance 1414
\hbadness 1414
\emergencystretch 1.5em
\hfuzz 0.3pt
\widowpenalty=10000
\vfuzz \hfuzz
\interfootnotelinepenalty=10000
\raggedbottom
\newcommand*{\filename}[1]{\expandafter\path\expandafter{#1}}
\input{epigraph.tex}
\input{displayed.tex}
\input{applications.tex}
\input{filenames.tex}
\input{dedication.tex}
\renewcommand{\theenumii}{\roman{enumii}}
\let\tmpmargin\oddsidemargin
\let\oddsidemargin\evensidemargin
\let\evensidemargin\tmpmargin
\reversemarginpar
\makeatletter