Added URL to all handouts

This commit is contained in:
2024-04-01 21:50:50 -07:00
parent 0203f1f018
commit 17e019fd02
53 changed files with 346 additions and 92 deletions

View File

@ -7,7 +7,8 @@
\title{Warm-Up: Adders}
\subtitle{Prepared by \githref{Mark} on \today}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today}
\begin{document}

View File

@ -12,7 +12,8 @@
\title{Warm-Up: What's an AST?}
\subtitle{Prepared by \githref{Mark} on \today. \\ Based on a true story.}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today. \\ Based on a true story.}
\begin{document}

View File

@ -25,7 +25,8 @@
\title{The Electrician's Warm-Up}
\subtitle{Prepared by \githref{Mark} on \today}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today}
\begin{document}

View File

@ -14,7 +14,8 @@
\title{Warm-Up: Flip-Flops}
\subtitle{Prepared by \githref{Mark} on \today.}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today.}
\begin{document}
@ -30,7 +31,7 @@
\begin{tikzpicture}[circuit logic US, scale=2]
% tikz notes:
% -|: Select vertical of first and horizontal of second
% Gates
\node[or gate] (or) at (0,0) {\tiny\texttt{or}};
\node[not gate] (not) at (0,-0.8) {\tiny\texttt{not}};
@ -102,7 +103,7 @@
\begin{solution}
This is another S-R (\say{set-reset}) latch.
\end{solution}
\vfill
\pagebreak
@ -122,8 +123,8 @@
\begin{center}
\begin{tikzpicture}[circuit logic US, scale=2]
% Gates
\node[nand gate] (nandc) at (1.4,0) {\tiny\texttt{nand}};
\node[nand gate] (nandd) at (1.4,-1.2) {\tiny\texttt{nand}};

View File

@ -8,7 +8,8 @@
\title{Warm-Up: \texttt{fmod}}
\subtitle{Prepared by \githref{Mark} on \today.}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today.}
\begin{document}

View File

@ -14,7 +14,8 @@
}
\title{Warm-Up: The Gallery}
\subtitle{Prepared by \githref{Mark} on \today}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today}
\begin{document}

View File

@ -12,7 +12,8 @@
\usepackage{xskak}
\title{Warm Up: Jump Chess}
\subtitle{Prepared by \githref{Mark} on \today}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today}
% Source: Khan LSAT prep

View File

@ -8,7 +8,8 @@
\title{Warm-Up: Mario Kart}
\subtitle{Prepared by \githref{Mark} on \today}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today}
\begin{document}

View File

@ -9,7 +9,8 @@
\title{Warm-Up: A Familiar Concept}
\subtitle{Prepared by \githref{Mark} on \today}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today}
\begin{document}

View File

@ -40,7 +40,8 @@
}
\title{Warm Up: Odd dice}
\subtitle{Prepared by \githref{Mark} on \today}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today}
\begin{document}
@ -99,7 +100,7 @@
\node[main] (d) at (1, -2) {$d$};
\node[main] (e) at (-1, -2) {$e$};
\end{scope}
\draw[->]
(a) edge (b)
(b) edge (c)

View File

@ -6,7 +6,8 @@
\usepackage{../../resources/macros}
\title{Warm-Up: Painting}
\subtitle{Prepared by \githref{Mark} on \today.}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today.}
\begin{document}

View File

@ -7,7 +7,8 @@
\title{Warm-Up: Partition Products}
\subtitle{Prepared by \githref{Mark} on \today.}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today.}
\begin{document}

View File

@ -1,12 +1,14 @@
\documentclass[
solutions,
singlenumbering,
nopagenumber
nopagenumber,
hidewarning
]{../../resources/ormc_handout}
\usepackage{../../resources/macros}
\title{Warm-Up: Prime Factors}
\subtitle{Prepared by \githref{Mark} on \today.}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today.}
\begin{document}

View File

