\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Strickery} \pdfinfo{ /Title (cheatsheet-evalutie.pdf) /Creator (Cheatography) /Author (Strickery) /Subject (Cheatsheet Evalutie Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{A3A3A3} \definecolor{LightBackground}{HTML}{F3F3F3} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Cheatsheet Evalutie Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Strickery} via \textcolor{DarkBackground}{\uline{cheatography.com/145012/cs/31201/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Strickery \\ \uline{cheatography.com/strickery} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 15th March, 2022.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Enumeraties}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Zo maak je een enum aan: \newline % Row Count 1 (+ 1) `namespace Programmeren \{` \newline % Row Count 2 (+ 1) ` enum Weekdagen \{Maandag, Dinsdag, Woensdag, Donderdag, Vrijdag, Zaterdag, Zondag\}` \newline % Row Count 4 (+ 2) `\}` \newline % Row Count 5 (+ 1) Je kan er vervolgens variabelen met aanmaken: \newline % Row Count 6 (+ 1) `Weekdagen variabeleNaam;` \newline % Row Count 7 (+ 1) Vervolgens kan je er waarde aan toekennen: \newline % Row Count 8 (+ 1) `variabeleNaam = Weekdagen.Maandag` \newline % Row Count 9 (+ 1) Je kan het vervolgens omzetten in getal of gewoon een string: \newline % Row Count 11 (+ 2) `Console.WriteLine(\$"\{(int) Weekdagen.Maandag\}. \{Weekdagen.Maandag\}");`% Row Count 13 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Symbolen classes}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Groen leeg bolletje = public attribuut \newline % Row Count 1 (+ 1) Rood leeg vierkantje = private attribuut \newline % Row Count 2 (+ 1) Onderlijnt = static \newline % Row Count 3 (+ 1) Groen vol bolletje = methode% Row Count 4 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{DateTime}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Geeft de huidige tijd weer: \newline % Row Count 1 (+ 1) `DateTime variabeleNaam = DateTime.now;` \newline % Row Count 2 (+ 1) Geeft een custom tijd weer: \newline % Row Count 3 (+ 1) `DateTime variabeleNaam = new DateTime(year, month, day);` \newline % Row Count 5 (+ 2) `DateTime variabeleNaam = new DateTime(year, month, day, hours, minutes, seconds, millisecond);` \newline % Row Count 7 (+ 2) Voeg data toe: \newline % Row Count 8 (+ 1) - AddDays \newline % Row Count 9 (+ 1) - AddHours \newline % Row Count 10 (+ 1) - ddMilliseconds \newline % Row Count 11 (+ 1) - AddMinutes \newline % Row Count 12 (+ 1) - AddMonths \newline % Row Count 13 (+ 1) - AddSeconds \newline % Row Count 14 (+ 1) - AddTicks \newline % Row Count 15 (+ 1) - AddYears \newline % Row Count 16 (+ 1) voorbeeld: \newline % Row Count 17 (+ 1) `DateTime variabeleNaam = DateTime.Now;` \newline % Row Count 18 (+ 1) `DateTime variabeleNaam = timeNow.AddYears(5)`;% Row Count 19 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{DateTime Extra}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Enkele Properties: \newline % Row Count 1 (+ 1) - Date \newline % Row Count 2 (+ 1) - Day \newline % Row Count 3 (+ 1) - DayOfWeek \newline % Row Count 4 (+ 1) - DayOfYear \newline % Row Count 5 (+ 1) - Hour \newline % Row Count 6 (+ 1) - Millisecond \newline % Row Count 7 (+ 1) - Minute \newline % Row Count 8 (+ 1) - Month \newline % Row Count 9 (+ 1) - Second \newline % Row Count 10 (+ 1) - Ticks \newline % Row Count 11 (+ 1) - TimeOfDay \newline % Row Count 12 (+ 1) - Today \newline % Row Count 13 (+ 1) - UtcNow \newline % Row Count 14 (+ 1) - Year \newline % Row Count 15 (+ 1) voorbeeld: \newline % Row Count 16 (+ 1) `DateTime moment = new DateTime(1999, 1, 13, 3, 57, 32, 11);` \newline % Row Count 18 (+ 2) Datum \& tijd formatteren: \newline % Row Count 19 (+ 1) \seqsplit{`WriteLine(now.ToString("d"));} // short date ` \newline % Row Count 20 (+ 1) \seqsplit{`WriteLine(now.ToString("D"));} // long date ` \newline % Row Count 21 (+ 1) \seqsplit{`WriteLine(now.ToString("F"));} // full date and time` \newline % Row Count 23 (+ 2) \seqsplit{`WriteLine(now.ToString("M"));} // month and day` \newline % Row Count 24 (+ 1) \seqsplit{`WriteLine(now.ToString("o"));} // date en time separated by T and time zone at the end` \newline % Row Count 26 (+ 2) \seqsplit{`WriteLine(now.ToString("R"));} // RFC1123 date and time` \newline % Row Count 28 (+ 2) \seqsplit{`WriteLine(now.ToString("t"));} // short time` \newline % Row Count 29 (+ 1) \seqsplit{`WriteLine(now.ToString("T"));} // long time` \newline % Row Count 30 (+ 1) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{DateTime Extra (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{\seqsplit{`WriteLine(now.ToString("Y"));} // year and month` \newline % Row Count 1 (+ 1) EXTRA: \newline % Row Count 2 (+ 1) d -\textgreater{} Represents the day of the month as a number from 1 through 31. \newline % Row Count 4 (+ 2) dd -\textgreater{} Represents the day of the month as a number from 01 through 31. \newline % Row Count 6 (+ 2) ddd-\textgreater{} Represents the abbreviated name of the day (Mon, Tues, Wed, etc). \newline % Row Count 8 (+ 2) dddd-\textgreater{} Represents the full name of the day (Monday, Tuesday, etc). \newline % Row Count 10 (+ 2) h-\textgreater{} 12-hour clock hour (e.g. 4). \newline % Row Count 11 (+ 1) hh-\textgreater{} 12-hour clock, with a leading 0 (e.g. 06) \newline % Row Count 12 (+ 1) H-\textgreater{} 24-hour clock hour (e.g. 15) \newline % Row Count 13 (+ 1) HH-\textgreater{} 24-hour clock hour, with a leading 0 (e.g. 22) \newline % Row Count 15 (+ 2) m-\textgreater{} Minutes \newline % Row Count 16 (+ 1) mm-\textgreater{} Minutes with a leading zero \newline % Row Count 17 (+ 1) M-\textgreater{} Month number(eg.3) \newline % Row Count 18 (+ 1) MM-\textgreater{} Month number with leading zero(eg.04) \newline % Row Count 19 (+ 1) MMM-\textgreater{} Abbreviated Month Name (e.g. Dec) \newline % Row Count 20 (+ 1) MMMM-\textgreater{} Full month name (e.g. December) \newline % Row Count 21 (+ 1) s-\textgreater{} Seconds \newline % Row Count 22 (+ 1) ss-\textgreater{} Seconds with leading zero \newline % Row Count 23 (+ 1) t-\textgreater{} Abbreviated AM / PM (e.g. A or P) \newline % Row Count 24 (+ 1) tt-\textgreater{} AM / PM (e.g. AM or PM \newline % Row Count 25 (+ 1) y-\textgreater{} Year, no leading zero (e.g. 2015 would be 15) \newline % Row Count 26 (+ 1) yy-\textgreater{} Year, leading zero (e.g. 2015 would be 015) \newline % Row Count 27 (+ 1) yyy-\textgreater{} Year, (e.g. 2015) \newline % Row Count 28 (+ 1) yyyy-\textgreater{} Year, (e.g. 2015) \newline % Row Count 29 (+ 1) Localized time: \newline % Row Count 30 (+ 1) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{DateTime Extra (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`CultureInfo russianCI = new CultureInfo("ru-RU");` \newline % Row Count 2 (+ 2) \seqsplit{`Console.WriteLine(\$"Current} time in Russian style is: \{now.ToString("F", russianCI)\}");` \newline % Row Count 4 (+ 2) en-US English \newline % Row Count 5 (+ 1) nl-BE Dutch (Belgium) \newline % Row Count 6 (+ 1) String parsen naar DateTime: \newline % Row Count 7 (+ 1) `string variabeleNaam = "8/11/2016"; //dit zou dus ook door gebruiker kunnen ingetypt zijn` \newline % Row Count 9 (+ 2) `DateTime variabeleNaam = \seqsplit{DateTime.Parse(date\_string);`} \newline % Row Count 11 (+ 2) Schrikkeljaar: \newline % Row Count 12 (+ 1) `bool isLeap = \seqsplit{DateTime.IsLeapYear(today.Year);`} \newline % Row Count 13 (+ 1) `if(isLeap == true) \{` \newline % Row Count 14 (+ 1) ` Console.WriteLine("This year is a leap year");` \newline % Row Count 16 (+ 2) `\}` \newline % Row Count 17 (+ 1) Rekenen met DateTime: \newline % Row Count 18 (+ 1) `DateTime variabeleNaam1 = DateTime.Today;` \newline % Row Count 19 (+ 1) `DateTime variabeleNaam2 = new DateTime(year, month, day);` \newline % Row Count 21 (+ 2) `TimeSpan variabeleNaam = variabeleNaam1 - variabeleNaam2;`% Row Count 23 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}