Creation of Test Plan and FYP Report

This commit is contained in:
Alexander Davis
2017-04-08 00:50:00 +01:00
parent 6953077108
commit 933a4acff6
316 changed files with 39301 additions and 13662 deletions

View File

@@ -0,0 +1,143 @@
\chapter{Project Specification}
Summary of the project outline.
\section{Functional Requirements}
some text here
\section{Non-Functional Requirements}
some text here
\chapter{Project Management}
Discussion on how the project was managed. What things impacted the success of the project. How does the continually revised versions of the project plan compare to the initial draft developed at the start of the project. Did everything run according to schedule. What impact did elements such as exams \& coursework have on the project.
Professor Randy Pausch is well known for his contribution to the Alice 3D environment as well as lectures on Time Management and Fulfilling your Childhood Dreams. Both of these lectures are well worth watching, as such \cite{online:Doolan:2015:PauschLecture} outlines the main elements of both lectures, the post features a number of links allowing one to jump to particular segments of interest in the video lectures. Another post \cite{online:Doolan:2016:SchwarzeneggerInterview} highlights the key elements of success in the form of Goals, Confidence and Time Management. The post once again summarizes and provides links to the key elements of a video interview with Arnold Schwarzenegger.
\chapter{Another Appendix}
This appendix makes use of the \emph{rotating} package to rotate both figures and tables ninety degrees allowing for large datasets and illustrations to be represented.
\begin{figure}[H]
\centering
\includegraphics[width=.9\linewidth]{appendix/images/TemplateStructure.pdf}
\caption{Thesis Template Folder and \latex File Structure}
\label{fig:append:TemplateStructure}
\end{figure}
\begin{sidewaystable}
\begin{center}
\begin{tabular}{llllllllll}
\toprule
\textbf{Heading 1} & \textbf{Heading 2} & \textbf{Heading 3} & \textbf{Heading 4} & \textbf{Heading 5} & \textbf{Heading 6} & \textbf{Heading 7} & \textbf{Heading 8} & \textbf{Heading 9} & \textbf{Heading 10} \cr
\midrule
aaaa & bbbb & cccc & dddd & eeee & ffff & gggg & hhhh & iiii & jjjj \cr
aaaa & bbbb & cccc & dddd & eeee & ffff & gggg & hhhh & iiii & jjjj \cr
aaaa & bbbb & cccc & dddd & eeee & ffff & gggg & hhhh & iiii & jjjj \cr
aaaa & bbbb & cccc & dddd & eeee & ffff & gggg & hhhh & iiii & jjjj \cr
aaaa & bbbb & cccc & dddd & eeee & ffff & gggg & hhhh & iiii & jjjj \cr
aaaa & bbbb & cccc & dddd & eeee & ffff & gggg & hhhh & iiii & jjjj \cr
\bottomrule
\end{tabular}
\caption[A Short Caption for the Table]{
A much longer caption that will not be listed in the list of tables page.
}
\label{tab:sidewaysTable}
\end{center}
\end{sidewaystable}
\begin{sidewaysfigure}
\centerline{\includegraphics[width=7in]{appendix/images/samplepng}}
\caption[A Sideways Figure]{
A much longer caption that will not be listed in the list of figures page.
}
\label{fig:sidewaysFigure}
\end{sidewaysfigure}
\chapter{Presentation Slides}
One can readily prepare presentation slides using PowerPoint or Keynote. Saving / Exporting the slides as a pdf document allows for it to be easily incorporated into this template. Each slide will be scaled to 0.45 of the \textbackslash textwidth, individual pages of the file can be accessed via the page=x option of \textbackslash includegraphics.
\begin{figure}[H]
\parbox{74.mm}{
\centering
\includegraphics[width=0.45\textwidth,page=1]{appendix/images/PresentationSlides}
\caption*{Slide 1}
}
\parbox{74.mm}{
\centering
\includegraphics[width=0.45\textwidth,page=2]{appendix/images/PresentationSlides}
\caption*{Slide 2}
}
\end{figure}
\begin{figure}[H]
\parbox{74.mm}{
\centering
\includegraphics[width=0.45\textwidth,page=3]{appendix/images/PresentationSlides}
\caption*{Slide 3}
}
\parbox{74.mm}{
\centering
\includegraphics[width=0.45\textwidth,page=4]{appendix/images/PresentationSlides}
\caption*{Slide 4}
}
\end{figure}
\begin{figure}[H]
\parbox{74.mm}{
\centering
\includegraphics[width=0.45\textwidth,page=5]{appendix/images/PresentationSlides}
\caption*{Slide 5}
}
\parbox{74.mm}{
\centering
\includegraphics[width=0.45\textwidth,page=6]{appendix/images/PresentationSlides}
\caption*{Slide 6}
}
\end{figure}
\begin{figure}[H]
\parbox{74.mm}{
\centering
\includegraphics[width=0.45\textwidth,page=7]{appendix/images/PresentationSlides}
\caption*{Slide 7}
}
\parbox{74.mm}{
\centering
\includegraphics[width=0.45\textwidth,page=8]{appendix/images/PresentationSlides}
\caption*{Slide 8}
}
\end{figure}
\begin{figure}[H]
\parbox{74.mm}{
\centering
\includegraphics[width=0.45\textwidth,page=9]{appendix/images/PresentationSlides}
\caption*{Slide 9}
}
\parbox{74.mm}{
\centering
\includegraphics[width=0.45\textwidth,page=10]{appendix/images/PresentationSlides}
\caption*{Slide 10}
}
\end{figure}
\chapter{Project Log}
The following is a weekly summary of the work carried during the development of this body of work. It covers tasks that were completed, tutorials that were worked through, articles that were read and summaries of discussions / meetings held with the project supervisor and other third parties.
\section*{Week Beginning: Monday 26/09/2016}
First week working on the project. Had a meeting with supervisor and discussed some of the issues related to the project. The first deliverable is due for the end of next week (project outline \& ethics form).
\begin{itemize}
\item Downloaded and Installed \latex (MikTeX full install) \& Winshell.
\item Started to get to grips with the \latex system by making simple modifications to the template and editing the project log.
\item Developed a Mind Map to clarify understanding of project elements.
\item Prepared an initial draft of project plan in the form of a Gantt chart.
\item Prepared and revised draft of project proposal \& filled in ethics form.
\item Downloaded and read half a dozen BSc Reports to see the general format and expected content.
\item Started learning how to use some API's needed for the project.
\end{itemize}

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

