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

Image Screenshot_20240403_095701

<?php
session_start ();
?>

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

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

setcookie ("form20240403b", "Ich bin das standard-Cookie", time () + 3600);

echo htmlentities (\$_POST ["form20240403a"]) . "<br>n";
echo htmlentities (\$_COOKIE ["form20240403b"]) . "<br>n";
echo htmlentities (\$_COOKIE ["form20240403c"]) . "<br>n";

session_destroy ();
?>

POST http://localhost/mysql20240217/20240403/form20240403.php HTTP/1.1
host: localhost
Cookie: form20240403c=Ich bin das alternative Cookie, wenn man das so sagen kann
Content-Length: 31
Content-Type: application/x-www-form-urlencoded

form20240403a=Ich bin das Datum

Trying ::1...
Connected to localhost.
Escape character is '\^]'.
HTTP/1.1 200 OK
Date: Wed, 03 Apr 2024 08:02:43 GMT
Server: Apache/2.4.57 (Debian)
Set-Cookie: PHPSESSID=461914nehenp60jrnir3ijleqg; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: form20240403b=Ich%20bin%20das%20standard-Cookie; expires=Wed, 03 Apr 2024 09:02:43 GMT; Max-Age=3600
Vary: Accept-Encoding
Content-Length: 251
Content-Type: text/html; charset=UTF-8


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

461914nehenp60jrnir3ijleqg<br>
Ich bin das Datum<br>
<br>
Ich bin das alternative Cookie, wenn man das so sagen kann<br>

<?php
session_start ();

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

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

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

\$sql = "USE mysql20240403" . 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); ";
\$db->query (\$sql);

\$sql = "INSERT INTO a (x1, x2) VALUES (0, 1); INSERT INTO a (x1, x2) VALUES (1, 0); INSERT INTO a (x1, x2) VALUES (2, 7); INSERT INTO b (y1, y2) VALUES (0, 1); INSERT INTO b (y1, y2) VALUES (1, 0); INSERT INTO b (y1, y2) VALUES (2, 7); ";
\$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 mysql20240403" . session_id () . "; ";
\$db->query (\$sql);

session_destroy ();
?>

0, 0; 0, 1; 1, 0; 2, 7; <br>
0, 1; 1, 0; 2, 7; <br>
0, 0, 0, 1; 0, 1, 0, 1; 1, 0, 1, 0; 2, 7, 2, 7; <br>

<?php
session_start ();

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

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

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

\$sql = "USE Q20240403" . 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 . "); ";
    \$sql .= "INSERT INTO b (x) VALUES (" . rand () % 64 . "); ";
    \$sql .= "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 Q20240403" . session_id () . "; ";
\$db->query (\$sql);

session_destroy ();
?>

#!/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" == "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 auf keinen Fall"
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+=(Und seine Fortsetzung)

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

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

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

fi

#!/bin/bash

/bin/bash bash20240403.sh "David" "Vajda"
/bin/bash bash20240403.sh "David Vajda"
/bin/bash bash20240403.sh "David"
/bin/bash bash20240403.sh "Vajda"
/bin/bash bash20240403.sh "David" "Mustermann"
/bin/bash bash20240403.sh "Max Mustermann"
/bin/bash bash20240403.sh

Das bin ich
Das bin ich
Das koennte ich sein
Das koennte ich sein
Das bin ich auf keinen Fall
Das bin ich auf keinen Fall
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
Und
seine
Fortsetzung
Das
ist
ein
Array
Und
seine
Fortsetzung
200066.png
200082.png
434404849_25023964997218914_7634363595333631096_n.jpg
addressdecodertestbench.c
alldo.txt
alllinks.sh
a.out
asm15
asm16
auswendig20240402a.txt
auswendig20240402b.txt
auswendig20240402c.txt
automat15
automat15.c
bash20240402all.sh
bash20240402.out
bash20240402.sh
bash20240403all.sh
bash20240403.out
bash20240403.sh
Bilder
bin20240204.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
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
replace.sh
Schreibtisch
Screenshot_20240402_161254.png
Screenshot_20240402_222524.png
Screenshot_20240403_095701.png
state3
svg
test.png.vcd
todo2.txt
todo.txt
Videos
VirtualBox
VMs
Vorlagen
wave.ghw
work-obj93.cf

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

    mov esi, toSortArray
    loop1:
        mov al, [esi]
        cmp al, 0x00
        je loop1end
        mov edi, esi
        inc edi
        loop2:
            mov ah, [edi]
            cmp ah, 0x00
            je loop2end
            mov al, [esi]
            mov ah, [edi]
            cmp al, ah
            jle goon
                mov al, [esi]
                mov ah, [edi]
                mov [esi], ah
                mov [edi], al
            goon:
            inc edi
            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

Image Screenshot_20240403_112929

 0 0 0 0 0    1
 1 0 0 0 1    1
 2 0 0 1 0    0
 3 0 0 1 1    1
 4 0 1 0 0    0
 5 0 1 0 1    1
 6 0 1 1 0    1
 7 0 1 1 1    0
 8 1 0 0 0    1
 9 1 0 0 1    0
