Re: Das neue Auswendig lernen und die neuen Übungen -

\includegraphics[width=\textwidth]{.././nextcloud/Screenshot_20240404_083305.png}

<?php
session_start ();
?>

<form method="POST" action="./form20240404.php">
<input type="text" name="form20240404a"></input>
<input type="submit">
</form>

<?php
echo session_id () . "<br>n";

setcookie ("form20240404b", "Hallo, ich bin das erste Cookie", time () + 3600);

echo htmlentities (\$_POST ["form20240404a"]) . "<br>n";
echo htmlentities (\$_COOKIE ["form20240404b"]) . "<br>n";
echo htmlentities (\$_COOKIE ["form20240404c"]) . "<br>n";

session_destroy ();
?>

POST http://localhost/mysql20240217/20240404/form20240404.php HTTP/1.1
host: localhost
Cookie: form20240404c=Ich bin das andere Cookie
Content-Length: 31
Content-Type: application/x-www-form-urlencoded

form20240404a=Ich bin das Datum

Trying ::1...
Connected to localhost.
Escape character is '\^]'.
HTTP/1.1 200 OK
Date: Thu, 04 Apr 2024 06:32:30 GMT
Server: Apache/2.4.57 (Debian)
Set-Cookie: PHPSESSID=ns8qtpr0fto2qg8get9ldbogub; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: form20240404b=Hallo%2C%20ich%20bin%20das%20erste%20Cookie; expires=Thu, 04 Apr 2024 07:32:30 GMT; Max-Age=3600
Vary: Accept-Encoding
Content-Length: 218
Content-Type: text/html; charset=UTF-8


<form method="POST" action="./form20240404.php">
<input type="text" name="form20240404a"></input>
<input type="submit">
</form>

ns8qtpr0fto2qg8get9ldbogub<br>
Ich bin das Datum<br>
<br>
Ich bin das andere Cookie<br>

<?php
session_start ();

include ("/home/david/mysqldata.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE mysql20240404" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "USE mysql20240404" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x1 INTEGER, x2 INTEGER); CREATE TABLE b (y1 INTEGER, y2 INTEGER); ";
\$db->query (\$sql);

\$sql = "INSERT INTO a (x1, x2) VALUES (0, 0); INSERT INTO a (x1, x2) VALUES (0, 1); INSERT INTO a (x1, x2) VALUES (1, 0); INSERT INTO a (x1, x2) VALUES (1, 1); INSERT INTO a (x1, x2) VALUES (3, 8); INSERT INTO b (y1, y2) VALUES (0, 1); INSERT INTO b (y1, y2) VALUES (1, 0); INSERT INTO b (y1, y2) VALUES (8, 3); ";
\$db->query (\$sql);

\$sql = "SELECT x1, x2 FROM a; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", " . \$row [1] . "; ";
echo "<br>n";

\$sql = "SELECT y1, y2 FROM b; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", " . \$row [1] . "; ";
echo "<br>n";

\$sql = "SELECT x1, x2, y1, y2 FROM a INNER JOIN b ON a.x1 = b.y1; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", " . \$row [1] . ", " . \$row [2] . ", " . \$row [3] . "; ";
echo "<br>n";

\$sql = "DROP DATABASE mysql20240404" . session_id () . "; ";
\$db->query (\$sql);

session_destroy ();
?>

<?php
session_start ();

include ("/home/david/mysqldata.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE q20240404" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "USE q20240404" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x INTEGER); CREATE TABLE b (x INTEGER); CREATE TABLE c (x INTEGER); ";
\$db->query (\$sql);

for (\$i = 0;  \$i < 24;  \$i++) {
  \$sql = "INSERT INTO a (x) VALUES (" . rand () % 32 . "); INSERT INTO b (x) VALUES (" . rand () % 64 . "); INSERT INTO c (x) VALUES (" . rand () % 128 . "); ";
  \$db->query (\$sql);
}

\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x ORDER BY X; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x ORDER BY X; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x
              INTERSECT
            SELECT x FROM c
  ) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x
              UNION
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x
  ) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x
              INTERSECT
            SELECT x FROM b
  ) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x
              UNION
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x
  ) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x
              INTERSECT
            SELECT x FROM a
  ) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x
              UNION
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM a) x
  ) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";


\$sql = "DROP DATABASE q20240404" . session_id () . "; ";
\$db->query (\$sql);

session_destroy ();
?>

