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

Image Screenshot_20240402_161254

<?php
session_start ();
?>

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

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

setcookie ("form20240402b", "Hallo, ich bin Cookie Nummer 1", time () + 2400);

echo htmlentities (\$_POST ["form20240402a"]) . "<br>n";
echo htmlentities (\$_COOKIE ["form20240402b"]) . "<br>n";
echo htmlentities (\$_COOKIE ["form20240402c"]) . "<br>n";

session_destroy ();
?>

Trying ::1...
Connected to localhost.
Escape character is '\^]'.
HTTP/1.1 200 OK
Date: Tue, 02 Apr 2024 14:21:38 GMT
Server: Apache/2.4.57 (Debian)
Set-Cookie: PHPSESSID=v2a6ak96ug6nulof805e4cc7ph; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: form20240402b=Hallo%2C%20ich%20bin%20Cookie%20Nummer%201; expires=Tue, 02 Apr 2024 15:01:38 GMT; Max-Age=2400
Vary: Accept-Encoding
Content-Length: 232
Content-Type: text/html; charset=UTF-8


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

v2a6ak96ug6nulof805e4cc7ph<br>
Hallo, ich bin das Datum<br>
<br>
Hallo, ich bin das andere Cookie<br>

POST http://localhost/mysql20240217/20240402/form20240402.php HTTP/1.1
host: localhost
Cookie: form20240402c=Hallo, ich bin das andere Cookie
Content-Length: 38
Content-Type: application/x-www-form-urlencoded

form20240402a=Hallo, ich bin das Datum

<?php
session_start ();
include ("/home/david/mysqldata.php");

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

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

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

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

\$sql = "INSERT INTO a (x1, x2) VALUES (1, 1); ";
\$db->query (\$sql);

\$sql = "INSERT INTO a (x1, x2) VALUES (2, 7); ";
\$db->query (\$sql);

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

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

\$sql = "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] . "<br>n";
echo "<br>n";

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

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

session_destroy ();
?>

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

Entschuldigung, der Akku auf der Platanenallee ging leer

<?php
session_start ();

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

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

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

\$sql = "USE quantity20240402" . 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; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "; <br>";

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

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

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

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

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

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

\$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; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "; <br>";

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

\$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; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "; <br>";

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

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

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

session_destroy ();
?>

12, 4, 15, 24, 5, 30, 27, 14, 11, 20, 18, 2, 13, 17, 21, 8, 6, 16, 58, 32, 60, 44, 33, 9, 23, 57, 47, 39, 41, 54, 45, 49, ; <br>12, 4, 15, 24, 5, 30, 27, 14, 11, 20, 18, 2, 13, 17, 21, 8, 6, 16, 31, 76, 26, 40, 99, 123, 81, 43, 63, 1, 78, 118, 74, 115, 111, 60, 72, 62, 75, ; <br>58, 32, 60, 12, 44, 2, 33, 18, 13, 9, 23, 57, 47, 39, 41, 54, 15, 17, 45, 24, 49, 31, 76, 26, 40, 99, 123, 81, 43, 63, 6, 1, 78, 118, 74, 14, 115, 111, 72, 21, 62, 75, ; <br>12, 15, 24, 18, 2, 13, 17, ; <br>12, 14, 21, 6, ; <br>60, 12, ; <br>12, 14, 21, 6, 60, ; <br>12, 14, 21, 6, 60, ; <br>12, 15, 24, 18, 2, 13, 17, 60, ; <br>12, 15, 24, 18, 2, 13, 17, 60, ; <br>12, 2, 18, 13, 15, 17, 24, 6, 14, 21, ; <br>12, 15, 24, 18, 2, 13, 17, 14, 21, 6, ; <br>

#!/bin/bash

if [[ "\$1" == "David" \&amp;\&amp; "\$2" == "Vajda" \&amp;\&amp; -z "\$3" ]]
then
    echo "Hallo, das bin ich"
elif [[ "\$1" == "David Vajda" \&amp;\&amp; -z "\$2" ]]
then
    echo "Hallo, 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 nicht"
else
    echo "Hallo Welt"
    i=0
    while [ \$i -lt 10 ]
    do
        echo "Hallo zum \$((\$i+1))."
        i=\$((\$i+1))
    done
    a=(Dies ist eine Message)
    a+=(Und ihre 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 bash20240402.sh "David" "Vajda"
/bin/bash bash20240402.sh "David Vajda"
/bin/bash bash20240402.sh "David Mustermann"
/bin/bash bash20240402.sh "David"
/bin/bash bash20240402.sh "Vajda"
/bin/bash bash20240402.sh

Hallo, das bin ich
Hallo, das bin ich
das bin ich nicht
das koennte ich sein
das koennte ich sein
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.
Dies
ist
eine
Message
Und
ihre
Fortsetzung
Dies
ist
eine
Message
Und
ihre
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
Bilder
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
replace.sh
Schreibtisch
Screenshot_20240402_161254.png
state3
svg
test.png.vcd
todo2.txt
todo.txt
Videos
VirtualBox
VMs
Vorlagen
wave.ghw
work-obj93.cf

Aber, wir wollen sachlich bleiben, mathematisch, informatisch, wie auch immer, ich mache weiter.

1.) Rechne die Zahl in binaer Darstellung  in eine Dezimale Darstellung um
0010011100010011b 10003d
2.) Rechne die Zahl in dezimal darstellung in eine Binaerdarstellung um
37608 1001001011101000
3.) Addiere die drei Zahlen schriftlich
            29202
+           27875
+           19787
-----------------
            76864