10 1 0 1 0    1
11 1 0 1 1    1
12 1 1 0 0    1
13 1 1 0 1    0
14 1 1 1 0    1
15 1 1 1 1    0


 0 0 0 0 0    1
 1 0 0 0 1    1
 3 0 0 1 1    1
 5 0 1 0 1    1
 6 0 1 1 0    1
 8 1 0 0 0    1
10 1 0 1 0    1
11 1 0 1 1    1
12 1 1 0 0    1
14 1 1 1 0    1


Gruppe 0:
 0 0 0 0 0    1
Gruppe 1:
 1 0 0 0 1    1
 8 1 0 0 0    1
Gruppe 2:
 3 0 0 1 1    1
 5 0 1 0 1    1
 6 0 1 1 0    1
10 1 0 1 0    1
12 1 1 0 0    1
Gruppe 3:
11 1 0 1 1    1
14 1 1 1 0    1


0:1             0 0 0 -
0:8             - 0 0 0
1:3             0 0 - 1
1:5             0 - 0 1
8:10            1 0 - 0
8:12            1 - 0 0
3:11            - 0 1 1
6:14            - 1 1 0
10:11           1 0 1 -
10:14           1 - 1 0
12:14           1 1 - 0




10:11           1 0 1 -
0:1             0 0 0 -
1:3             0 0 - 1
12:14           1 1 - 0
8:10            1 0 - 0
1:5             0 - 0 1
8:12            1 - 0 0
10:14           1 - 1 0
0:8             - 0 0 0
3:11            - 0 1 1
6:14            - 1 1 0


Gruppe 0:
0:1             0 0 0 -
Gruppe 2:
10:11           1 0 1 -

Gruppe 1:
1:3             0 0 - 1
8:10            1 0 - 0
Gruppe 2:
12:14           1 1 - 0

Gruppe 1:
1:5             0 - 0 1
8:12            1 - 0 0
Gruppe 2:
10:14           1 - 1 0

Gruppe 0:
0:8             - 0 0 0
Gruppe 2:
3:11            - 0 1 1
6:14            - 1 1 0




0:1                     0 0 0 -
10:11                   1 0 1 -

Gruppe 1:
1:3                     0 0 - 1
8:10            1 0 - 0
Gruppe 2:
12:14           1 1 - 0

8:10:12:14              1 - - 0

Gruppe 1:
1:5                     0 - 0 1
8:12            1 - 0 0
Gruppe 2:
10:14           1 - 1 0

8:12:10:14              1 - - 0

Gruppe 0:
0:8                     - 0 0 0
Gruppe 2:
3:11                    - 0 1 1
6:14                    - 1 1 0



0:1                     0 0 0 -
10:11                   1 0 1 -
1:3                     0 0 - 1
8:10:12:14              1 - - 0
1:5                     0 - 0 1
8:12:10:14              1 - - 0
0:8                     - 0 0 0
3:11                    - 0 1 1
6:14                    - 1 1 0



0:1                     0 0 0 -
10:11                   1 0 1 -
1:3                     0 0 - 1
8:10:12:14              1 - - 0
1:5                     0 - 0 1
0:8                     - 0 0 0
3:11                    - 0 1 1
6:14                    - 1 1 0


                        0   1   3   5   6   8   10  11  12  14
0:1                     *   *
10:11                                           *   *
1:3                         *   *
8:10:12:14                                  *   *       *   *
1:5                         *       *
0:8                     *                   *
3:11                            *                   *
6:14                                    *                   *



                        0   1   3   5   6   8   10  11  12  14
0:1                     *   *
10:11                                           *   *
1:3                         *   *
8:10:12:14                                  *   *       *   *
1:5                         *       *                               p
0:8                     *                   *
3:11                            *                   *
6:14                                    *                   *       p



                        0   1   3   5   6   8   10  11  12  14
8:10:12:14                                  *   *       *   *
1:5                         *       *                               p
0:8                     *                   *
3:11                            *                   *
6:14                                    *                   *       p


8:10:12:14              1 - - 0
1:5                     0 - 0 1
0:8                     - 0 0 0
3:11                    - 0 1 1
6:14                    - 1 1 0

    y <=    (x3 and not x0) or
            (not x3 and not x1 and x0) or
            (not x2 and not x1 and not x0) or
            (not x2 and x1 and x0) or
            (x2 and x1 and not x0);
    y <= not (
            (not x3 or x0) and
            (x3 or x1 or not x0) and
            (x2 or x1 or x0) and
            (x2 or not x1 or not x0) and
            (not x2 or not x1 or x0)
            );

library ieee;
use ieee.std_logic_1164.all;

entity quine20240403 is
port (
    x3, x2, x1, x0: in std_logic;
    y: out std_logic
);
end;

architecture behaviour of quine20240403 is
begin
    y <=    (x3 and not x0) or
            (not x3 and not x1 and x0) or
            (not x2 and not x1 and not x0) or
            (not x2 and x1 and x0) or
            (x2 and x1 and not x0);
