  \usepackage[T1]{fontenc}
  \usepackage[none]{hyphenat}
  %\usepackage{newpxtext,newpxmath,pifont}%,latexsym,pifont}
  \usepackage{pifont,amssymb,xfrac,mweights,textcomp}
    \newcommand{\inch}{\textquotedbl}
  \usepackage{libertine,newtxtt}
  \usepackage[libertine]{newtxmath}
  \usepackage[varqu,varl]{zi4} % Inconsolata tt face as of 2014-02-14 (should be 2016)

  \usepackage{sectsty}
       \allsectionsfont{\sffamily}
  \usepackage[bottom=3cm]{geometry}
%  \usepackage{lscape}%,pdflscape}
  \usepackage[object=vectorian]{pgfornament}
    \newcommand{\betweenQs}{\hspace{\fill}\pgfornament[width=2cm]{82}\hspace{\fill}}
%  \usepackage{psvectorian}

  \usepackage[nonefgrulers,color=gray]{fgruler}
  \usepackage{graphicx,xcolor}
  \usepackage{wrapfig}
%  \usepackage{array}
  \usepackage[perpage,symbol,flushmargin]
                 {footmisc}
  \usepackage{paralist,multicol}
  \usepackage[hyphens]{url}
  \usepackage[detect-all]{siunitx}
    \DeclareSIUnit[number-unit-product = {}]{\inchQ}{\textquotedbl}
    \DeclareSIUnit[number-unit-product = {\thinspace}]{\inch}{in}
  \usepackage{lastpage}
  \usepackage{soul}
  \usepackage{vcell}