View File

@@ -0,0 +1,9 @@
\chapter{Background Research}\label{ch:Background}
This chapter provides some background research on the project and examines some previous work.
\section{Conclusions}
The main conclusions for this chapter.

1737
Final Project Report/bath.bst Executable file

File diff suppressed because it is too large Load Diff

BIN
Final Project Report/bculogo.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

View File

@@ -0,0 +1,11 @@
\chapter{Conclusion}\label{ch:Conclusion}
This chapter summarises the main positive outcomes and conclusions resulting from this body of work. One can explore the overall journey, problems encountered and solutions found. Of key importance is the ``Future Work'' section highlighting how the product may be further developed with new and improved features, futher resources and time.
\section{Conclusions}
The main conclusions that may be drawn from the body of work.
\section{Future Work}
Further development that could be carried out in the future.

View File

@@ -0,0 +1,9 @@
\chapter{Design}\label{ch:Design}
This chapter examines the design of the project.
\section{Conclusions}
The main conclusions for this chapter.

View File

@@ -0,0 +1,9 @@
\chapter{Evaluation \& Testing}\label{ch:Evaluation}
This chapter evaluates the overall project and provides results of tests carried out.
\section{Conclusions}
The main conclusions for this chapter.

View File

@@ -0,0 +1,9 @@
\chapter{Implementation}\label{ch:Implementation}
This chapter examines the implementation of the project.
\section{Conclusions}
The main conclusions for this chapter.

View File

@@ -0,0 +1,8 @@
\beforeabstract
\prefacesection{Abstract}
The Abstract of the report should be written here, it should provide a short summary of the work encompassing no more than one page.
\prefacesection{Acknowledgements}
The Acknowledgements section may be used to thank your supervisor, family, research funding bodies, or any other applicable individuals or institutions.
\afterpreface \afterabstract

View File

@@ -0,0 +1,42 @@
\chapter{Introduction}
\pagenumbering{arabic} \setcounter{page}{1}
A short paragraph introducing the topic the chapter examines.
\section{Background}
A number of pages about the background of the project.
\section{About this Thesis}
This is the report of \emph{\authorName}, submitted as part of the requirements for the degree of \degreeAward at the School of Computing and Digital Technology, Birmingham City University, Birmingham, UK..
A number of paragraphs detailing the main expectations of this body of work.
\section{Chapter List}
Provide a list of all the chapters within the report and a brief summary of the content. Ensure each summary avoids having a repetitive structure such as starting with ``This chapter deals with''.
\textbf{Chapter \ref{ch:usingLatex}} Using \LaTeX. This chapter
deals with how to use the \LaTeX \space system.
\textbf{Chapter \ref{ch:litReview}} Literature Review. This chapter
deals with $\ldots$.
\textbf{Chapter \ref{ch:Background}} Background Research. This chapter
deals with $\ldots$.
\textbf{Chapter \ref{ch:Design}} Design. This chapter
deals with $\ldots$.
\textbf{Chapter \ref{ch:Implementation}} Implementation. This chapter
deals with $\ldots$.
\textbf{Chapter \ref{ch:Evaluation}} Evaluation \& Testing. This chapter
deals with $\ldots$.
\textbf{Chapter \ref{ch:Conclusion}} Conclusion. The conclusions of the report are presented.
\section{Conclusion}
A short conclusion summarising the chapter.

View File

@@ -0,0 +1,21 @@
\chapter{Literature Review}\label{ch:litReview}
This chapter provides a comprehensive review of the most relevant literature in the field showing how it feeds into the product being delivered. IEEExplore, Google Scholar and the ACM Digital Library are examples of useful data sources that may be queried as part of the review process. \cite{online:Doolan:2016:AcademicResources} provides links to these and other resources.
\section{Introduction}
\section{Key Topic Area 1}
\section{Key Topic Area 2}
\section{Key Topic Area 3}
\section{Conclusions}
The main conclusions of the chapter.