0, 0; 0, 1; 1, 0; 1, 1; 3, 8; <br>
0, 1; 1, 0; 8, 3; <br>
0, 0, 0, 1; 0, 1, 0, 1; 1, 0, 1, 0; 1, 1, 1, 0; <br>

<?php
session_start ();

include ("/home/david/mysqldata.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE q20240404" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "USE q20240404" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x INTEGER); CREATE TABLE b (x INTEGER); CREATE TABLE c (x INTEGER); ";
\$db->query (\$sql);

for (\$i = 0;  \$i < 24;  \$i++) {
  \$sql = "INSERT INTO a (x) VALUES (" . rand () % 32 . "); INSERT INTO b (x) VALUES (" . rand () % 64 . "); INSERT INTO c (x) VALUES (" . rand () % 128 . "); ";
  \$db->query (\$sql);
}

\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x ORDER BY X; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x ORDER BY X; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x
              INTERSECT
            SELECT x FROM c
  ) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x
              UNION
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x
  ) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x
              INTERSECT
            SELECT x FROM b
  ) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x
              UNION
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x
  ) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x
              INTERSECT
            SELECT x FROM a
  ) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x
              UNION
            SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM a) x
  ) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
  echo \$row [0] . ", ";
echo "<br>n";


\$sql = "DROP DATABASE q20240404" . session_id () . "; ";
\$db->query (\$sql);

session_destroy ();
?>

0, 1, 2, 3, 5, 6, 8, 10, 11, 13, 16, 17, 18, 21, 22, 23, 25, 26, 28, 29, 31, 34, 35, 36, 37, 42, 43, 50, 51, 56, 59, <br>
1, 2, 3, 5, 6, 8, 10, 11, 13, 17, 18, 21, 22, 23, 25, 26, 28, 29, 31, 33, 37, 47, 48, 57, 61, 62, 67, 72, 77, 86, 89, 94, 95, 97, 102, 107, 110, 120, <br>
0, 5, 6, 10, 11, 13, 16, 22, 23, 26, 29, 33, 34, 35, 36, 37, 42, 43, 47, 48, 50, 51, 56, 57, 59, 61, 62, 67, 72, 77, 86, 89, 94, 95, 97, 102, 107, 110, 120, <br>
5, 6, 10, 11, 13, 22, <br>
26, <br>
23, 29, 37, <br>
23, 26, 29, 37, <br>
23, 26, 29, 37, <br>
5, 6, 10, 11, 13, 22, 23, 29, 37, <br>
5, 6, 10, 11, 13, 22, 23, 29, 37, <br>
5, 6, 10, 11, 13, 22, 26, <br>
5, 6, 10, 11, 13, 22, 26, <br>

#!/bin/bash

if [[ "\$1" == "David" \&amp;\&amp; "\$2" == "Vajda" ]]
then
    echo "Das bin ich"
elif [[ "\$1" == "David Vajda" \&amp;\&amp; -z "\$2" ]]
then
    echo "Das bin ich"
elif [[ "\$1" == "Vajda" \&amp;\&amp; "\$2" == "David" ]]
then
    echo "Das bin ich"
elif [[ "\$1" == "Vajda David" \&amp;\&amp; -z "\$2" ]]
then
    echo "Das bin ich"
elif [[ "\$1" == "David" \&amp;\&amp; -z "\$2" ]]
then
    echo "Das koennte ich sein"
elif [[ "\$1" == "Vajda" \&amp;\&amp; -z "\$2" ]]
then
    echo "Das koennte ich sein"
elif [ -n "\$1" ]
then
    echo "Das bin ich definitiv nicht"
else
    echo "Hallo Welt"
    i=0
    while [ \$i -lt 10 ]
    do
        echo "Hallo zum \$((\$i+1))."
        i=\$((\$i+1))
    done
    a=(Das ist ein Array)
    a+=(Mit seiner Fortsetzung)

    i=0
    while [ \$i -lt 7 ]
    do
        echo "\${a[\$i]}"
        i=\$((\$i+1))
    done

    for s in "\${a[@]}"
    do
        echo "\$s"
    done

    l=\$(ls)
    for s in \$l
    do
        echo "\$s"
    done

fi

#!/bin/bash