%  \usepackage[colorlinks=true,%   turns off box around links
%              allcolors=black,%          
%              breaklinks=true]% allow links to span multiple lines
%             {hyperref} % must be last package loaded

  %\newcounter{LastQuestion}
  %\setcounter{LastQuestion}{6}
  \newcommand{\FirstQuestion}{2}
  \newcommand{\LastQuestion}{9}
  \newcommand{\HowManyQs}{8} %not including bonus questions
  \newcommand{\AllQuestions}{10} %including bonus questions
  \renewcommand\thesection{Question \#\arabic{section}}
  \renewcommand{\theenumi}    {\alph{enumi}}
  \renewcommand{\labelenumi}  {\theenumi)}
  \renewcommand{\theenumii}   {\roman{enumii}}
  \renewcommand{\labelenumii} {\theenumii)}
  \newcommand{\src}[1]{\marginpar{\raggedright\scriptsize #1}}
  \newcommand{\worth}[1]{\marginpar{\vspace{-1.5\baselineskip}\flushright\small #1}}
  \newcommand{\NB} {\Pisymbol{pzd}{42}\,}
  \newcommand{\node}[1]{\ensuremath{\mathtt{#1}}}
  \newcommand{\fillin}{\underline{\hspace{4em}}}

  \usepackage{fancyhdr,afterpage}
    \lhead{\textsc{csci\,\oldstylenums{1107}}}
    \chead{\textsc{\textsl{makeup} Final Examination \textsl{(a)}}}
    \rhead{\oldstylenums{21} \textsc{december} \oldstylenums{2022}}
    \cfoot{}
    \rfoot
     {\textsc{page \oldstylenums{\thepage}
              of   \oldstylenums{\pageref{LastPage}}}}

    \fancypagestyle{plain}{%
      \renewcommand{\headrulewidth}{0pt}
      \fancyhf{} % clear all header and footer fields
      \rfoot
       {\textsc{page \oldstylenums{\thepage}
                of   \oldstylenums{\pageref{LastPage}}}}
    }
    \pagestyle{fancy}
    \setlength{\headheight}{13.59999pt}

  \title{\vspace*{-3ex} 
         \textsc{csci}\,\oldstylenums{1107}\textsc{: Social Computing}}
  \author{\textsc{\textsl{makeup} Final Examination \textsl{(A)}}}
  \date{\oldstylenums{21} December \oldstylenums{2022}\\[14pt]
  \includegraphics[keepaspectratio,width=1.5em]{FLAKE2.png}}
  %\pgfornament[width=1.5em]{122}}

%  \title{\vspace*{-3ex}
%    \textsc{Social Computing} 
%    (\textsc{\textsc{csci}\,\oldstylenums{1107}})}
%  \author{\hfill\textsc{Final Exam}\hfill ~~\raisebox{0.9ex}{\pgfornament[width=1.5em]{122}}~ 
%    \hfill \oldstylenums{05} \textsc{dec.} \oldstylenums{2019} \hfill}
%  \date{}  

  \reversemarginpar

\begin{document}

   \maketitle\thispagestyle{empty}

   \begin{minipage}{\textwidth}
     \vspace{-5.78cm}\hspace{1cm}
     \rulerparams{}{\scriptsize\oldstylenums}{gray}{5mm}{}
     \fgrulerthickin{}{}{}{}{1.5pt}
     \fgrulercaptionin{}
     \squareruler[in]{upperright}{5.75in}{8.75in}
   \end{minipage}

   \vspace{-6.5in}

   \begin{tikzpicture}[overlay, remember picture]
      \node[anchor=north west,right=2cm,below=1cm]%anchor is upper left corner of the graphic
          at (current page.north west)  %left upper corner of the page
           {\pgfornament[width=2cm]{41}}; 
      \node[anchor=north east,left=2cm,below=1cm]          %anchor is upper right corner of the graphic
          at (current page.north east)  %right upper corner of the page
           {\pgfornament[width=2cm]{42}}; 
      \node[anchor=south west,right=2cm,above=1cm]          %anchor is lower left corner of the graphic
           at (current page.south west) %left lower corner of the page
           {\pgfornament[width=2cm,symmetry=h]{41}}; 
      \node[anchor=south east,left=2cm,above=1cm]          %anchor is lower left corner of the graphic
           at (current page.south east) %left lower corner of the page
           {\pgfornament[width=2cm,symmetry=h]{42}}; 
   \end{tikzpicture}

%   \vspace{\fill}

    \medskip

   \begin{sffamily}%\begin{small}

     \textbf{Read over the entire exam} before you answer any question.
     The exam consists of \pageref{LastPage}~pages.
     There are \HowManyQs{} regular questions (\#\FirstQuestion--\#\LastQuestion) for you to answer and two \emph{optional} bonus questions.
%        \marginpar
%        {\tiny\raggedright\sffamily
%          {\boldmath
%          $$\left\downarrow
%          \parbox{0.95\marginparwidth}
%           {
%           \begin{tabular}{@{\,\,\,}l}
%            Hints and advice    \\
%            are in the margins  \\
%            beside some of the  \\
%            questions.
%           \end{tabular}
%           }
%          \right\downarrow$$}
%        }
     You have three hours (180 minutes) to complete the exam.
     You should use some of your time to \textbf{plan your answers}.
%     Hints and advice are in the margins beside some of the questions.

     Neatly write or print your answers in the test booklets provided.
     You may answer the questions in any order.
     \textbf{\ul{Start your answer to each question on a new page} or else} you will be penalized a half of a \emph{grade point} from your total score.

     Answers can be more than one page long;
     clearly identify the question number at the top of each of the answer pages, e.g.\ print `Question \#5' or `Question \#5 (cont.)'.
     There is not a question~1.\\
%     You may write on the backs of pages too.\\

   {\LARGE
   Return the exam questions with your answer booklet(s).}

\section*{\textsf{Reminders}}
     Your answers will be graded for accuracy, clarity, and
   completeness.
     Answers that are illegible, unintelligible, or in the colour red will not
   receive passing grades.
     Unless a question states otherwise you need to justify your answers.

       \textbf{If you cannot completely answer a question then} try to define the relevant terms and explain their importance.
       \textbf{If you think that a question is ambiguous then} clearly state a re\nolinebreak{}asonable assumption as part of your answer.

     \textbf{You may ask your professor or TA for clarification of any of the questions.}
     %No calculators, computers, or outside assistance is allowed.

\subsection*{\textsf{What you are allowed and what you are \emph{not} allowed}}
   \begin{itemize}
     \item No calculators, computers or books are allowed.

     \item You are allowed to have one $5\mbox\textonehalf\inch \times 8\mbox\textonehalf\inch$ (\SIlist{138}{\milli\metre} $\times$ \SIlist{216}{\milli\metre}) card or paper with notes but\newline \emph{no outside assistance} (except for clarification from the professor or a TA) is permitted.
   \end{itemize}

\subsection*{\textsf{Neatly complete the cover of the exam booklets}}

      Your professor's name is \underline{Jamie Blustein}.
     The course is \underline{CSCI\,1107}.
     Today is \underline{2022-12-21}.

 \end{sffamily}

  \vfill

\newpage
