diff --git a/20160428/nc-20160428-1.txt b/20160428/nc-20160428-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..1793d3e9215f451c313398caa924d44a0c68e133 --- /dev/null +++ b/20160428/nc-20160428-1.txt @@ -0,0 +1,25 @@ +cassini/home/peter> nc -p 1234 -l +test + + +Hier auch Test. +:-) + +:-D +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. + + +Damit Ihr indess erkennt, woher dieser ganze Irrthum gekommen ist, und weshalb man die Lust anklagt und den Schmerz lobet, so will ich Euch Alles er�ffnen und auseinander setzen, was jener Begr�nder der Wahrheit und gleichsam Baumeister des gl�cklichen Lebens selbst dar�ber gesagt hat. Niemand, sagt er, verschm�he, oder hasse, oder fliehe die Lust als solche, sondern weil grosse Schmerzen ihr folgen, wenn man nicht mit Vernunft ihr nachzugehen verstehe. Ebenso werde der Schmerz als solcher von Niemand gel + +Dagegen tadelt und hasst man mit Recht Den, welcher sich durch die Lockungen einer gegenw�rtigen Lust erweichen und verf�hren l�sst, ohne in seiner blinden Begierde zu sehen, welche Schmerzen und Unannehmlichkeiten seiner deshalb warten. Gleiche Schuld treffe Die, welche aus geistiger Schw�che, d.h. um der Arbeit und dem Schmerze zu entgehen, ihre Pflichten verabs�umen. Man kann hier leicht und schnell den richtigen Unterschied treffen; zu einer ruhigen Zeit, wo die Wahl der Entscheidung v�llig frei ist u + + + +Die h�bsche Studentin zum Professor: "Glauben sie mir, ich w�rde alles tun, um dieses Examen zu bestehen. Ich meine wirklich alles." + +Der Professor hakt nach: "Wirklich alles?" + +Sie beugt sich zu ihm und blickt ihm tief in die Augen, wobei sie haucht: "Alles." + +Da fragt er im Fl�sterton: "W�rden sie lernen?" + diff --git a/20160512/721px-Pfs-logo.png b/20160512/721px-Pfs-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..1b9d6698223254ba7c4170905b311b162cad2274 Binary files /dev/null and b/20160512/721px-Pfs-logo.png differ diff --git a/20160512/Adobe-Reader.png b/20160512/Adobe-Reader.png new file mode 100644 index 0000000000000000000000000000000000000000..30d8d244efbda994a9c6e832705c93c3eba4ef4f Binary files /dev/null and b/20160512/Adobe-Reader.png differ diff --git a/20160512/Copyright.pdf b/20160512/Copyright.pdf new file mode 100644 index 0000000000000000000000000000000000000000..69f4ec0c29489b7c1eb24724c79153cea1087156 Binary files /dev/null and b/20160512/Copyright.pdf differ diff --git a/20160512/Microsoft_Power_Point_2010.png b/20160512/Microsoft_Power_Point_2010.png new file mode 100644 index 0000000000000000000000000000000000000000..ce91df9e0cb33e1d0e644a5ac25f916c266f4524 Binary files /dev/null and b/20160512/Microsoft_Power_Point_2010.png differ diff --git a/20160512/a-gnu-head.pdf b/20160512/a-gnu-head.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3dcb28fc1147f4b801391c6e5d54a9c4c9311bd6 Binary files /dev/null and b/20160512/a-gnu-head.pdf differ diff --git a/20160512/libreoffice-impress.pdf b/20160512/libreoffice-impress.pdf new file mode 100644 index 0000000000000000000000000000000000000000..df752f1d6d50d46ed2f1ed9964190ba4dad2fa75 Binary files /dev/null and b/20160512/libreoffice-impress.pdf differ diff --git a/20160512/lic-20160512.pdf b/20160512/lic-20160512.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8e9b208befedb84bcfb352c02710e6dd3374a021 Binary files /dev/null and b/20160512/lic-20160512.pdf differ diff --git a/20160512/lic-20160512.tex b/20160512/lic-20160512.tex new file mode 100644 index 0000000000000000000000000000000000000000..b35e6d755722127bb870c61c2bfb6ee628063420 --- /dev/null +++ b/20160512/lic-20160512.tex @@ -0,0 +1,634 @@ +% lic-20160512.pdf - Lecture Slides on Applied Computer Sciences +% Copyright (C) 2012, 2015, 2016 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/>. + +\documentclass[10pt]{beamer} + +\usepackage[utf8]{inputenc} +\usepackage[german]{babel} +\usepackage[T1]{fontenc} +\usepackage{helvet} +\renewcommand*\familydefault{\sfdefault} + +\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} +\addtolength{\topmargin}{0.15cm} + +\usepackage{pstricks} +\newrgbcolor{darkgreen}{0.0 0.3 0.0} +\newrgbcolor{lightred}{1.0 0.7 0.7} +\newrgbcolor{lightgray}{0.85 0.85 0.85} +\newrgbcolor{medgray}{0.4 0.4 0.4} + +\usepackage{listings} +\lstset{basicstyle=\color{structure}, + language=C, + captionpos=b, + gobble=4, + columns=fullflexible, + aboveskip=0pt, + belowskip=0pt, + moredelim=**[is][\color{red}]{¡}{¿}, + 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}, + columns=fixed, + moredelim=**[is][\color{red}]{¡}{¿}, + moredelim=**[is][\color{structure}]{°}{¿}} +\lstdefinestyle{shy}{basicstyle=\color{lightgray}, + moredelim=**[is][\color{structure}]{¡}{¿}} +\lstdefinestyle{semishy}{basicstyle=\color{medgray}, + moredelim=**[is][\color{structure}]{¡}{¿}} + +\usepackage{multirow} + +\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} +\newcommand{\file}[1]{{\color{structure}\protectfile{#1}}} +\newcommand{\textarrow}{{\boldmath $\longrightarrow$}} +\newcommand{\arrowitem}{\item[\textarrow]} +\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{{\Large\color{structure}\bf\secname\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} + +\begin{document} + +\sectionnonumber{Software-Lizenzen} +\subsectionnonumber{Vorab: Dies ist keine Rechtsdienstleistung!} + +\begin{frame}[t,plain] + \showsectionnonumber + \pause + \showsubsectionnonumber + + \textbf{\S\,2 RDG: Begriff der Rechtsdienstleistung} + + \smallskip + + (1) Rechtsdienstleistung ist jede Tätigkeit in + {\only<3->{\color{red}}konkreten} fremden Angelegenheiten, + sobald sie eine rechtliche Prüfung des + {\only<3->{\color{red}}Einzelfalls} erfordert. + + \medskip + + \strut\hfill Quelle: \url{http://www.gesetze-im-internet.de/rdg/} + + \pause + \pause + + \bigskip + + Konkreter Fall: + \begin{itemize} + \item + Konkretes Programm unter Lizenz A + \item + Konkrete Bibliothek unter Lizenz B + \item + Beratung: Paßt das zusammen? + \arrowitem + Rechtsdienstleistung + \end{itemize} +\end{frame} + + \subsectionnonumber{Lizenz-Beratung unter Kollegen?} + +\begin{frame}[t,plain] + \showsectionnonumber + \showsubsectionnonumber + + \textbf{\S\,6 RDG: Unentgeltliche Rechtsdienstleistungen} + + \smallskip + + (1) Erlaubt sind Rechtsdienstleistungen, die nicht im Zusammenhang mit einer entgeltlichen + Tätigkeit stehen (unentgeltliche Rechtsdienstleistungen). + + \smallskip + + (2) Wer unentgeltliche Rechtsdienstleistungen außerhalb familiärer, nachbarschaftlicher oder + ähnlich enger persönlicher Beziehungen erbringt, muss sicherstellen, dass die Rechtsdienstleistung + durch eine Person, der die entgeltliche Erbringung dieser Rechtsdienstleistung erlaubt ist, durch + eine Person mit Befähigung zum Richteramt oder unter Anleitung einer solchen Person erfolgt. + [\,\dots] + + \medskip + + \strut\hfill Quelle: \url{http://www.gesetze-im-internet.de/rdg/} + + \pause + + \bigskip + + \begin{itemize} + \arrowitem + Nur allgemein beraten!\\ + Konkrete Fälle an Anwalt verweisen! + \end{itemize} + +\end{frame} + + \subsectionnonumber{Überblick} + \newcommand{\lcr}{\includegraphics[width=0.5cm]{Copyright.pdf}} + \newcommand{\lcl}{\includegraphics[width=0.5cm]{Copyleft.pdf}} + \newcommand{\lcc}{\includegraphics[width=0.5cm]{creative-commons.png}} + \newcommand{\lpd}{\includegraphics[width=0.5cm]{PD-icon.pdf}} + +\begin{frame}[t,plain] + \showsectionnonumber + \showsubsectionnonumber + + \begin{itemize} + \item + Grundlage: Urheberrecht ($\approx$ Copyright) \hfill \lcr\\ + "`Wer Software schreibt, entscheidet, was damit geschehen darf."' + \pause + \medskip + \item + anderen etwas erlauben: Lizenz + \pause + \medskip + \item + "`gar keine Lizenz"' = alles verboten + \end{itemize} +\end{frame} + +\begin{frame}[t,plain] + \showsectionnonumber + \showsubsectionnonumber + + \begin{center} + \begin{picture}(12,5) + \put(5,5){\makebox(0,0){Software-Lizenz}} + \put(4.5,4.7){\vector(-1,-1){1}} + \put(5.5,4.7){\vector(1,-1){1}} + \put(3,3.4){\makebox(0,0){proprietär}} + \put(7,3.4){\makebox(0,0){frei / Open Source}} + \put(6.5,3.1){\vector(-1,-1){1.5}} + \put(7.5,3.1){\vector(1,-1){1}} + \put(4.5,1.3){\makebox(0,0){freizügig}} + \put(9,1.8){\makebox(0,0){Copyleft}} + \end{picture}% + \begin{onlyenv}<2->% + \begin{picture}(0,0)(12,0) + \color{darkgreen} + \put(2.5,3.1){\vector(-1,-1){0.5}} + \put(3.5,3.1){\vector(1,-1){0.5}} + \put(2.0,2.3){\makebox(0,0){kommerziell}} + \put(4.0,2.3){\makebox(0,0){gratis}} + \put(4.0,1.0){\vector(-1,-1){0.5}} + \put(5.0,1.0){\vector(1,-1){0.5}} + \put(3.5,0.2){\makebox(0,0){kommerziell}} + \put(5.5,0.2){\makebox(0,0){gratis}} + \put(8.5,1.5){\vector(-1,-1){0.5}} + \put(9.5,1.5){\vector(1,-1){0.5}} + \put(8.0,0.7){\makebox(0,0){kommerziell}} + \put(10.0,0.7){\makebox(0,0){gratis}} + \end{picture}% + \end{onlyenv}% + \end{center} + +\end{frame} + + \subsectionnonumber{Lizenzmodelle} + +\begin{frame}[t,plain] + \showsectionnonumber + \showsubsectionnonumber + + \begin{itemize} + \item + Freie Software darf man + \hfill\begin{picture}(0,0) + \put(-1.8,-0.8){\includegraphics[width=2cm]{a-gnu-head.pdf}} + \end{picture} + \begin{itemize} + \item[0.] + benutzen, + \item[1.] + studieren und anpassen, + \item[2.] + weitergeben, + \item[3.] + weiterentwickeln und veröffentlichen. + \end{itemize} + \strut\hfill + 4 Grundfreiheiten -- + \url{http://www.gnu.org/philosophy/free-sw}\\ + \pause + \begin{picture}(0,0) + \color{red} + \put(6.95,1.85){\vector(-1,0){1.5}} + \put(7.00,1.75){\vector(-1,-1){0.5}} + \put(7.05,1.85){\makebox(0,0)[l]{Quelltext erforderlich!}} + \end{picture}% + \pause + \medskip + \item + Open Source: i.\,w.\ dasselbe in 10 Kriterien + \hfill\begin{picture}(0,0) + \put(-1.2,-0.5){\includegraphics[width=1.1cm]{osi-logo.jpg}} + \end{picture}\\ + Begründung: technisch statt philosophisch\\[\smallskipamount] + \strut\hfill + Definition: + \url{http://www.opensource.org/docs/osd} + \end{itemize} + +\end{frame} + +\begin{frame}[t,plain] + \showsectionnonumber + \showsubsectionnonumber + + \begin{itemize} + \item + Proprietäre Software / Closed Source\\ + Gegenteil von freier Software / Open Source + \medskip + \begin{itemize} + \item + Benutzen, Weitergeben und/oder Veröffentlichen\\ + erfordert individuelle Erlaubnis des Rechteinhabers + \medskip + \item + Studieren, Anpassen und/oder Weiterentwickeln\\ + nur dem Rechteinhaber erlaubt + \pause + {\color{red}und/oder möglich\\ + (Quelltext erforderlich!)} + \end{itemize} + \end{itemize} + +\end{frame} + +\begin{frame}[t,plain] + \showsectionnonumber + \showsubsectionnonumber + + \begin{itemize} + \item + Freie Software + \smallskip + \begin{itemize} + \item + Copyleft\only<2->{:}\\[\smallskipamount] + \begin{visibleenv}<2-> + Weitergabe nur unter gleichen Bedingungen erlaubt\\ + \textarrow\ Umwandlung in proprietäre Software nicht erlaubt + \end{visibleenv} + \medskip + \item + freizügig\only<3->{:}\\[\smallskipamount] + \begin{visibleenv}<3-> + Weitergabe auch unter anderen Bedingungen erlaubt\\ + \textarrow\ Umwandlung in \only<4->{Copyleft- oder }proprietäre Software erlaubt + \end{visibleenv} + \begin{onlyenv}<5-> + \medskip + \item + Teil-Copyleft:\\[\smallskipamount] + Linken mit proprietärer Software erlaubt + \end{onlyenv} + \end{itemize} + \end{itemize} + + +\end{frame} + + \subsectionnonumber{Beispiel-Programme} + +\begin{frame}[t,plain] + \showsectionnonumber + \showsubsectionnonumber + + \begin{center} + \renewcommand{\arraystretch}{2.5} + \begin{tabular}{|c||c|c|c|}\hline + & \multirow{2}{*}{proprietär} & \multicolumn{2}{c|}{frei}\\\cline{3-4} + & & freizügig & Copyleft \\\hline\hline + \color{darkgreen}kommerziell + & \color{structure}\visible<2->{\shortstack{\\\includegraphics[width=0.5cm]{Microsoft_Power_Point_2010.png}\\\small Microsoft PowerPoint}} + & \color{structure}\visible<6->{\shortstack{\\\includegraphics[width=1.0cm]{721px-Pfs-logo.png}\\\small pfSense}} + & \color{structure}\visible<5->{\shortstack{\\\includegraphics[width=0.8cm]{open-xchange.jpg}\\\small Open-Xchange}} \\\hline + \color{darkgreen}gratis + & \color{structure}\visible<4->{\shortstack{\\\includegraphics[width=0.8cm]{Adobe-Reader.png}\\\small Adobe Reader}} + & \color{structure}\visible<6->{\shortstack{\\\includegraphics[width=0.5cm]{putty.png}\\\small PuTTY}} + & \color{structure}\visible<3->{\shortstack{\\\includegraphics[width=0.5cm]{libreoffice-impress.pdf}\\\small LibreOffice Impress}} \\\hline + \end{tabular} + \end{center} + \begin{onlyenv}<7->% + \begin{picture}(0,0)(0,-0.5) + \color{red} + \put(7.38,1.38){$\updownarrow$} + \put(9.8,1.38){$\updownarrow$} + \end{picture}% + \end{onlyenv}% + \begin{onlyenv}<8->% + \begin{picture}(0,0)(0,-0.7) + \color{red} + \put(6.3,2.7){$\longleftarrow$} + \put(8.05,2.7){$\longrightarrow$} + \end{picture}% + \end{onlyenv}% + +\end{frame} + + \subsectionnonumber{Beispiel-Lizenzen} + +\begin{frame}[t,plain] + \showsectionnonumber + \showsubsectionnonumber + + Generell: Gewährleistungsausschluß + + \bigskip + + \pause + Freie Software / Open Source + \begin{itemize} + \item + strenges Copyleft: + GNU GPL, GNU FDL, CC BY-SA + \pause + \item + Teil-Copyleft: + GNU LGPL, Mozilla-Lizenz, Microsoft Public License + \pause + \item + freizügig: + Modifizierte BSD-Lizenz, Apache-Lizenz, CC BY,\\ + CC0, Public Domain + \end{itemize} + \pause + \strut\hfill\url{http://www.gnu.org/licenses/license-list} + +\end{frame} + +\begin{frame}[t,plain] + \showsectionnonumber + \showsubsectionnonumber + + Generell: Gewährleistungsausschluß + + \bigskip + + Proprietäre Software + + \begin{itemize} + \item + Lizenz i.\,d.\,R.\ für jedes Programm anders + \pause + \medskip + \item + "`Normales"' Beispiel (Januar 2012):\\ + Adobe Reader EULA\\[\smallskipamount] + Verwenden \only<3->{nur auf PCs }erlaubt\pause\pause,\\ + Studieren und Weitergeben nicht erlaubt\pause,\\ + Screenshots nicht erlaubt\\[\smallskipamount] + \pause + Der Software ist die Kommunikation mit Adobe\\ + und mit Werbeanbietern erlaubt.\\[\medskipamount] + \pause + \strut\hfill\url{http://www.adobe.com/products/eulas/reader/x/eula_de_de.html} + \medskip + \end{itemize} + +\end{frame} + +\begin{frame}[t,plain] + \showsectionnonumber + \showsubsectionnonumber + + Generell: Gewährleistungsausschluß + + \bigskip + + Proprietäre Software + + \begin{itemize} + \item + Kontroverses Beispiel (Januar 2012):\\ + iBooks Author EULA\\[\smallskipamount] + Layout für elektronische Bücher erstellen\\ + \pause + \textarrow\ Buch darf nur über den iBooks Store verkauft werden\\[\medskipamount] + \strut\hfill\url{http://venomousporridge.com/post/16126436616/}\\ + \strut\hfill\url{ibooks-author-eula-audacity} + \end{itemize} + +\end{frame} + +\begin{frame}[t,plain] + \showsectionnonumber + \showsubsectionnonumber + + Generell: Gewährleistungsausschluß + + \bigskip + + Proprietäre Software + + \begin{itemize} + \item + Kontroverses Beispiel (September 2001):\\ + Microsoft FrontPage 2002 EULA\\[\smallskipamount] + Webseiten erstellen\\ + \pause + \textarrow\ Webseiten dürfen Microsoft nicht "`herabsetzen"'\\[\medskipamount] + \strut\hfill\url{http://www.heise.de/newsticker/data/jes-21.09.01-001/} + \end{itemize} + +\end{frame} + +\begin{frame}[t,plain] + \showsectionnonumber + \showsubsectionnonumber + + Generell: Gewährleistungsausschluß + + \bigskip + + Proprietäre Software + + \begin{itemize} + \item + Kontroverses Beispiel (Juli 2001):\\ + Microsoft Mobile Internet Toolkit EULA\\[\smallskipamount] + Software erstellen\\ + \pause + \textarrow\ Verbot, {\color{darkgreen}"`virale"'} Software + \only<3->{(= Copyleft-Software) }zu erstellen \\ + \pause + \pause + \textarrow\ Verbot, Copyleft-Werkzeuge mit einzusetzen \\ + \textarrow\ Verbot, entwickelte Software gemeinsam mit Copyleft-Software\\ + \strut\phantom{\textarrow} einzusetzen oder zu vertreiben\\[\medskipamount] + \strut\hfill\url{http://web.archive.org/web/20010626201507/}\\ + \strut\hfill\url{http://msdn.microsoft.com/downloads/eula_mit.htm} + \end{itemize} + + % Nicht auf derselben CD: http://msdn.microsoft.com/downloads/eula_mit.htm, 22.7.2001 + +\end{frame} + + \subsectionnonumber{Copyleft} + +\begin{frame}[t,plain] + \showsectionnonumber + \showsubsectionnonumber + + Microsoft: Copyleft-Software ist {\color{darkgreen}"`viral"'}\\[\smallskipamount] + \strut\hfill\url{http://web.archive.org/web/20010626201507/}\\ + \strut\hfill\url{http://msdn.microsoft.com/downloads/eula_mit.htm} + + \bigskip + + \begin{center} + \color{structure}% + \begin{onlyenv}<2->% + \begin{picture}(10,5) + \put(5,5){\makebox(0,0){Code aus fremder Software benutzen}} + \end{picture}% + \end{onlyenv}% + \begin{onlyenv}<3->% + \begin{picture}(0,0)(10,0) + \put(4.5,4.7){\vector(-1,-1){1}} + \put(3.5,3.4){\makebox(0,0){\strut GPL-Software:}} + \put(3.5,2.95){\makebox(0,0){\strut{\color{darkgreen}bedingt} erlaubt}} + \end{picture}% + \end{onlyenv}% + \begin{onlyenv}<4->% + \begin{picture}(0,0)(10,0) + \color{darkgreen} + \put(3.0,2.7){\vector(0,-1){0.7}} + \put(3.0,1.8){\makebox(0,0){\strut Gesamtwerk muß}} + \put(3.0,1.35){\makebox(0,0){\strut unter GPL stehen}} + \end{picture}% + \end{onlyenv}% + \begin{onlyenv}<5->% + \begin{picture}(0,0)(10,0) + \put(5.5,4.7){\vector(1,-1){1}} + \put(6.5,3.4){\makebox(0,0){\strut MS-Software:}} + \put(6.5,2.95){\makebox(0,0){\strut{\color{red}nicht} erlaubt}} + \end{picture}% + \end{onlyenv}% + \begin{onlyenv}<6->% + \begin{picture}(0,0)(10,0) + \color{black} + \put(5.5,1.2){\makebox(0,0)[l]{\textarrow\ + \begin{minipage}[t]{5cm} + Lizenzen lesen,\\ + sorgfältig auswählen + \end{minipage}}} + \end{picture}% + \end{onlyenv}% + \end{center} + +\end{frame} + + \subsectionnonumber{Fazit} + +\begin{frame}[t,plain] + \showsectionnonumber + + {\large\color{structure}\bf Fazit\par} + \begin{itemize} + \item + Generell: Vor Benutzung Lizenz lesen, durch Anwalt prüfen lassen + \pause + \item + "`gar keine Lizenz"' = alles verboten + \end{itemize} + + \pause + Bearbeitung, Weitergabe und Mitverwendung + \begin{itemize} + \pause + \item + nicht erlaubt oder nicht möglich + \textarrow\ proprietäre Software / Closed Source + \pause + \item + erlaubt \textarrow\ freie Software / Open Source + \begin{itemize} + \pause + \item + bei Mitverwendung Lizenz übernehmen \textarrow\ Copyleft + \pause + \item + Lizenz umwandelbar \textarrow\ freizügig + \end{itemize} + \end{itemize} + + \pause + + \bigskip + + {\large\color{structure}\bf Lizenz für Material zu dieser Vorlesung\par} + \begin{itemize} + \item + Skript: Copyleft + \item + Beispiel-Programme: freizügig + \end{itemize} + +\end{frame} + +\end{document} diff --git a/20160512/logo-hochschule-bochum-cvh-text.pdf b/20160512/logo-hochschule-bochum-cvh-text.pdf new file mode 120000 index 0000000000000000000000000000000000000000..a05946126bc0ce6a2818740da2893f59eb0c659c --- /dev/null +++ b/20160512/logo-hochschule-bochum-cvh-text.pdf @@ -0,0 +1 @@ +../common/logo-hochschule-bochum-cvh-text.pdf \ No newline at end of file diff --git a/20160512/logo-hochschule-bochum.pdf b/20160512/logo-hochschule-bochum.pdf new file mode 120000 index 0000000000000000000000000000000000000000..b6b9491e370e499c9276918182cdb82cb311bcd1 --- /dev/null +++ b/20160512/logo-hochschule-bochum.pdf @@ -0,0 +1 @@ +../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20160512/open-xchange.jpg b/20160512/open-xchange.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d1e06bfb8722813f3e4dfff4c3a5da2016d594a2 Binary files /dev/null and b/20160512/open-xchange.jpg differ diff --git a/20160512/osi-logo.jpg b/20160512/osi-logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d9d29548b455ec1bb9ee4e7a9b9757c1567dc375 Binary files /dev/null and b/20160512/osi-logo.jpg differ diff --git a/20160512/pgslides.sty b/20160512/pgslides.sty new file mode 120000 index 0000000000000000000000000000000000000000..5be1416f4216f076aa268901f52a15d775e43f64 --- /dev/null +++ b/20160512/pgslides.sty @@ -0,0 +1 @@ +../common/pgslides.sty \ No newline at end of file diff --git a/20160512/putty.png b/20160512/putty.png new file mode 100644 index 0000000000000000000000000000000000000000..63693df07f200e3e74119fed16237b438cac651b Binary files /dev/null and b/20160512/putty.png differ diff --git a/20160616/hello-1.C b/20160616/hello-1.C new file mode 100644 index 0000000000000000000000000000000000000000..04f85e594a6a7ccbfde429021f61e9556f9581e9 --- /dev/null +++ b/20160616/hello-1.C @@ -0,0 +1,7 @@ +#include <iostream> + +int main () +{ + std::cout << "Hello, world!" << std::endl; + return 0; +} diff --git a/20160616/hello-1.c b/20160616/hello-1.c new file mode 120000 index 0000000000000000000000000000000000000000..64628868e53236f8739c6ef4c8f888711586e049 --- /dev/null +++ b/20160616/hello-1.c @@ -0,0 +1 @@ +hello-1.C \ No newline at end of file diff --git a/20160616/hello-1.cc b/20160616/hello-1.cc new file mode 120000 index 0000000000000000000000000000000000000000..64628868e53236f8739c6ef4c8f888711586e049 --- /dev/null +++ b/20160616/hello-1.cc @@ -0,0 +1 @@ +hello-1.C \ No newline at end of file diff --git a/20160616/hello-1.cpp b/20160616/hello-1.cpp new file mode 120000 index 0000000000000000000000000000000000000000..64628868e53236f8739c6ef4c8f888711586e049 --- /dev/null +++ b/20160616/hello-1.cpp @@ -0,0 +1 @@ +hello-1.C \ No newline at end of file diff --git a/20160616/hello-1.cxx b/20160616/hello-1.cxx new file mode 120000 index 0000000000000000000000000000000000000000..64628868e53236f8739c6ef4c8f888711586e049 --- /dev/null +++ b/20160616/hello-1.cxx @@ -0,0 +1 @@ +hello-1.C \ No newline at end of file diff --git a/20160616/hello-1.xyz b/20160616/hello-1.xyz new file mode 120000 index 0000000000000000000000000000000000000000..64628868e53236f8739c6ef4c8f888711586e049 --- /dev/null +++ b/20160616/hello-1.xyz @@ -0,0 +1 @@ +hello-1.C \ No newline at end of file diff --git a/20160616/hello-2.cpp b/20160616/hello-2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e99f7c5eb5070853191575f974bfafefb31372d4 --- /dev/null +++ b/20160616/hello-2.cpp @@ -0,0 +1,9 @@ +#include <iostream> + +int main () +{ + int a = 0; + a << 2 << 3; + std::cout << "Hello, world!" << std::endl; + return 0; +} diff --git a/20160616/hello-3.cpp b/20160616/hello-3.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f9a2dd57bca5acd537a3f7a66368fe0b4a86c1b9 --- /dev/null +++ b/20160616/hello-3.cpp @@ -0,0 +1,9 @@ +#include <iostream> + +using namespace std; + +int main () +{ + cout << "Hello, world!" << endl; + return 0; +} diff --git a/20160616/objects-10.cpp b/20160616/objects-10.cpp new file mode 100644 index 0000000000000000000000000000000000000000..505aa9c7ba65bef7b40ab5ebd8d8288a5308c46c --- /dev/null +++ b/20160616/objects-10.cpp @@ -0,0 +1,58 @@ +#include <iostream> +#include <string> + +using namespace std; + +struct TBase +{ + virtual void print (void); +}; + +struct TInteger: public TBase +{ + int content; + virtual void print (void); + TInteger (int i); +}; + +struct TString: public TBase +{ + string content; + virtual void print (void); + TString (string s); +}; + +void TBase::print (void) +{ + cout << "Base" << endl; +} + +void TInteger::print (void) +{ + cout << "Integer: " << content << endl; +} + +TInteger::TInteger (int i) +{ + content = i; +} + +void TString::print (void) +{ + cout << "String: " << content << endl; +} + +TString::TString (string s) +{ + content = s; +} + +int main (void) +{ + TBase *object[] = { new TInteger (42), new TString ("Hello, world!") }; + + for (int i = 0; i < 2; i++) + object[i]->print (); + + return 0; +} diff --git a/20160616/objects-11.cpp b/20160616/objects-11.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8055075a7af627b41cd492e7e38512deff317d9f --- /dev/null +++ b/20160616/objects-11.cpp @@ -0,0 +1,59 @@ +#include <iostream> +#include <string> + +using namespace std; + +struct TBase +{ + virtual void print (void); +}; + +struct TInteger: public TBase +{ + int content; + virtual void print (void); + TInteger (int i); +}; + +struct TString: public TBase +{ + string content; + virtual void print (void); + TString (string s); +}; + +void TBase::print (void) +{ + cout << "Base" << endl; +} + +void TInteger::print (void) +{ + cout << "Integer: " << content << endl; +} + +TInteger::TInteger (int i) +{ + content = i; +} + +void TString::print (void) +{ + cout << "String: " << content << endl; +} + +TString::TString (string s) +{ + content = s; +} + +int main (void) +{ + TInteger i = 42; + TBase *object[] = { &i, new TString ("Hello, world!") }; + + for (int i = 0; i < 2; i++) + object[i]->print (); + + return 0; +} diff --git a/20160616/objects-12.cpp b/20160616/objects-12.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b2e2577beb8e9bfcffc9506c3c05502d9d1d1af9 --- /dev/null +++ b/20160616/objects-12.cpp @@ -0,0 +1,80 @@ +#include <iostream> +#include <string> + +using namespace std; + +struct TBase +{ + virtual void print (void); +}; + +struct TInteger: public TBase +{ + int content; + virtual void print (void); + TInteger (int i); +}; + +struct TDoubleInteger: public TInteger +{ + int content2; + virtual void print (void); + TDoubleInteger (int i, int j); +}; + +struct TString: public TBase +{ + string content; + virtual void print (void); + TString (string s); +}; + +void TBase::print (void) +{ + cout << "Base" << endl; +} + +void TInteger::print (void) +{ + cout << "Integer: " << content << endl; +} + +TInteger::TInteger (int i) +{ + content = i; +} + +void TDoubleInteger::print (void) +{ + cout << "DoubleInteger: " << content << ", " << content2 << endl; +} + +TDoubleInteger::TDoubleInteger (int i, int j) + : TInteger (i) +{ + content2 = j; +} + +void TString::print (void) +{ + cout << "String: " << content << endl; +} + +TString::TString (string s) +{ + content = s; +} + +int main (void) +{ + TInteger i = 42; + TBase *object[] = { &i, + new TDoubleInteger (2, 3), + new TString ("Hello, world!"), + NULL }; + + for (int i = 0; object[i]; i++) + object[i]->print (); + + return 0; +} diff --git a/20160616/objects-13.cpp b/20160616/objects-13.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cca944a10bdf687149a85d6ffe66ee6b41101fe3 --- /dev/null +++ b/20160616/objects-13.cpp @@ -0,0 +1,78 @@ +#include <iostream> +#include <string> + +using namespace std; + +struct TBase +{ + virtual void print (void); +}; + +struct TInteger: public TBase +{ + int content; + virtual void print (void); + TInteger (int i); +}; + +struct TDoubleInteger: public TInteger +{ + int content2; + virtual void print (void); + TDoubleInteger (int i, int j); +}; + +struct TString: public TBase +{ + string content; + virtual void print (void); + TString (string s); +}; + +void TBase::print (void) +{ + cout << "Base" << endl; +} + +void TInteger::print (void) +{ + cout << "Integer: " << content << endl; +} + +TInteger::TInteger (int i) +{ + content = i; +} + +void TDoubleInteger::print (void) +{ + cout << "DoubleInteger: " << content << ", " << content2 << endl; +} + +TDoubleInteger::TDoubleInteger (int i, int j) + : TInteger (i) +{ + content2 = j; +} + +void TString::print (void) +{ + cout << "String: " << content << endl; +} + +TString::TString (string s) +{ + content = s; +} + +int main (void) +{ + TInteger i = 42; + TDoubleInteger v (2, 3); + TBase *object[] = { &i, &v, new TString ("Hello, world!"), NULL }; + + for (int i = 0; object[i]; i++) + object[i]->print (); + + return 0; +} diff --git a/20160616/objects-14.cpp b/20160616/objects-14.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b9685a6628f823068df2806dfac6010893397fba --- /dev/null +++ b/20160616/objects-14.cpp @@ -0,0 +1,79 @@ +#include <iostream> +#include <string> + +using namespace std; + +struct TBase +{ + virtual void print (void); +}; + +struct TInteger: public TBase +{ + int content; + virtual void print (void); + TInteger (int i); +}; + +struct TDoubleInteger: public TInteger +{ + int content2; + virtual void print (void); + TDoubleInteger (int i, int j); +}; + +struct TString: public TBase +{ + string content; + virtual void print (void); + TString (string s); +}; + +void TBase::print (void) +{ + cout << "Base" << endl; +} + +void TInteger::print (void) +{ + cout << "Integer: " << content << endl; +} + +TInteger::TInteger (int i) +{ + content = i; +} + +void TDoubleInteger::print (void) +{ + cout << "DoubleInteger: " << content << ", " << content2 << endl; +} + +TDoubleInteger::TDoubleInteger (int i, int j) + : TInteger (i) +{ + content2 = j; +} + +void TString::print (void) +{ + cout << "String: " << content << endl; +} + +TString::TString (string s) +{ + content = s; +} + +int main (void) +{ + TInteger i = 42; + TDoubleInteger v (2, 3); + TString S ("Hello, world!"); + TBase *object[] = { &i, &v, &S, NULL }; + + for (int i = 0; object[i]; i++) + object[i]->print (); + + return 0; +} diff --git a/20160616/objects-15.cpp b/20160616/objects-15.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3516059bc5643de26e476f68b26d0467025b5785 --- /dev/null +++ b/20160616/objects-15.cpp @@ -0,0 +1,85 @@ +#include <iostream> +#include <string> + +using namespace std; + +struct TBase +{ + virtual void print (void); +}; + +struct TInteger: public TBase +{ + int content; + virtual void print (void); + TInteger (int i); +}; + +struct TDoubleInteger: public TInteger +{ + int content2; + virtual void print (void); + TDoubleInteger (int i, int j); +}; + +struct TString: public TBase +{ + string content; + virtual void print (void); + TString (string s); + TString (const char *s); +}; + +void TBase::print (void) +{ + cout << "Base" << endl; +} + +void TInteger::print (void) +{ + cout << "Integer: " << content << endl; +} + +TInteger::TInteger (int i) +{ + content = i; +} + +void TDoubleInteger::print (void) +{ + cout << "DoubleInteger: " << content << ", " << content2 << endl; +} + +TDoubleInteger::TDoubleInteger (int i, int j) + : TInteger (i) +{ + content2 = j; +} + +void TString::print (void) +{ + cout << "String: " << content << endl; +} + +TString::TString (string s) +{ + content = s; +} + +TString::TString (const char *s) +{ + content = s; +} + +int main (void) +{ + TInteger i = 42; + TDoubleInteger v (2, 3); + TString S = "Hello, world!"; + TBase *object[] = { &i, &v, &S, NULL }; + + for (int i = 0; object[i]; i++) + object[i]->print (); + + return 0; +} diff --git a/20160616/objects-16.cpp b/20160616/objects-16.cpp new file mode 100644 index 0000000000000000000000000000000000000000..07fd833f1d282e4297e5168745dd996608f99e7b --- /dev/null +++ b/20160616/objects-16.cpp @@ -0,0 +1,86 @@ +#include <iostream> +#include <string> + +using namespace std; + +struct TBase +{ + virtual void print (void); +}; + +struct TInteger: public TBase +{ + int content; + virtual void print (void); + TInteger (int i); +}; + +struct TDoubleInteger: public TInteger +{ + int content2; + virtual void print (void); + TDoubleInteger (int i, int j); +}; + +struct TString: public TBase +{ + string content; + virtual void print (void); + TString (string s); + TString (const char *s); +}; + +void TBase::print (void) +{ + cout << "Base" << endl; +} + +void TInteger::print (void) +{ + cout << "Integer: " << content << endl; +} + +TInteger::TInteger (int i) +{ + content = i; +} + +void TDoubleInteger::print (void) +{ + cout << "DoubleInteger: " << content << ", " << content2 << endl; +} + +TDoubleInteger::TDoubleInteger (int i, int j) + : TInteger (i) +{ + content2 = j; +} + +void TString::print (void) +{ + cout << "String: " << content << endl; +} + +TString::TString (string s) +{ + content = s; +} + +TString::TString (const char *s) +{ + s[4] = 'a'; + content = s; +} + +int main (void) +{ + TInteger i = 42; + TDoubleInteger v (2, 3); + TString S = "Hello, world!"; + TBase *object[] = { &i, &v, &S, NULL }; + + for (int i = 0; object[i]; i++) + object[i]->print (); + + return 0; +} diff --git a/20160616/objects-17.cpp b/20160616/objects-17.cpp new file mode 100644 index 0000000000000000000000000000000000000000..45e1e834caf7303b71f05d6ff417d239886bc22d --- /dev/null +++ b/20160616/objects-17.cpp @@ -0,0 +1,86 @@ +#include <iostream> +#include <string> + +using namespace std; + +struct TBase +{ + virtual void print (void); +}; + +struct TInteger: public TBase +{ + int content; + virtual void print (void); + TInteger (int i); +}; + +struct TDoubleInteger: public TInteger +{ + int content2; + virtual void print (void); + TDoubleInteger (int i, int j); +}; + +struct TString: public TBase +{ + string content; + virtual void print (void); + TString (string s); + TString (char *s); +}; + +void TBase::print (void) +{ + cout << "Base" << endl; +} + +void TInteger::print (void) +{ + cout << "Integer: " << content << endl; +} + +TInteger::TInteger (int i) +{ + content = i; +} + +void TDoubleInteger::print (void) +{ + cout << "DoubleInteger: " << content << ", " << content2 << endl; +} + +TDoubleInteger::TDoubleInteger (int i, int j) + : TInteger (i) +{ + content2 = j; +} + +void TString::print (void) +{ + cout << "String: " << content << endl; +} + +TString::TString (string s) +{ + content = s; +} + +TString::TString (char *s) +{ + s[4] = 'a'; + content = s; +} + +int main (void) +{ + TInteger i = 42; + TDoubleInteger v (2, 3); + TString S = "Hello, world!"; + TBase *object[] = { &i, &v, &S, NULL }; + + for (int i = 0; object[i]; i++) + object[i]->print (); + + return 0; +} diff --git a/20160616/objects-18.c b/20160616/objects-18.c new file mode 100644 index 0000000000000000000000000000000000000000..fe74aa0ace0e467516004522e502b9ddbba0c338 --- /dev/null +++ b/20160616/objects-18.c @@ -0,0 +1,9 @@ +#include <stdio.h> + +int main (void) +{ + char *Hello = "Hello, world!"; + Hello[4] = 'a'; + printf ("%s\n", Hello); + return 0; +} diff --git a/20160616/objects-18.cpp b/20160616/objects-18.cpp new file mode 100644 index 0000000000000000000000000000000000000000..02d8bd0a31afac34d7c140772fd97d00e94fd10b --- /dev/null +++ b/20160616/objects-18.cpp @@ -0,0 +1,87 @@ +#include <iostream> +#include <string> + +using namespace std; + +struct TBase +{ + virtual void print (void); +}; + +struct TInteger: public TBase +{ + int content; + virtual void print (void); + TInteger (int i); +}; + +struct TDoubleInteger: public TInteger +{ + int content2; + virtual void print (void); + TDoubleInteger (int i, int j); +}; + +struct TString: public TBase +{ + string content; + virtual void print (void); + TString (string s); + TString (char *s); +}; + +void TBase::print (void) +{ + cout << "Base" << endl; +} + +void TInteger::print (void) +{ + cout << "Integer: " << content << endl; +} + +TInteger::TInteger (int i) +{ + content = i; +} + +void TDoubleInteger::print (void) +{ + cout << "DoubleInteger: " << content << ", " << content2 << endl; +} + +TDoubleInteger::TDoubleInteger (int i, int j) + : TInteger (i) +{ + content2 = j; +} + +void TString::print (void) +{ + cout << "String: " << content << endl; +} + +TString::TString (string s) +{ + content = s; +} + +TString::TString (char *s) +{ + s[4] = 'a'; + content = s; +} + +int main (void) +{ + TInteger i = 42; + TDoubleInteger v (2, 3); + char *Hello = "Hello, world!"; + TString S = Hello; + TBase *object[] = { &i, &v, &S, NULL }; + + for (int i = 0; object[i]; i++) + object[i]->print (); + + return 0; +} diff --git a/20160616/objects-19.c b/20160616/objects-19.c new file mode 100644 index 0000000000000000000000000000000000000000..50dee6baec769edb9b771119f02f3423631750b1 --- /dev/null +++ b/20160616/objects-19.c @@ -0,0 +1,9 @@ +#include <stdio.h> + +int main (void) +{ + char Hello[] = "Hello, world!"; + Hello[4] = 'a'; + printf ("%s\n", Hello); + return 0; +} diff --git a/20160616/objects-19.cpp b/20160616/objects-19.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e6893156c2844fbd5bcea05c61bc21c8816165cd --- /dev/null +++ b/20160616/objects-19.cpp @@ -0,0 +1,11 @@ +#include <iostream> + +using namespace std; + +int main () +{ + string Hello = "Hello, world!"; + Hello[4] = 'a'; + cout << Hello << endl; + return 0; +} diff --git a/20160616/objects-20.cpp b/20160616/objects-20.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ae4abf04c687ce3387c546c398e01ac30cfe7878 --- /dev/null +++ b/20160616/objects-20.cpp @@ -0,0 +1,93 @@ +#include <iostream> +#include <string> + +using namespace std; + +struct TBase +{ + virtual void print (void); +}; + +struct TInteger: public TBase +{ + int content; + virtual void print (void); + TInteger (int i); +}; + +struct TDoubleInteger: public TInteger +{ + int content2; + virtual void print (void); + TDoubleInteger (int i, int j); +}; + +struct TString: public TBase +{ + string content; + virtual void print (void); + TString (string s); + TString (char *s); +}; + +void TBase::print (void) +{ + cout << "Base" << endl; +} + +void TInteger::print (void) +{ + cout << "Integer: " << content << endl; +} + +TInteger::TInteger (int i) +{ + content = i; +} + +void TDoubleInteger::print (void) +{ + cout << "DoubleInteger: " << content << ", " << content2 << endl; +} + +TDoubleInteger::TDoubleInteger (int i, int j) + : TInteger (i) +{ + content2 = j; +} + +void TString::print (void) +{ + cout << "String: " << content << endl; +} + +TString::TString (string s) +{ + content = s; +} + +TString::TString (char *s) +{ + s[4] = 'a'; + content = s; +} + +int main (void) +{ + TInteger i = 42; + TDoubleInteger v (2, 3); + string Hello = "Hello, world!"; + TString S = Hello; + TBase *object[] = { &i, &v, &S, NULL }; + + for (int i = 0; object[i]; i++) + object[i]->print (); + + i.content = 137; + S.content = "Tach auch."; + + for (int i = 0; object[i]; i++) + object[i]->print (); + + return 0; +} diff --git a/20160616/objects-21.cpp b/20160616/objects-21.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8b000c619d3217baab0e6fd05e8a4d4ab3cd4ea7 --- /dev/null +++ b/20160616/objects-21.cpp @@ -0,0 +1,93 @@ +#include <iostream> +#include <string> + +using namespace std; + +class TBase +{ + virtual void print (void); +}; + +class TInteger: public TBase +{ + int content; + virtual void print (void); + TInteger (int i); +}; + +class TDoubleInteger: public TInteger +{ + int content2; + virtual void print (void); + TDoubleInteger (int i, int j); +}; + +class TString: public TBase +{ + string content; + virtual void print (void); + TString (string s); + TString (char *s); +}; + +void TBase::print (void) +{ + cout << "Base" << endl; +} + +void TInteger::print (void) +{ + cout << "Integer: " << content << endl; +} + +TInteger::TInteger (int i) +{ + content = i; +} + +void TDoubleInteger::print (void) +{ + cout << "DoubleInteger: " << content << ", " << content2 << endl; +} + +TDoubleInteger::TDoubleInteger (int i, int j) + : TInteger (i) +{ + content2 = j; +} + +void TString::print (void) +{ + cout << "String: " << content << endl; +} + +TString::TString (string s) +{ + content = s; +} + +TString::TString (char *s) +{ + s[4] = 'a'; + content = s; +} + +int main (void) +{ + TInteger i = 42; + TDoubleInteger v (2, 3); + string Hello = "Hello, world!"; + TString S = Hello; + TBase *object[] = { &i, &v, &S, NULL }; + + for (int i = 0; object[i]; i++) + object[i]->print (); + + i.content = 137; + S.content = "Tach auch."; + + for (int i = 0; object[i]; i++) + object[i]->print (); + + return 0; +} diff --git a/20160616/objects-22.cpp b/20160616/objects-22.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7da393e31e19f6f116956662a5707e5bfb6354cf --- /dev/null +++ b/20160616/objects-22.cpp @@ -0,0 +1,99 @@ +#include <iostream> +#include <string> + +using namespace std; + +class TBase +{ +public: + virtual void print (void); +}; + +class TInteger: public TBase +{ +private: // Ist bei "class" der Standard. Bei "struct": public. + int content; +public: + virtual void print (void); + TInteger (int i); +}; + +class TDoubleInteger: public TInteger +{ + int content2; +public: + virtual void print (void); + TDoubleInteger (int i, int j); +}; + +class TString: public TBase +{ + private: + string content; + public: + virtual void print (void); + TString (string s); + TString (char *s); +}; + +void TBase::print (void) +{ + cout << "Base" << endl; +} + +void TInteger::print (void) +{ + cout << "Integer: " << content << endl; +} + +TInteger::TInteger (int i) +{ + content = i; +} + +void TDoubleInteger::print (void) +{ + cout << "DoubleInteger: " << content << ", " << content2 << endl; +} + +TDoubleInteger::TDoubleInteger (int i, int j) + : TInteger (i) +{ + content2 = j; +} + +void TString::print (void) +{ + cout << "String: " << content << endl; +} + +TString::TString (string s) +{ + content = s; +} + +TString::TString (char *s) +{ + s[4] = 'a'; + content = s; +} + +int main (void) +{ + TInteger i = 42; + TDoubleInteger v (2, 3); + string Hello = "Hello, world!"; + TString S = Hello; + TBase *object[] = { &i, &v, &S, NULL }; + + for (int i = 0; object[i]; i++) + object[i]->print (); + + i.content = 137; + S.content = "Tach auch."; + + for (int i = 0; object[i]; i++) + object[i]->print (); + + return 0; +} diff --git a/20160616/objects-23.cpp b/20160616/objects-23.cpp new file mode 100644 index 0000000000000000000000000000000000000000..15ceacbcd7c9ce3be8a0a15fd3feaa595b8e9e5d --- /dev/null +++ b/20160616/objects-23.cpp @@ -0,0 +1,100 @@ +#include <iostream> +#include <string> + +using namespace std; + +class TBase +{ +public: + virtual void print (void); +}; + +class TInteger: public TBase +{ + protected: // Bei "class" ist "private" der Standard, bei "struct" "public". + int content; + public: + virtual void print (void); + TInteger (int i); +}; + +class TDoubleInteger: public TInteger +{ + protected: + int content2; + public: + virtual void print (void); + TDoubleInteger (int i, int j); +}; + +class TString: public TBase +{ + protected: + string content; + public: + virtual void print (void); + TString (string s); + TString (char *s); +}; + +void TBase::print (void) +{ + cout << "Base" << endl; +} + +void TInteger::print (void) +{ + cout << "Integer: " << content << endl; +} + +TInteger::TInteger (int i) +{ + content = i; +} + +void TDoubleInteger::print (void) +{ + cout << "DoubleInteger: " << content << ", " << content2 << endl; +} + +TDoubleInteger::TDoubleInteger (int i, int j) + : TInteger (i) +{ + content2 = j; +} + +void TString::print (void) +{ + cout << "String: " << content << endl; +} + +TString::TString (string s) +{ + content = s; +} + +TString::TString (char *s) +{ + s[4] = 'a'; + content = s; +} + +int main (void) +{ + TInteger i = 42; + TDoubleInteger v (2, 3); + string Hello = "Hello, world!"; + TString S = Hello; + TBase *object[] = { &i, &v, &S, NULL }; + + for (int i = 0; object[i]; i++) + object[i]->print (); + + i.content = 137; + S.content = "Tach auch."; + + for (int i = 0; object[i]; i++) + object[i]->print (); + + return 0; +} diff --git a/20160616/objects-24.cpp b/20160616/objects-24.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c5f71ff13e445831c0ea8066627d515a35d4b9cc --- /dev/null +++ b/20160616/objects-24.cpp @@ -0,0 +1,107 @@ +#include <iostream> +#include <string> + +using namespace std; + +class TBase +{ + public: + virtual void print (void) + { + cout << "Base" << endl; + } +}; + +class TInteger: public TBase +{ + protected: // Bei "class" ist "private" der Standard, bei "struct" "public". + int content; + + public: + virtual void print (void) + { + cout << "Integer: " << content << endl; + } + + TInteger (int i) + { + content = i; + } + + void SetContent (int i) + { + content = i; + } +}; + +class TDoubleInteger: public TInteger +{ + protected: + int content2; + public: + virtual void print (void); + TDoubleInteger (int i, int j); +}; + +class TString: public TBase +{ + protected: + string content; + public: + virtual void print (void); + TString (string s); + TString (char *s); + void SetContent (string s); +}; + +void TDoubleInteger::print (void) +{ + cout << "DoubleInteger: " << content << ", " << content2 << endl; +} + +TDoubleInteger::TDoubleInteger (int i, int j) + : TInteger (i) +{ + content2 = j; +} + +void TString::print (void) +{ + cout << "String: " << content << endl; +} + +TString::TString (string s) +{ + content = s; +} + +TString::TString (char *s) +{ + s[4] = 'a'; + content = s; +} + +void TString::SetContent (string s) +{ + content = s; +} + +int main (void) +{ + TInteger i = 42; + TDoubleInteger v (2, 3); + string Hello = "Hello, world!"; + TString S = Hello; + TBase *object[] = { &i, &v, &S, NULL }; + + for (int i = 0; object[i]; i++) + object[i]->print (); + + i.SetContent (137); + S.SetContent ("Tach auch."); + + for (int i = 0; object[i]; i++) + object[i]->print (); + + return 0; +} diff --git a/20160616/objects-9.c b/20160616/objects-9.c new file mode 100644 index 0000000000000000000000000000000000000000..cd376b67bb4662e984f7d388297557db74a1cdd8 --- /dev/null +++ b/20160616/objects-9.c @@ -0,0 +1,64 @@ +#include <stdio.h> +#include <stdlib.h> + +union t_object; + +typedef struct +{ + void (* print) (union t_object *this); +} t_base; + +typedef struct +{ + void (* print) (union t_object *this); + int content; +} t_integer; + +typedef struct +{ + void (* print) (union t_object *this); + char *content; +} t_string; + +typedef union t_object +{ + t_base base; + t_integer integer; + t_string string; +} t_object; + +void print_integer (t_object *this) +{ + printf ("Integer: %d\n", this->integer.content); +} + +t_object *new_integer (int i) +{ + t_object *object = malloc (sizeof (t_integer)); + object->base.print = print_integer; + object->integer.content = i; + return object; +} + +void print_string (t_object *this) +{ + printf ("String: %s\n", this->string.content); +} + +t_object *new_string (char *s) +{ + t_object *object = malloc (sizeof (t_string)); + object->base.print = print_string; + object->string.content = s; + return object; +} + +int main (void) +{ + t_object *object[] = { new_integer (42), new_string ("Hello, world!") }; + + for (int i = 0; i < 2; i++) + object[i]->base.print (object[i]); + + return 0; +} diff --git a/20160616/references-0.c b/20160616/references-0.c new file mode 100644 index 0000000000000000000000000000000000000000..02ca736925ff7ae554db08975f24b679c6a9f317 --- /dev/null +++ b/20160616/references-0.c @@ -0,0 +1,14 @@ +#include <stdio.h> + +void calc_answer (int *a) +{ + *a = 42; +} + +int main (void) +{ + int answer = 0; + calc_answer (&answer); + printf ("Die Antwort lautet: %d\n", answer); + return 0; +} diff --git a/20160616/references-1.cpp b/20160616/references-1.cpp new file mode 100644 index 0000000000000000000000000000000000000000..13b11c533548defd1d3da034addaba63fe0dc6bd --- /dev/null +++ b/20160616/references-1.cpp @@ -0,0 +1,14 @@ +#include <stdio.h> + +void calc_answer (int &a) +{ + a = 42; +} + +int main (void) +{ + int answer = 0; + calc_answer (answer); + printf ("Die Antwort lautet: %d\n", answer); + return 0; +} diff --git a/20160616/references-2.cpp b/20160616/references-2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..86b5a7e6a9f4d1158b8c87981c053cd0c51499ee --- /dev/null +++ b/20160616/references-2.cpp @@ -0,0 +1,15 @@ +#include <stdio.h> + +void calc_answer (int &a, int &b) +{ + a = 42; + b = 137; +} + +int main (void) +{ + int answer = 0; + calc_answer (answer, answer); + printf ("Die Antwort lautet: %d\n", answer); + return 0; +} diff --git a/20160616/references-3.cpp b/20160616/references-3.cpp new file mode 100644 index 0000000000000000000000000000000000000000..da0bd9ae1d27c8469e66fef74d145003968633ea --- /dev/null +++ b/20160616/references-3.cpp @@ -0,0 +1,15 @@ +#include <stdio.h> + +void calc_answer (int &a, int &b) +{ + b = 137; + a = 42; +} + +int main (void) +{ + int answer = 0; + calc_answer (answer, answer); + printf ("Die Antwort lautet: %d\n", answer); + return 0; +} diff --git a/20160616/references-4.cpp b/20160616/references-4.cpp new file mode 100644 index 0000000000000000000000000000000000000000..80cafae3c7aba4db5b34f6fc0213f4b451c2d9e0 --- /dev/null +++ b/20160616/references-4.cpp @@ -0,0 +1,10 @@ +#include <stdio.h> + +int main (void) +{ + int a = 0; + int &b = a; + a = 42; + printf ("Die Antwort lautet: %d\n", b); + return 0; +} diff --git a/common/README b/common/README index 71551db4f7ff9ecf1b36149d5b09a9f251178ab4..d120c364b178495bd515dddc982248db0844a44a 100644 --- a/common/README +++ b/common/README @@ -4,7 +4,7 @@ Copyright (C) 2012, 2013, 2014, 2015, 2016 Peter Gerwinski <peter@gerwinski.de> These documents are free software; you can redistribute them and/or modify them under the terms and conditions of the following licenses: - *.tex: scripts and slides + *.tex, *.sty, *.pdf: scripts and slides - either the GNU General Public License, version 3 or, at your option, any later version, - or the Creative Commons Attribution-ShareAlike 3.0