123
Final Project Report/template.cls Executable file
View File

@@ -0,0 +1,123 @@
\NeedsTeXFormat{LaTeX2e} \ProvidesClass{template}
\RequirePackage{setspace}
\LoadClass[11pt, a4paper]{report}
\brokenpenalty=10000
\onehalfspacing
\def\degreetitle#1{\gdef\@degreetitle{#1}}
\def\rpttype#1{\gdef\@rpttype{#1}}
\def\principaladviser#1{\gdef\@principaladviser{#1}}
\def\advis@r{Advisor} % default spelling---we are English!
\def\principaladvisor#1{\gdef\@principaladviser{#1}\gdef\advis@r{Advisor}}
\def\submitdate#1{\gdef\@submitdate{#1}}
\def\copyrightyear#1{\gdef\@copyrightyear{#1}}
\def\@title{}\def\@author{}\def\@dept{School of Computing and Digital Technology}
\def\@submitdate{\ifcase\the\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi
\space \number\the\year}
\newif\ifcopyright \newif\iffigurespage \newif\iftablespage \newif\ifalgorithmspage \newif\ifsigpage \copyrightfalse \figurespagetrue \tablespagetrue \algorithmspagefalse \sigpagefalse
\def\titlep{%
\thispagestyle{empty}%
\null\vskip1in%
\begin{center}
\large\sc\expandafter{\@title}\\
\vskip 0.25in
{\Large \@author}
\vskip 0.45in
\includegraphics[height=40mm]{bculogo.jpg}
\vfill
\vskip 0.25in
\sc A report submitted as part of the requirements \\for the degree of
\@degreetitle
\\ at the \@dept \\Birmingham City University, Birmingham, UK
\vfill
\vskip 0.5in
\@submitdate
\vfill
\normalfont
Supervisor \@principaladviser\\
\end{center}\vskip.5in\newpage}
\def\declpage{%
\prefacesection{Declaration}
\begin{center}
\begin{minipage}{4.5in}
\parindent=0pt
I confirm that the work contained in this \@rpttype \space project report has been composed solely by myself and has not been accepted in any previous application for a degree. All sources of information have been specifically acknowledged and all verbatim extracts are distinguished by quotation marks.
\par
\vskip 2in
Signed ............................................ \hspace{0.5 in} Date ......................\\
\hspace*{0.4 in} \@author
\par
\end{minipage}%
\end{center}%
\vfill}
\def\beforeabstract{
\pagenumbering{roman}
\pagestyle{plain}
\titlep
\ifsigpage\signaturepage\fi
\def\afterabstract{
%% \newpage
\declpage
\tableofcontents
\newpage
\iftablespage
\addvspace{10pt}
\listoftables
\newpage
\fi
\iffigurespage
\addvspace{10pt}
\listoffigures
\newpage
\fi
\ifalgorithmspage
\addvspace{10pt}
\listofalgorithms
\newpage
\fi}
}
\def\prefacesection#1{%
\chapter*{#1}
\addcontentsline{toc}{chapter}{#1}}
\def\afterpreface{\newpage
\pagestyle{plain}}
\pagestyle{plain}
\def\thebibliography#1{\chapter*{\bibname\@mkboth
{\uppercase{\bibname}}{\uppercase{\bibname}}}%
\addcontentsline{toc}{chapter}{\bibname}%
\list
{\@biblabel{\arabic{enumiv}}}{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\usecounter{enumiv}%
\let\p@enumiv\@empty
\def\theenumiv{\arabic{enumiv}}}%
\def\newblock{\hskip .11em plus.33em minus.07em}%
\sloppy\clubpenalty4000\widowpenalty4000
\sfcode`\.=\@m}
\def\endthebibliography{%
\def\@noitemerr{\@warning{Empty `thebibliography' environment}}%
\endlist}

118
Final Project Report/thesis.bib Executable file
View File