/bin/bash bash20240404.sh "David" "Vajda"
/bin/bash bash20240404.sh "David Vajda"
/bin/bash bash20240404.sh "Vajda David"
/bin/bash bash20240404.sh "Vajda" "David"
/bin/bash bash20240404.sh "David"
/bin/bash bash20240404.sh "Vajda"
/bin/bash bash20240404.sh "David Mustermann"
/bin/bash bash20240404.sh "David" "Mustermann"
/bin/bash bash20240404.sh

Das bin ich
Das bin ich
Das bin ich
Das bin ich
Das koennte ich sein
Das koennte ich sein
Das bin ich definitiv nicht
Das bin ich definitiv nicht
Hallo Welt
Hallo zum 1.
Hallo zum 2.
Hallo zum 3.
Hallo zum 4.
Hallo zum 5.
Hallo zum 6.
Hallo zum 7.
Hallo zum 8.
Hallo zum 9.
Hallo zum 10.
Das
ist
ein
Array
Mit
seiner
Fortsetzung
Das
ist
ein
Array
Mit
seiner
Fortsetzung
200066.png
200082.png
20240403_193924.jpg
20240403_201151.jpg
20240403_201154.jpg
434404849_25023964997218914_7634363595333631096_n.jpg
addressdecodertestbench.c
algoke1_20240403.aux
algoke1_20240403.log
algoke1_20240403.pdf
algoke1_20240403.tex
alldo.txt
alllinks.sh
asm15
asm16
asm20240403
asm20240403.asm
asm20240403.o
aufgabe1.1.pdf
aufgabenalgomath20240403.txt
auswendig20240402a.txt
auswendig20240402b.txt
auswendig20240402c.txt
automat15
automat15.c
automat20240403-1.jpg
automat20240403.aux
automat20240403.csv
automat20240403.log
automat20240403.pdf
automat20240403.tex
automat20240403.txt
bash20240402all.sh
bash20240402.out
bash20240402.sh
bash20240403all.sh
bash20240403.out
bash20240403.sh
bash20240404all.sh
bash20240404.out
bash20240404.sh
bas.txt
Bilder
bin20240204.txt
bin20240403.txt
binary2
binary2.c
deepsearch1.c
deepsearch2
deepsearch2.c
doc
Dokumente
dos-inst
Downloads
facebookpassword.txt
files.lst
float.c
fsmprogs
generatetestbench2
generatetestbench3
generatetestbench4
generatetestbench5
gnu-hello
ieee754aufgabe
ieee754aufgabe2.c
ieee754aufgabe.c
ieee754aufgabe.o
Induktion-pdf.pdf
inst
mail
Mars
matlab
mips32singlecycle2.vhdl
mips32singlecycle.vhdl
Musik
mydaemontestd
mysqldata.php
node_modules
"Offentlich
out.txt
password
password20240326.txt
password46.txt
quine
quine20240402.txt
quine20240402.vhdl
quine20240403.txt
quine20240403.vhdl
replace.sh
Schreibtisch
Screenshot_20240402_161254.png
Screenshot_20240402_222524.png
Screenshot_20240403_095701.png
Screenshot_20240403_112929.png
state3
svg
test.png.vcd
todo2.txt
todo.txt
Videos
VirtualBox
VMs
vorl03_ana.pdf
Vorlagen
wave.ghw
wave.wav
work-obj93.cf

global              _start
section             .data
                    toSortArray:        db      "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", 0x00
                    toSortArrayLen:     equ     \$-toSortArray
section             .text
                    _start:

                    mov esi, toSortArray
                    loop1:
                        mov ah, [esi]
                        cmp ah, 0x00
                        je loop1end
                        mov edi, esi
                        loop2:
                            inc edi
                            mov al, [edi]
                            cmp al, 0x00
                            je loop2end
                            mov ah, [esi]
                            mov al, [edi]
                            cmp ah, al
                            jge goon
                                mov ah, [esi]
                                mov al, [edi]
                                mov [edi], ah
                                mov [esi], al
                            goon:
                            jmp loop2
                        loop2end:
                        inc esi
                        jmp loop1
                    loop1end:


    mov edx, toSortArrayLen
    mov ecx, toSortArray
    mov ebx, 1
    mov eax, 4
    int 0x80

    mov ebx, 0
    mov eax, 1
    int 0x80

david@laptop-peaq:~\$ nasm -f elf32 asm20240404.asm
david@laptop-peaq:~\$ ld -m elf_i386 -g  asm20240404.o -o asm20240404
david@laptop-peaq:~\$ ./asm20240404
david@laptop-peaq:~\$