end;

library ieee;
use ieee.std_logic_1164.all;

entity quine20240403testbench is
port (
    y: out std_logic
);
end;

architecture behaviour of quine20240403testbench is
    component quine20240403
    port (
        x3, x2, x1, x0: in std_logic;
        y: out std_logic
    );
    end component;
    signal x3, x2, x1, x0: std_logic;
begin
    q: quine20240403 PORT MAP (x3=>x3, x2=>x2, x1=>x1, x0=>x0, y=>y);

library ieee;
use ieee.std_logic_1164.all;

entity quine20240403 is
port (
    x3, x2, x1, x0: in std_logic;
    y: out std_logic
);
end;

architecture behaviour of quine20240403 is
begin
    y <=    (x3 and not x0) or
            (not x3 and not x1 and x0) or
            (not x2 and not x1 and not x0) or
            (not x2 and x1 and x0) or
            (x2 and x1 and not x0);
end;

library ieee;
use ieee.std_logic_1164.all;

entity quine20240403testbench is
port (
    y: out std_logic
);
end;

architecture behaviour of quine20240403testbench is
    component quine20240403
    port (
        x3, x2, x1, x0: in std_logic;
        y: out std_logic
    );
    end component;
    signal x3, x2, x1, x0: std_logic;
begin
    q: quine20240403 PORT MAP (x3=>x3, x2=>x2, x1=>x1, x0=>x0, y=>y);



    x0 <= '0' after 0 ns, '1' after 10 ns, '0' after 20 ns, '1' after 30 ns, '0' after 40 ns, '1' after 50 ns, '0' after 60 ns, '1' after 70 ns, '0' after 80 ns, '1' after 90 ns, '0' after 100 ns, '1' after 110 ns, '0' after 120 ns, '1' after 130 ns, '0' after 140 ns, '1' after 150 ns;

    x1 <= '0' after 0 ns, '0' after 10 ns, '1' after 20 ns, '1' after 30 ns, '0' after 40 ns, '0' after 50 ns, '1' after 60 ns, '1' after 70 ns, '0' after 80 ns, '0' after 90 ns, '1' after 100 ns, '1' after 110 ns, '0' after 120 ns, '0' after 130 ns, '1' after 140 ns, '1' after 150 ns;

    x2 <= '0' after 0 ns, '0' after 10 ns, '0' after 20 ns, '0' after 30 ns, '1' after 40 ns, '1' after 50 ns, '1' after 60 ns, '1' after 70 ns, '0' after 80 ns, '0' after 90 ns, '0' after 100 ns, '0' after 110 ns, '1' after 120 ns, '1' after 130 ns, '1' after 140 ns, '1' after 150 ns;

    x3 <= '0' after 0 ns, '0' after 10 ns, '0' after 20 ns, '0' after 30 ns, '0' after 40 ns, '0' after 50 ns, '0' after 60 ns, '0' after 70 ns, '1' after 80 ns, '1' after 90 ns, '1' after 100 ns, '1' after 110 ns, '1' after 120 ns, '1' after 130 ns, '1' after 140 ns, '1' after 150 ns;
end;

Zustand,Eingabe,Ausgabe,Folgezustand
1,0,1,4
1,1,1,4
2,0,0,2
2,1,0,3
3,0,0,3
3,1,1,1
4,0,0,1
4,1,0,2

z1+ := z3 and x or z4 and not x
z2+ := z2 and not x or z4 and x
z3+ := z2 and x or z3 and not x
z4+ := z1
y := z1 or z3 and x

Image automat20240403-1

https://www.ituenix.de/nextcloud/data/dave/files/automat20240403.pdf">

https://www.ituenix.de/nextcloud/data/dave/files/automat20240403.csv">

https://www.ituenix.de/nextcloud/data/dave/files/automat20240403.txt">

https://www.ituenix.de/nextcloud/data/dave/files/automat20240403.tex">

1.) Rechne die Zahl in binaer Darstellung  in eine Dezimale Darstellung um
1000101111000100b 35780d
2.) Rechne die Zahl in dezimal darstellung in eine Binaerdarstellung um
55584 1101100100100000
3.) Addiere die drei Zahlen schriftlich
            37035
+           30964
+           16510
-----------------
            84509
4.) Subtrahiere die letzten drei Zahlen schriftlich von der ersten schriftlich
             8683
-            8438
-           13286
-            1483
-----------------
           -14524
5.) Rechne die Zahl ins zweier komplement um, mit 8 Bit - und subtrahiere diese zahl von der ersten und rechne das Ergebnis nach dezimal
68 -27 = 41
01000100 11100101 = 00101001
6.) Multipliziere die zwei Zahlen schriftlich
38032*61541 = 2340527312
7.) Dividiere die zwei Zahlen schriftlich
2151/3855 = 0
8.) Errechne x Logarithmisch mit dem Taschenrechner
44271\^x = 1909241623

Image 20240403_125810

Image 20240403_130703

Image 20240403_131053

Image 20240403_132046