@@ -0,0 +1,118 @@
@mastersthesis{msc:Shannon:1940,
author = {Claude Shannon},
school = {Massachusetts Institute of Technology},
title = {A symbolic Analysis of Relay and Switching Circuits},
type = {MSc Thesis},
url = {https://dspace.mit.edu/handle/1721.1/11173},
year = {1940},
}
@phdthesis{phd:Sutherland:1963,
author = {Ivan Edward Sutherland},
school = {Massachusetts Institute of Technology},
title = {Sketchpad, A Man-machine Graphical Communication System},
type = {PhD Thesis},
url = {https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-574.pdf},
year = {1963},
}
@online{online:berkeleyBOINC,
author = {{Berkeley University}},
title = {Berkeley Open Infractructure for Network Computing},
year = {2016},
url = {http://boinc.berkeley.edu/},
urldate = {2016-11-28},
}
@online{online:Fear2016BookTabs,
author = {Simon Fear},
title = {Publication Quality Tables in \LaTeX},
year = {2016},
url = {https://www.ctan.org/pkg/booktabs?lang=en},
urldate = {2016-04-29},
}
@online{online:Fiorio2016algorithm2e,
author = {Christophe Fiorio},
title = {Algorithm2e.sty - package for algorithms},
year = {2016},
url = {https://www.ctan.org/pkg/algorithm2e?lang=en},
urldate = {2015-10-19},
}
@online{online:Doolan:2015:PauschLecture,
author = {Daniel C Doolan},
title = {Essential Viewing: Prof Randy Pausch Time Management \& The Last Lecture },
year = {2015},
url = {http://wp.me/p276Ky-ZN},
urldate = {2015-09-02},
}
@online{online:Doolan:2016:SchwarzeneggerInterview,
author = {Daniel C Doolan},
title = {Essential Viewing: Schwarzenegger Interview: Vision, Goals, Confidence and Time Management },
year = {2016},
url = {http://wp.me/p276Ky-17T},
urldate = {2016-08-25},
}
@online{online:Doolan:2016:AcademicResources,
author = {Daniel C Doolan},
title = {Useful Academic Resources - Computer Science},
year = {2016},
url = {https://dcdoolan.wordpress.com/useful-academic-resources-computer-science/},
urldate = {2016-11-06},
}
@online{online:Bath:2016:HarvardBathStyle,
author = {Alex Ball},
title = {Harvard Referencing Style as Recommended by the University of Bath Library},
year = {2016},
url = {http://www.bath.ac.uk/library/infoskills/referencing-plagiarism/},
urldate = {2016-11-28},
}
@book{book:knuth_1973,
place ={Reading, MA},
title ={The art of computer programming},
publisher ={Addison-Wesley},
author ={Knuth, Donald Ervin},
year ={1973}
}
@article{art:Russell:1978:Cray1,
author = {Russell, Richard M.},
title = {The CRAY-1 Computer System},
journal = {Commun. ACM},
issue_date = {Jan. 1978},
volume = {21},
number = {1},
month = jan,
year = {1978},
issn = {0001-0782},
pages = {63--72},
numpages = {10},
url = {http://doi.acm.org/10.1145/359327.359336},
doi = {10.1145/359327.359336},
acmid = {359336},
publisher = {ACM},
address = {New York, USA},
keywords = {architecture, computer systems},
}
@inproceedings{proc:Ewald:1978:HPG,
author = {Ewald, Robert H. and Maas, Lynn D.},
title = {A High Performance Graphics System for the CRAY-1},
booktitle = {Proceedings of the 5th Annual Conference on Computer Graphics and Interactive Techniques},
series = {SIGGRAPH '78},
year = {1978},
pages = {76--81},
numpages = {6},
url = {http://doi.acm.org/10.1145/800248.807374},
doi = {10.1145/800248.807374},
acmid = {807374},
publisher = {ACM},
venue = {New York, USA},
keywords = {CRAY-1, Computer graphics, High performance graphics system, Picture system 2},
}

163
Final Project Report/thesis.tex Executable file
View File

@@ -0,0 +1,163 @@
\documentclass{template}
\usepackage{graphicx,parskip,appendix,float,geometry}
\usepackage{uarial}
% http://tex.stackexchange.com/questions/13509/biblatex-in-a-nutshell-for-beginners
% http://tex.stackexchange.com/questions/108605/getting-a-harvard-style-list-of-references-using-biblatex
\geometry{
a4paper,
total={150mm,240mm},
left=35mm,
top=25mm,
}
% BCU Harvard Referencing
% http://library.bcu.ac.uk/references.pdf
% Citing use \autocite, \parencite, or \textcite rather than \cite.
% http://tex.stackexchange.com/questions/102662/harvard-reference-using-biblatex
% https://www.sharelatex.com/blog/2013/07/31/getting-started-with-biblatex.html
% http://guides.library.yale.edu/bibtex/home
%\usepackage[backend=bibtex, style=authoryear, firstinits=true, ]{biblatex}
%\addbibresource{thesis.bib}
% Fontsizes
% https://en.wikibooks.org/wiki/LaTeX/Fonts
%\AtBeginBibliography{\footnotesize}
% \DeclareFieldFormat => Remove Quotes from article Titles
% http://tex.stackexchange.com/questions/94089/remove-quotes-from-inbook-reference-title-with-biblatex
%\DeclareFieldFormat[inbook,inproceedings,article,phdthesis,mastersthesis]{citetitle}{#1}
%\DeclareFieldFormat[inbook,inproceedings,article,phdthesis,mastersthesis]{title}{#1}
\usepackage{natbib}
\newcommand*{\urlprefix}{Available from: }
\newcommand*{\urldateprefix}{Accessed }
\bibliographystyle{bath}
% Documentation
% http://mirror.switch.ch/ftp/mirror/tex/macros/latex/contrib/biblatex/doc/biblatex.pdf
\renewcommand*\familydefault{\sfdefault}
\usepackage[T1]{fontenc}
% http://tex.stackexchange.com/questions/86120/font-size-of-figure-caption-header
\usepackage[font=small]{caption}
\usepackage[ruled] {algorithm2e}
\usepackage{url,amsmath,amssymb,fancybox,listings,pdfpages,caption,multicol,datetime,rotating, booktabs}
%\usepackage[usenames,dvipsnames]{color}
\usepackage[pagebackref=false,pdffitwindow=true]{hyperref}
%NOTE: The hyperref usepackage should be the last \usepackage!!
%NOTE: When pagebackref=true an error will appear at the end of compiling. press `q' to ignore
%NOTE: Referencing Algorithms does not work if this usepackage is before the hyperref include.!!
%NOTE: This is a comment, ignored when the document is compiled
%NOTE: The following document configuration settings generally do not need to be modified
%NOTE: More packages may need to be added to provide additional functionality
% http://tex.stackexchange.com/questions/7546/how-to-get-latex-symbol-in-document
\newcommand{\latex}{\LaTeX\ }
\newcommand{\authorName}{Author Full Name}
\newcommand{\reportTitle}{Report Title}
\newcommand{\degreeAward}{BSc in Computer Science }
\hypersetup{
pdftitle = {\reportTitle},
pdfauthor = {\authorName},
pdfsubject = {Computer Science},
pdfkeywords = {Comma separated list of keywords},
colorlinks = true, anchorcolor = blue, filecolor = blue, urlcolor = blue,
linkcolor = blue, %NOTE: change (blue) to (colIdentifier) to have links within the document in Black
citecolor = blue, %NOTE: change (blue) to (colIdentifier) to have citation links within the document in Black
}
\definecolor{colBackGrnd}{rgb}{1,1,0.8}
\definecolor{colKeys}{rgb}{0,0,1}
\definecolor{colIdentifier}{rgb}{0,0,0}
\definecolor{colComments}{rgb}{0,.5,0}
\definecolor{colString}{rgb}{0,0,1}
\definecolor{colWhite}{rgb}{1,1,1}
\newcommand{\MyHookSign}{\hbox{\ensuremath\hookleftarrow}}
\newtheorem{Theorem}{Theorem}
\newtheorem{Proposition}[Theorem]{Proposition}
\newtheorem{Lemma}[Theorem]{Lemma}
\newtheorem{Proof}[Theorem]{Proof}
\newtheorem{Remark}[Theorem]{Remark}
\newtheorem{Claim}[Theorem]{Claim}
\newtheorem{Example}[Theorem]{Example}
\newtheorem{Definition}[Theorem]{Definition}
%NOTE: Setup for including program listings
\lstset{%
float=H,
basicstyle=\ttfamily\footnotesize,
identifierstyle=\color{colIdentifier},
keywordstyle=\color{colIdentifier}, %
stringstyle=\color{colIdentifier},
commentstyle=\color{colIdentifier}, %
columns=flexible,
tabsize=2,
frame=single,
extendedchars=true, %
showspaces=false,
showstringspaces=false,
numbers=left, %
numberstyle=\footnotesize,
breaklines=true,
prebreak={\space\MyHookSign},
language=Java,
backgroundcolor=\color{colBackGrnd},
breakautoindent=true, %
captionpos=b%
} %\hypersetup{colorlinks=true, citecolor=\color{colIdentifier}}
\sloppy %NOTE: To ensure the Right Hand Margin is used (Especially for long URLS)
%NOTE: END of the document configuration settings
\begin{document}
\DeclareGraphicsExtensions{.jpg,.png,.gif,.pdf}
%NOTE: When inserting Figures if the extension of the graphic file is not provided LaTeX will automatically search
% for the extensions declared above, in the order declared.
\title{\huge{\reportTitle}}
\author{\authorName}
\degreetitle{\degreeAward} % Replace with appropriate degree
\rpttype{BSc} % Replace PhD / MSc / BSc.
\principaladviser{Dr. Daniel C. Doolan}
\include{intro/abstract}
\listofalgorithms %NOTE: Will generate a list of Algorithms in the Table of Contents Section
\lstlistoflistings %NOTE: Will generate a list of Program Listings in the Table of Contents Section
%NOTE: Include the relative reference for each chapter to be included
% dividing the thesis file structure into a number of directories aids development
% format: directoryName/filename (the .tex extension is not required for the filename)
\include{intro/introduction}
\include{usingLatex/usingLatex}
\include{litreview/litreview}
\include{background/background}
\include{design/design}
\include{impl/implementation}
\include{eval/evaluation}
\include{conclude/conclude}
%NOTE: reduced the size of the text for the bibliography
%NOTE: set the style for the bibliography and display the references used within the document
% http://tex.stackexchange.com/questions/67153/bibliography-not-in-toc-when-using-biblatex-biber
%\printbibliography[heading=bibintoc]
\footnotesize
\addcontentsline{toc}{chapter}{Bibliography}
\bibliography{thesis}
\normalsize
\appendix
\include{appendix/appendix}
\end{document} %NOTE: END of document, nothing after this point

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

View File

@@ -0,0 +1,9 @@
public void someInterestingMethod( int x ) {
try {
DataInputStream in = new DataInputStream(req.getInputStream());
HttpSession session = req.getSession(true);
//Read Input Data
in.close();
} catch ( Exception err ) { }
outputStream.close();
}

View File

@@ -0,0 +1,192 @@
\chapter{Using \LaTeX}\label{ch:usingLatex}
By reading this chapter and comparing the generated output to the \latex code, one should be able to produce all the necessary content expected of a typeset report. Instructions regarding software installation and compilation are to be found towards the end of the chapter. As with any source code, one should first compile, it to ensure it works. This document should compile with no errors if all the necessary packages are installed. A few warning messages relating to ``Font style'' (Arial) can be ignored.
\section{Structure of this Template}
The file thesis.tex in the root of the directory (ThesisTemplate) is the main file of this template. This is the file that must be compiled to create the document. The thesis.tex document contains a lot of configuration settings. The only elements that require editing are details such as the title of the report, authors name and so forth. The only further addition to the file is to use the \emph{\textbackslash include} statement to include additional chapters in the report. One may also comment out the \emph{\textbackslash include} statements using the percentage sign (\%) to develop the report on a chapter by chapter basis. The BibTeX database thesis.bib is also included within the root. All the actual content of the report is divided up into directories each with a .tex file containing the chapter content (Appendix~\ref{fig:append:TemplateStructure}).
\section{Using Figures}
One can insert graphic elements using \latex in a number of ways. Vector based imagery such as diagrams saved to the pdf format may use the \emph{\textbackslash includegraphics} command with the optional \emph{viewport} attribute to specify a precise area of the graphic to be included. Figures should also include a Caption and a Label for referencing.
When inserting a Figure (Figure~\ref{fig:using:VectorGraphicElementPDF}) one uses the \emph{\textbackslash begin\{figure\}} and \emph{\textbackslash end\{figure\}} commands. The image presented is a vector graphic in the form of a pdf file. When working with such files it is usually necessary to include the optional \emph{viewport} attribute to designate the specific area in which to focus. The first pair of coordinates (x~\&~y) designate the pixel location of the lower left corner. The second pair identify the upper right hand corner. Modification of these coordinates allows one to focus in upon a particular area of interest within the vector image. The optional attribute [H] when beginning a Figure inserts the graphic element at the specified location. Other options such as [htb] (here, top, bottom) will place the graphic in the most suitable place that \latex can find. This however can have a negative impact on memory allocation if a large number of images exist.
\begin{figure}[H]
\centering
\includegraphics[width=.4\linewidth]{usingLatex/images/VectorGraphicElementPDF.pdf}
\caption{Vector Graphic - pdf of a PowerPoint Slide}
\label{fig:using:VectorGraphicElementPDF}
\end{figure}
One may use the \emph{minipage} command when inserting two figures to span across the page. This allows for the subdividing of the page into a number of columns of specified width. Figure~\ref{fig:using:Example1} \&~\ref{fig:using:Example2} demonstrate how one may zoom in / focus on a particular section of a graphic by altering the coordinates of the \emph{viewport}.
\begin{figure}[H]
\begin{minipage}[t]{7.4cm}
\begin{center}
\includegraphics*[viewport= 20 20 600 440, width=.8\linewidth]{usingLatex/images/VectorGraphicElementPDF.pdf}
\caption{viewport = 20 20 600 440}
\label{fig:using:Example1}
\end{center}
\end{minipage}
\hfill
\begin{minipage}[t]{7.4cm}
\begin{center}
\includegraphics*[viewport= 220 200 400 330, width=.8\linewidth]{usingLatex/images/VectorGraphicElementPDF.pdf}
\caption{viewport = 220 200 400 330}
\label{fig:using:Example2}
\end{center}
\end{minipage}
\end{figure}
The example below (Figure~\ref{fig:using:samplepngImage}) features a bitmap image. One can see that the extension for the image file isn't specified, as this template is setup to automatically search for .jpg, .png, .gif and .pdf images. The size of the displayed image within the document can be varied by adjusting the height and width attributes. To rotate an image 90 degrees an optional attribute can be added, for example [width=.4\textbackslash linewidth, angle=90].
\begin{figure}[H]
\begin{center}
\includegraphics[width=.34\linewidth]{usingLatex/images/samplepng}
\caption{Caption for Bitmap Image Example} \label{fig:using:samplepngImage}
\end{center}
\end{figure}
\section{Referencing}
To refer to another part of the document one must use a combination of the \emph{\textbackslash ref} and \emph{\textbackslash label} commands. The label is a unique identifier, therefore when working with large documents it helps to give references meaningful names. Examples of this includes prefixing Table references with \emph{tab:}, figures with \emph{fig:}, chapters with \emph{ch:}. In very large documents in may also be useful to add an additional level of prefixing to represent the chapter the label is in. In this example chapter the tables and figures have the additional prefix of \emph{using} to represent the \emph{usingLatex} chapter. The tilde ($\sim$) is used to ensure that a reference remains as a single object. All instances of \emph{\textbackslash ref} should be preceded with the tilde.
\section{Citing Bibliographic References}
Bibliographic references are stored in a database (.bib file extension), this contains a list of articles, proceedings, books, thesis and so forth. Each type of publication has a number of required fields such as a unique identifier, author and title. To cite a reference within the main body text one must use the \emph{\textbackslash cite} and \emph{\textbackslash citep} commands as in the following examples. \cite{book:knuth_1973} for example is well known for his work on the Art of Computer Programming. The SETI@Home project \citep{online:berkeleyBOINC} is an example of a webpage citation. One can also work with articles \citep{art:Russell:1978:Cray1}, MSc Thesis \citep{msc:Shannon:1940}, PhD Thesis \citep{phd:Sutherland:1963} or articles within conference proceedings \citep{proc:Ewald:1978:HPG}. Several other types of published work exist, but they are used to a lesser degree, see the Bath University Library Style guide \citep{online:Bath:2016:HarvardBathStyle}.
\cite{online:Doolan:2016:AcademicResources} has provided a list of resources that may be of use to ones project in the form of links to searchable databases and \latex tools. The previous citation was generated using the \emph{\textbackslash cite\{bibEntryReference\}} command.
\subsection{Compiling a BibTeX Database}
Having initially compiled the document using pdfLatex a number of helper files are created that aid in referencing and citations. One must the compile the bibtex database, followed by an additional two compiles using pdfLatex. Citing additional bibliographic references within the body of the document being produced will require the recompile of the bibtex database. In the case that the bibtex reference of a cited article cannot be found one will see a question mark (?) instead of the proper citation and a compile warning.
\subsection{The Harvard Bibliography Style}
The bibliographic references are laid out using the Harvard referencing style. This style is generally more applicable to humanities rather than the sciences. One would typically expect to see the use of a numbered reference style in the sciences - such as IEEE or Vancouver. In \latex the Harvard style is depreciated. As such alternative solutions are to use the \emph{natbib} or \emph{biblatex} packages, these however yield references of an author, name format, but don't quite conform to a Harvard style.
Fortunately a Harvard style has been developed at the University of Bath \citep{online:Bath:2016:HarvardBathStyle}. It has been included in this template in the form of a file called \emph{bath.bst}, dated 24 October 2016. The style file can be downloaded as a zip file from the University of Bath Library webpage dedicated to referencing and plagiarism. The zip file includes very useful package documentation, with numerous bibtex examples alongside the resultant output.
\section{Inserting an Algorithm}
The \emph{algorithm2e} environment \citep{online:Fiorio2016algorithm2e} may be used to generate algorithms (Algorithm~\ref{alg:using:SampleAlgorithm}). If no algorithms are used within the document then comment out \emph{\textbackslash listofalgorithms } in the file {\tt thesis.tex} to remove the list of algorithms page.
\begin{algorithm}
%\dontprintsemicolon
\While{(RANK $<$ COMPSIZE)}{
\If{(RANK == MASTER)}{
generate random value \;
\For{(each item K)}{
get result \;
}
}
}
\caption{A Sample Algorithm} \label{alg:using:SampleAlgorithm}
\end{algorithm}
\section{Table Creation}
The data in Table~\ref{tab:using:TableExample} displays three columns of left-aligned and one column of justified data. The cell contents can be aligned to the left (l), right (r), center (c) or (p). Vertical bars may sometimes be seen in tables but these generally look unprofessional. The Booktabs package \citep{online:Fear2016BookTabs} allows for the creation of professional looking tables as shown in the example. The use of \emph{\textbackslash toprule}, \emph{\textbackslash midrule} and \emph{\textbackslash bottomrule} commands provided by the package allow for rules of varying thickness and spacing. Data elements (cells / columns) within a table are divided up using the ampersand (\&). To complete a row one must end with a double backslash (\textbackslash\textbackslash). Tables as with figures need a caption and a label. The WinShell editor has a GUI based utility to aid in the creation of the tabular data.
\begin{table}[H]
\caption{Table Caption}\label{tab:using:TableExample}
\centering
\small
\begin{tabular}{lllp{5cm}}
\toprule \textbf{Heading 1}& \textbf{Heading 2}&\textbf{Heading 3}&\textbf{Heading 4}\\
\midrule
Cell A1 & Cell B2 & Cell C3 & Cell D4\\
Cell E1 & Cell F2 & Cell G3 & Justified text with a defined column size of 5cm\\
\bottomrule
\end{tabular}
\end{table}
\section{Inserting Program Code Samples}
To insert small segments of program code (Listing~\ref{code:SampleCode}) that detail how interesting algorithms and so forth are implemented use the \emph{lstlisting} command. Inclusion of program code again requires a Caption and Label. Sample code from external files may also be included (Listing~\ref{code:externalSampleCodeLabel}), by supplying the relative path to the source file.
\begin{lstlisting}[caption=Sample Program Code Listing, label=code:SampleCode]
if(rndVal==0){
if(opType > 2){
//do something
}
}
\end{lstlisting}
\lstinputlisting[caption={The Caption for the Code Listing},label={code:externalSampleCodeLabel}]{usingLatex/myCodeFile.java}
\section{Working with Maths}
The power of \latex in typesetting mathematical formula is one of its key strengths. The mathematical definition of the ``Cantor set'' is a good example of this in action encompassed within an \emph{\textbackslash equation} environment.
\begin{equation}
\displaystyle\sum_{n=0}^\infty \frac{2^n}{3^{n+1}} = \frac{1}{3} +
\frac{2}{9} + \frac{4}{27} + \frac{8}{81} + \cdots =
\frac{1}{3}\left(\frac{1}{1-\frac{2}{3}}\right) = 1
\end{equation}
The previous equation demonstrates the use of sigma, fractions, large brackets, power, and dots. The function that defines the MSet $Z_{n+1} =
Z_{n}^2 + C$ is a simpler example of math in use within the body text of a paragraph. Matrix Multiplication is typically regarded as an $O(n^3)$
operation. One may use the \emph{equation} environment for more complex mathematical formula that should standout. For example the product $C$ of two matrices $A \in M_{n,m}(R)$ and $B \in
M_{m,p}(R)$ may be defined as
\begin{equation}
(A \times B)_{ij} = \sum_{k=0} ^{m-1} a_{ik}b_{kj},~
i=0,...,n-1,~j=0,...,p-1.
\end{equation}
The sizes of the matrices must satisfy $(n \times m)(m \times p) =
(n \times p)$. Matrix multiplication is an associative process
thereby $a\cdot(b \cdot c) = (a \cdot b) \cdot c$. Essentially to
find the value of a particular cell $C_{i,j}$ it is necessary to
multiply row $i$ of the matrix $A$ with column $j$ of matrix $B$
summing all the multiplications.
\section{Using the Correct Quotes}
To surround a piece of text with double quotes one must place two single quotes on either side of the text. The double quote on the left is created using two left quotes (\lq) this is located just above the \emph{tab} key on the keyboard. The right hand double quote is created using two right hand quotes via (\rq) located just above and to the left of the right shift key. A properly formatted quotation should look like ``This is a quotation''. Notice how the direction of the quotes are opposite to one another. A larger example using the \emph{\textbackslash Huge} font size option, is presented below so the quotes can be clearly seen.
\begin{center}
\Huge{``This is a quotation''}
\end{center}
\section{Start Compiling and Editing}
\begin{enumerate}
\item Read the instructions in this file thesisTemplate.pdf, compare the code in the file usingLatex.tex to that of the resultant output of the Using \latex chapter.
\item Download and install the necessary software - back-end \latex system and front-end text editor.
\item Compile the files thesis.tex and thesis.bib to generate the file thesis.pdf so that it is identical to file thesisTemplate.pdf.
\begin{enumerate}
\item To achieve this compile with pdfLaTeX, then run BibTeX and compile with pdfLaTeX two further times.
\item It is only necessary to run BibTeX when new citations are added in the thesis document.
\item Two compiles of pdfLaTeX is sufficient to allow for correct references to be established.
\item If one is simply adding additional content (text / figures / tables) then a single compile of pdfLaTeX is sufficient for testing purposes.
\end{enumerate}
\item Note that quite a number of additional files may now be seen in the root and subfolders of the (ThesisTemplate) directory.
\item With a successful compile achieved, start reading through the \latex documents (.tex) to see how the various elements are assembled.
\item Begin editing the document starting with thesis.tex by entering elements such as Thesis Title and Author.
\item When it is necessary to start inserting figures / tables and so forth, copy and paste the \latex code provided and edit as necessary.
\end{enumerate}
\subsection{Required Software}
The implementation of \latex typically used is MikTeX (\url{http://miktex.org}). It is typically best to install the complete MiKTeX system. A complete system comprises of around 40K files. A minimal install will necessitate the installation of packages as needed. One can individually download and integrate packages into a MikTeX system using the Package Manager (Admin) application. Initially a small installer application must be downloaded and executed. This in-turn downloads the most recent implementation of the MikTeX system. Run the installer again and select the directory of the downloaded package. The MacTeX distribution (\url{http://www.tug.org/mactex/}) is a useful alternative for Mac users.
The other necessary element is an editor. TeXnicCenter is a free download available at (\url{http://sourceforge.net/projects/texniccenter/}). An alternative is WinEdt a shareware ASCII editor (\url{http://www.winedt.com}). WinEdt can be freely used for a 30 day period, after which one will periodically receive reminders to register the product. Another option for Windows users is WinShell (\url{http://www.winshell.de}). An advantage of WinShell is its in-built BibTeX GUI editor. It also features a useful Table Wizard. For Mac users TexShop (\url{http://pages.uoregon.edu/koch/texshop/}) is a popular option, providing a very easy to use editor. Note the website links in this section were created using the \emph{\textbackslash url} command and included for ease of reference. One should ideally include such references in the Bibliography.
\section{Conclusion}
Having read this chapter and compared the .tex source to the generated output, one should have all the knowledge necessary to typeset a well formatted and elegant project report. One needs to become familiar with a number of commands, but once mastered it should greatly speedup the report writing process. By using \latex to typeset a document one is removed from a myriad of issues in relation to formatting allowing one to concentrate on the most important task, that of content creation.