4.) Subtrahiere die letzten drei Zahlen schriftlich von der ersten schriftlich
             8658
-             706
-           11266
-           12992
-----------------
           -16306
5.) Rechne die Zahl ins zweier komplement um, mit 8 Bit - und subtrahiere diese zahl von der ersten und rechne das Ergebnis nach dezimal
62 -106 = -44
00111110 10010110 = 11010100
6.) Multipliziere die zwei Zahlen schriftlich
51870*42648 = 2212151760
7.) Dividiere die zwei Zahlen schriftlich
52887/59048 = 0
8.) Errechne x Logarithmisch mit dem Taschenrechner
44529\^x = 1647140701
Rechne die Zahl in IEEE-754 um 8356.372070

Image 20240402_181645

1.) Rechne die Zahl in binaer Darstellung  in eine Dezimale Darstellung um
0010011100010011b 10003d
2.) Rechne die Zahl in dezimal darstellung in eine Binaerdarstellung um
37608 1001001011101000
3.) Addiere die drei Zahlen schriftlich
            29202
+           27875
+           19787
-----------------
            76864
4.) Subtrahiere die letzten drei Zahlen schriftlich von der ersten schriftlich
             8658
-             706
-           11266
-           12992
-----------------
           -16306
5.) Rechne die Zahl ins zweier komplement um, mit 8 Bit - und subtrahiere diese zahl von der ersten und rechne das Ergebnis nach dezimal
62 -106 = -44
00111110 10010110 = 11010100
6.) Multipliziere die zwei Zahlen schriftlich
51870*42648 = 2212151760
7.) Dividiere die zwei Zahlen schriftlich
52887/59048 = 0
8.) Errechne x Logarithmisch mit dem Taschenrechner
44529\^x = 1647140701
Rechne die Zahl in IEEE-754 um 8356.372070

Image 20240402_182734

Image 20240402_184013

Image 20240402_192426

Image 20240402_192433

Image 20240402_192439

Image Screenshot_20240402_222524

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


 1 0 0 0 1    1
 2 0 0 1 0    1
 3 0 0 1 1    1
 4 0 1 0 0    1
 6 0 1 1 0    1
 9 1 0 0 1    1
11 1 0 1 1    1
12 1 1 0 0    1


Gruppe 1:
 1 0 0 0 1    1
 2 0 0 1 0    1
 4 0 1 0 0    1
Gruppe 2:
 3 0 0 1 1    1
 6 0 1 1 0    1
 9 1 0 0 1    1
12 1 1 0 0    1
Gruppe 3:
11 1 0 1 1    1

1:3         0 0 - 1
1:9         - 0 0 1
2:3         0 0 1 -
2:6         0 - 1 0
4:6         0 1 - 0
4:12        - 1 0 0
3:11        - 0 1 1
9:11        1 0 - 1



2:3         0 0 1 -
1:3         0 0 - 1
4:6         0 1 - 0
9:11        1 0 - 1
2:6         0 - 1 0
1:9         - 0 0 1
4:12        - 1 0 0
3:11        - 0 1 1


Gruppe 1:
2:3         0 0 1 -

Gruppe 1:
1:3         0 0 - 1
4:6         0 1 - 0
Gruppe 2:
9:11        1 0 - 1

Gruppe 1:
2:6         0 - 1 0

Gruppe 1:
1:9         - 0 0 1
4:12        - 1 0 0

Gruppe 2:
3:11        - 0 1 1



Gruppe 1:
2:3             0 0 1 -

Gruppe 1:
1:3         0 0 - 1
4:6             0 1 - 0
Gruppe 2:
9:11        1 0 - 1

1:3:9:11        - 0 - 1

Gruppe 1:
2:6             0 - 1 0

Gruppe 1:
1:9         - 0 0 1
4:12            - 1 0 0
Gruppe 2:
3:11        - 0 1 1

1:9:3:1         - 0 - 1
3:11            - 0 1 1




2:3             0 0 1 -
4:6             0 1 - 0
1:3:9:11        - 0 - 1
2:6             0 - 1 0
1:9:3:1         - 0 - 1
3:11            - 0 1 1
4:12            - 1 0 0


2:3             0 0 1 -
4:6             0 1 - 0
1:3:9:11        - 0 - 1
2:6             0 - 1 0
3:11            - 0 1 1
4:12            - 1 0 0


                1   2   3   4   6   9   11  12
2:3                 *   *
4:6                         *   *
1:3:9:11        *       *           *   *
2:6                 *           *
3:11                    *               *
4:12                        *               *

                1   2   3   4   6   9   11  12
2:3                 *   *
4:6                         *   *               p
1:3:9:11        *       *           *   *       p
2:6                 *           *
3:11                    *               *
4:12                        *               *   p


                1   2   3   4   6   9   11  12
2:3                 *   *
4:6                         *   *               p
1:3:9:11        *       *           *   *       p
4:12                        *               *   p

2:3             0 0 1 -
4:6             0 1 - 0
1:3:9:11        - 0 - 1
4:12            - 1 0 0


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

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

library ieee;
use ieee.std_logic_1164.all;

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

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

library ieee;
use ieee.std_logic_1164.all;

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

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

library ieee;
use ieee.std_logic_1164.all;

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

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

end;

library ieee;
use ieee.std_logic_1164.all;

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

architecture behaviour of quine20240402testbench is
    component quine20240402
    port (
        x3, x2, x1, x0: in std_logic;
        y: out std_logic
    );
    end component;
    signal x3, x2, x1, x0: std_logic;
begin
    q: quine20240402 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;