@ -12,7 +12,8 @@
\title{The Sysadmin's Warm-Up}
\subtitle{Prepared by \githref{Mark} on \today}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today}
\begin{document}

View File

@ -16,7 +16,8 @@
\title{The Regex Warm-Up}
\subtitle{Prepared by \githref{Mark} on \today}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today}
\begin{document}

View File

@ -7,7 +7,8 @@
\title{Warm-Up: Exact answers}
\subtitle{Prepared by \githref{Mark} on \today}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today}
\begin{document}

233
Misc/Warm-Ups/snake.tex Executable file
View File

@ -0,0 +1,233 @@
\documentclass[
solutions,
singlenumbering,
nopagenumber
]{../../resources/ormc_handout}
\usepackage{../../resources/macros}
\usepackage{ifthen}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{patterns}
% We put nodes in a separate layer, so we can
% slightly overlap with paths for a perfect fit
\pgfdeclarelayer{nodes}
\pgfdeclarelayer{path}
\pgfsetlayers{main,nodes}
% Layer settings
\tikzset{
% Layer hack, lets us write
% later = * in scopes.
layer/.style = {
execute at begin scope={\pgfonlayer{#1}},
execute at end scope={\endpgfonlayer}
},
%
% Arrowhead tweak
>={Latex[ width=2mm, length=2mm ]},
%
% Labels inside edges
label/.style = {
rectangle,
% For automatic red background in solutions
fill = \ORMCbgcolor,
draw = none,
rounded corners = 0mm
},
%
% Nodes
main/.style = {
draw,
circle,
fill = white,
line width = 0.4mm,
text width = 5mm,
align = center
},
accept/.style = {
draw,
circle,
fill = white,
double,
double distance = 0.5mm,
line width = 0.4mm,
text width = 5mm,
align = center
},
}
\title{Warm-Up: Snakes}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today}
\begin{document}
\maketitle
\newcounter{mycounter}
\setcounter{mycounter}{0}
\newif\iftmp
\begin{center}
\begin{tikzpicture}[scale = 0.6]
\begin{scope}[layer = nodes]
\foreach \r in {1,3,5,7,9} {
\foreach \i in {1,...,10} {
\pgfmathparse{Mod(\i-1,10)}
\let\x\pgfmathresult
\pgfmathparse{div(\i-1,10) + \r}
\let\y\pgfmathresult
\pgfmathparse{(\r-1)*10+\i}
\let\z\pgfmathresult
\tmpfalse
\pgfmathapproxequalto{\z}{4}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{5}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{19}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{21}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{28}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{31}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{35}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{44}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{47}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{52}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{53}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{59}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{70}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{76}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{81}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{88}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{98}
\ifpgfmathcomparison\tmptrue
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\stepcounter{mycounter}
\iftmp
\node[accept] (\arabic{mycounter}) at (2*\x, 2*\y) {
$\pgfmathprintnumber{\z}$
};
\else
\node[main] (\arabic{mycounter}) at (2*\x, 2*\y) {
$\pgfmathprintnumber{\z}$
};
\fi
}
\foreach \i in {1,...,10} {
\pgfmathparse{9 - Mod(\i-1,10)}
\let\x\pgfmathresult
\pgfmathparse{div(\i-1,10) + \r + 1}
\let\y\pgfmathresult
\pgfmathparse{\r*10+\i}
\let\z\pgfmathresult
\tmpfalse
\pgfmathapproxequalto{\z}{4}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{5}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{19}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{21}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{28}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{31}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{35}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{44}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{47}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{52}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{53}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{59}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{70}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{76}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{81}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{88}
\ifpgfmathcomparison\tmptrue
\else\pgfmathapproxequalto{\z}{98}
\ifpgfmathcomparison\tmptrue
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\stepcounter{mycounter}
\iftmp
\node[accept] (\arabic{mycounter}) at (2*\x, 2*\y) {
$\pgfmathprintnumber{\z}$
};
\else
\node[main] (\arabic{mycounter}) at (2*\x, 2*\y) {
$\pgfmathprintnumber{\z}$
};
\fi
}
}
\end{scope}
\draw[->, line width = 0.6mm, rounded corners = 2mm]
(4) -- +(1,0) -- +(1, 13) -- +(3, 13) -> (75);
\draw[->, line width = 0.6mm, rounded corners = 2mm]
(5) -- +(0,-1) -- +(1,-1) -- +(1,1) -- (15);
\draw[->, line width = 0.6mm, rounded corners = 2mm]
(19) -- +(1, 0) -- +(1, 5) -- + (-1, 5) -- (41);
\draw[->, line width = 0.6mm, rounded corners = 2mm]
(21) -- +(1, 0) -- +(1,-5) -- +(3, -5) -- (3);
\draw[->, line width = 0.6mm, rounded corners = 2mm]
(28) -- +(1,0) -- +(1,3) -- +(3,3) -- (50);
\draw[->, line width = 0.6mm, rounded corners = 2mm]
(31) -- +(1,0) -- +(1,-7) -- +(-3, -7) -- (8);
\draw[->, line width = 0.6mm, rounded corners = 2mm]
(35) -- +(-1,0) -- +(-1,11) -- (96);
\draw[->, line width = 0.6mm, rounded corners = 2mm]
(44) -- +(-1,0) -- +(-1,7) -- +(-3,7) -- (82);
\draw[->, line width = 0.6mm, rounded corners = 2mm]
(47) -- +(1,0) -- +(1,-3) -- +(5,-3) -- (30);
\draw[->, line width = 0.6mm, rounded corners = 2mm]
(52) -- +(-1, 0) -- +(-1, -1) -- +(-5,-1) -- +(-5,-5) -- +(-11,-5) -- (23);
\draw[->, line width = 0.6mm, rounded corners = 2mm]
(53) -- +(-1,0) -- +(-1,7) -- (94);
\draw[->, line width = 0.6mm, rounded corners = 2mm]
(59) -- +(-1, 0) -- +(-1,1) -- +(-3,1) -- +(-3,9) -- +(7, 9) -- (95);
\draw[->, line width = 0.6mm, rounded corners = 2mm]
(70) -- +(-1, 0) -- +(-1, 5) -- (91);
\draw[->, line width = 0.6mm, rounded corners = 2mm]
(76) -- +(-1, 0) -- +(-1,-1) -- +(-5,-1) -- +(-5,-5) -- +(-7,-5) -- (41);
\draw[->, line width = 0.6mm, rounded corners = 2mm]
(81) -- +(0, -1) -- +(3, -1) -- +(3, -3) -- (62);
\draw[->, line width = 0.6mm, rounded corners = 2mm]
(88) -- +(1, 0) -- +(1, -3) -- +(-1,-3) -- (67);
\draw[->, line width = 0.6mm, rounded corners = 2mm]
(98) -- +(0, 1.5) -- +(15.5, 1.5) -- +(15.5,-15) -- +(13, -15) -- (12);
\end{tikzpicture}
\end{center}
\end{document}

View File

@ -9,7 +9,8 @@
\title{Warm-Up: Fuse Timers}
\subtitle{Prepared by \githref{Mark} on \today.}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today.}
\begin{document}

View File

@ -6,7 +6,8 @@
\usepackage{../../resources/macros}
\title{Warm-Up: Travellers}
\subtitle{Prepared by \githref{Mark} on \today}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today}
\begin{document}

View File

@ -40,7 +40,8 @@
% The player who makes a three in a row of Xs (or black chips) wins the game
\title{Warm-Up: Big-Tac-Toe}
\subtitle{Prepared by \githref{Mark} on \today.}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today.}
\begin{document}

View File

@ -16,7 +16,8 @@
\title{Warm-Up: Wild Tic-Tac-Toe}
\subtitle{Prepared by \githref{Mark} on \today.}
\uptitler{\smallurl{}}
\subtitle{Prepared by Mark on \today.}
\begin{document}