APL 1.2
This commit is contained in:
parent
fc206cea91
commit
499f58da72
BIN
APL1.2/TP04/compte
Normal file
BIN
APL1.2/TP04/compte
Normal file
Binary file not shown.
24
APL1.2/TP04/compteur.c
Normal file
24
APL1.2/TP04/compteur.c
Normal file
@ -0,0 +1,24 @@
|
||||
#include<stdio.h>
|
||||
#include<stdlib.h>
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
FILE* flux = fopen("compte", "r");
|
||||
int compte = 0;
|
||||
|
||||
if (flux) {
|
||||
fread(&compte, 4, 1, flux);
|
||||
}
|
||||
|
||||
compte++;
|
||||
|
||||
printf("%d\n", compte);
|
||||
|
||||
flux = fopen("compte", "w");
|
||||
if (flux) {
|
||||
fwrite(&compte, 4, 1, flux);
|
||||
fclose(flux);
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
28
APL1.2/TP04/hexadecimal.c
Normal file
28
APL1.2/TP04/hexadecimal.c
Normal file
@ -0,0 +1,28 @@
|
||||
#include<stdio.h>
|
||||
#include<stdlib.h>
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
FILE* flux = fopen(argv[1], "r");
|
||||
|
||||
if (flux) {
|
||||
unsigned char lettre, count = 0;
|
||||
|
||||
while(!feof(flux)) {
|
||||
if (count == 0) puts("");
|
||||
fread(&lettre, 1, 1, flux);
|
||||
printf("%02x", lettre);
|
||||
fread(&lettre, 1, 1, flux);
|
||||
printf("%02x ", lettre);
|
||||
|
||||
count = (count + 1) % 8;
|
||||
}
|
||||
|
||||
puts("");
|
||||
fclose(flux);
|
||||
} else {
|
||||
puts("Error : Could not open file.");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
BIN
APL1.2/TP04/image.bin
Normal file
BIN
APL1.2/TP04/image.bin
Normal file
Binary file not shown.
30
APL1.2/TP04/image.c
Normal file
30
APL1.2/TP04/image.c
Normal file
@ -0,0 +1,30 @@
|
||||
#include<stdio.h>
|
||||
#include<stdlib.h>
|
||||
#include<graph.h>
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
int width, height;
|
||||
couleur color;
|
||||
FILE* flux = fopen("image.bin", "r");
|
||||
if (flux) {
|
||||
|
||||
fread(&width, 4, 1, flux);
|
||||
fread(&height, 4, 1, flux);
|
||||
|
||||
InitialiserGraphique();
|
||||
CreerFenetre(100, 100, width, height);
|
||||
|
||||
for (int x = 0; x < width; x++) {
|
||||
for (int y = 0; y < height; y++) {
|
||||
fread(&color, sizeof(couleur), 1, flux);
|
||||
ChoisirCouleurDessin(color);
|
||||
DessinerPixel(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
Touche();
|
||||
FermerGraphique();
|
||||
return EXIT_SUCCESS;
|
||||
} else return EXIT_FAILURE;
|
||||
}
|
||||
|
16
HTML/TP01/Exercice1.html
Normal file
16
HTML/TP01/Exercice1.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr-FR">
|
||||
<head>
|
||||
<title>Le W3C</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Le W3C</h1>
|
||||
|
||||
<p>Le <abbr title="World Wide Web Consortium">W3C</abbr> est un consortium créé le <time datetime="1994-10-01">1<sup>er</sup> octobre 1994</time> par Tim Berners-Lee, principal
|
||||
inventeur du <em>World Wide Web</em> en <time datetime="1989">1989</time>, pour promouvoir la compatibilité et donc
|
||||
la normalisation des technologies du World Wide Web. Avant le W3C, c'était l'<abbr title="Internet Engineering Task Force">IETF</abbr>,
|
||||
un autre organisme important de l'Internet, qui était en charge de cette mission.</p>
|
||||
|
||||
<p>Le W3C a par exemple standardisé les technologies <abbr title="HyperText Markup Language">HTML</abbr> et <abbr title="Extensible Markup Language">XML</abbr>.</p>
|
||||
</body>
|
||||
</html>
|
24
HTML/TP01/Exercice2.html
Normal file
24
HTML/TP01/Exercice2.html
Normal file
@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<title>Emoticons</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Emoticons</h1>
|
||||
<p>Emoticons are textual portrayals of a writer's moods or facial
|
||||
expressions in the form of icons. Originally, these icons
|
||||
consisted of ASCII art.</p>
|
||||
|
||||
<p>Emoticons can generally be divided into two groups: Western (mainly from America and Europe) or horizontal; Eastern or vertical (mainly from east Asia).
|
||||
|
||||
<h2>Western</h2>
|
||||
<p>Western style emoticons are mostly written from left to right as though the head is rotated counter-clockwise 90 degrees.</p>
|
||||
|
||||
<p>Smiley: :‑) :-><br>Tongue-tied: :‑&<br>Broken heart: <\3<br>Rose: @}->--<br>Fish: ><(((*></p>
|
||||
|
||||
<h2>Eastern</h2>
|
||||
<p>Eastern emoticons generally are not rotated sideways. They first arose in Japan, where they are referred to as kaomoji.</p>
|
||||
|
||||
<p>Troubled: (>_<)<br>Sad: ("_")<br>Cat: (=^·^=)<br>Headphones: ((d[-_-]b))</p>
|
||||
</body>
|
||||
</html>
|
35
HTML/TP01/Exercice3.html
Normal file
35
HTML/TP01/Exercice3.html
Normal file
@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr-FR">
|
||||
<head>
|
||||
<title>Mes sites web préférés</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Mes sites préférés</h1>
|
||||
<p>Parmis mes sites Web préférés, on y trouve :</p>
|
||||
<ul>
|
||||
<li><a href="http://www.iut-fbleau.fr" target="_blank">Le site du l'IUT</a></li>
|
||||
<li><a href="https://www.youtube.com" target="_blank">Youtube</a></li>
|
||||
<li><a href="https://dwarves.iut-fbleau.fr/gitiut/horville" target="_blank">Mon dépot en ligne</a></li>
|
||||
<li><a href="https://validator.w3.org/">Le site de validation de W3C</a></li>
|
||||
</ul>
|
||||
<br>
|
||||
<p>Par ordre d'importance, je pourrais les classer comme ceci:</p>
|
||||
<ol>
|
||||
<li><a href="https://www.youtube.com" target="_blank">Youtube</a></li>
|
||||
<li><a href="https://dwarves.iut-fbleau.fr/gitiut/horville" target="_blank">Mon dépot en ligne</a></li>
|
||||
<li><a href="http://www.iut-fbleau.fr" target="_blank">Le site du l'IUT</a></li>
|
||||
<li><a href="https://validator.w3.org/">Le site de validation de W3C</a></li>
|
||||
</ol>
|
||||
<br>
|
||||
<dl>
|
||||
<dt><a href="http://www.iut-fbleau.fr" target="_blank">Le site du l'IUT</a></dt>
|
||||
<dd>On y trouve notament toutes les resources informatiques nécéssaire aux étudiants du BUT Info.</dd>
|
||||
<dt><a href="https://www.youtube.com" target="_blank">Youtube</a></dt>
|
||||
<dd>Qui regorge de vidéos en tous genres afin de se distraire</dd>
|
||||
<dt><a href="https://dwarves.iut-fbleau.fr/gitiut/horville" target="_blank">Mon dépot en ligne</a></dt>
|
||||
<dd>Qui contient tous mes travaux en informatique</dd>
|
||||
<dt><a href="https://validator.w3.org/">Le site de validation de W3C</a></dt>
|
||||
<dd>Qui sert à valider le contenu d'un document HTML et ainsi d'être sur qu'il soit à la norme.</dd>
|
||||
</dl>
|
||||
</body>
|
||||
</html>
|
120
HTML/TP01/Exercice4.html
Normal file
120
HTML/TP01/Exercice4.html
Normal file
@ -0,0 +1,120 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr-FR">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Le Système Solaire</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Les planètes du système solaire</h1>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Planète</th>
|
||||
<th>Distance Moyenne (UA)</th>
|
||||
<th>Exentricité</th>
|
||||
<th>Inclinaison (°)</th>
|
||||
<th>Période de révolution (an)</th>
|
||||
<th>Photo</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Mercure</td>
|
||||
<td>0,38709893</td>
|
||||
<td>0,205</td>
|
||||
<td>7</td>
|
||||
<td>0,241</td>
|
||||
<td><img
|
||||
src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/30/Mercury_in_color_-_Prockter07_centered.jpg/280px-Mercury_in_color_-_Prockter07_centered.jpg"
|
||||
width="75"
|
||||
alt="Mecure">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Venus</td>
|
||||
<td>0,72333199</td>
|
||||
<td>0,007</td>
|
||||
<td>3,4</td>
|
||||
<td>0,615</td>
|
||||
<td><img
|
||||
src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/Venus-real_color.jpg/280px-Venus-real_color.jpg"
|
||||
width="75"
|
||||
alt="Venus">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Terre</td>
|
||||
<td>1</td>
|
||||
<td>0,017</td>
|
||||
<td>0</td>
|
||||
<td>1</td>
|
||||
<td><img
|
||||
src="https://upload.wikimedia.org/wikipedia/commons/d/d9/Earth_by_the_EPIC_Team_on_21_April_2018.png"
|
||||
width="75"
|
||||
alt="Terre">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mars</td>
|
||||
<td>1,52366231</td>
|
||||
<td>0,094</td>
|
||||
<td>1,9</td>
|
||||
<td>1,881</td>
|
||||
<td><img
|
||||
src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/36/Mars_Valles_Marineris_EDIT.jpg/280px-Mars_Valles_Marineris_EDIT.jpg"
|
||||
width="75"
|
||||
alt="Mars">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jupiter</td>
|
||||
<td>5,20336301</td>
|
||||
<td>0,049</td>
|
||||
<td>1,3</td>
|
||||
<td>11,862</td>
|
||||
<td><img
|
||||
src="https://upload.wikimedia.org/wikipedia/commons/e/e2/Jupiter.jpg"
|
||||
width="75"
|
||||
alt="Jupiter">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Saturne</td>
|
||||
<td>9,6</td>
|
||||
<td>0,057</td>
|
||||
<td>2,5</td>
|
||||
<td>29,452</td>
|
||||
<td><img
|
||||
src="https://img.maxisciences.com/s3/frgsl/1024/astronomie/default_2021-06-14_8869d225-986d-4dfb-a2e6-055761d85705.jpeg"
|
||||
width="75"
|
||||
alt="Saturne">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Uranus</td>
|
||||
<td>2872,5</td>
|
||||
<td>0,8</td>
|
||||
<td>97,8</td>
|
||||
<td>30,589</td>
|
||||
<td><img
|
||||
src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/Uranus2.jpg/280px-Uranus2.jpg"
|
||||
width="75"
|
||||
alt="Uranus">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Neptune</td>
|
||||
<td>4495,1</td>
|
||||
<td>1,8</td>
|
||||
<td>28,3</td>
|
||||
<td>59,8</td>
|
||||
<td><img
|
||||
src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/06/Neptune.jpg/280px-Neptune.jpg"
|
||||
width="75"
|
||||
alt="Neptune">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
19
HTML/TP01/Exercice5.html
Normal file
19
HTML/TP01/Exercice5.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr-FR">
|
||||
<head>
|
||||
<title>Les couches du développement WEB</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Les différentes couches du développement WEB :</h1>
|
||||
<img src="https://upload.wikimedia.org/wikipedia/commons/c/cd/Progressive_enhancement_web_design_pyramid_%28HTML%2C_CSS%2C_JS%29.svg"
|
||||
width="700"
|
||||
alt="pyramide_couches_web"
|
||||
usemap="#picmap">
|
||||
|
||||
<map name="picmap">
|
||||
<area shape="poly" coords="233,203,350,0,467,203" href="https://developer.mozilla.org/docs/Web/JavaScript" target="_blank" alt="JavaScript">
|
||||
<area shape="poly" coords="233,203,467,203,583,404,117,404" href="https://developer.mozilla.org/docs/Web/CSS" target="_blank" alt="CSS">
|
||||
<area shape="poly" coords="117,404,583,404,700,603,0,603" href="https://developer.mozilla.org/docs/Web/HTML" target="_blank" alt="HTML">
|
||||
</map>
|
||||
</body>
|
||||
</html>
|
11
HTML/TP01/Exercice6.sh
Executable file
11
HTML/TP01/Exercice6.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
printf "<!DOCTYPE html>\n<html lang=\"fr-FR\">\n<body>\n" > $2
|
||||
printf "<h1>"$(readlink -f $1)"</h1>\n" >> $2
|
||||
printf "<table>\n<thead>\n<tr>\n<th>Nom du fichier</th>\n<th>Droits</th>\n<th>Taille</th>\n</tr>\n</thead>" >> $2
|
||||
for file in $(ls $1)
|
||||
do
|
||||
stat $file --format="<tr><td>%n</td><td>%A</td><td>%s</td></tr>" >> $2
|
||||
done
|
||||
|
||||
printf "</table>\n</body>\n</html>" >> $2
|
21
HTML/TP01/toto.html
Normal file
21
HTML/TP01/toto.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr-FR">
|
||||
<body>
|
||||
<h1>/export/home/an21/horville/APL/HTML/TP01</h1>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom du fichier</th>
|
||||
<th>Droits</th>
|
||||
<th>Taille</th>
|
||||
</tr>
|
||||
</thead><tr><td>Exercice1.html</td><td>-rw-r--r--</td><td>824</td></tr>
|
||||
<tr><td>Exercice2.html</td><td>-rw-r--r--</td><td>967</td></tr>
|
||||
<tr><td>Exercice3.html</td><td>-rw-r--r--</td><td>1725</td></tr>
|
||||
<tr><td>Exercice4.html</td><td>-rw-r--r--</td><td>2832</td></tr>
|
||||
<tr><td>Exercice5.html</td><td>-rw-r--r--</td><td>843</td></tr>
|
||||
<tr><td>Exercice6.sh</td><td>-rwxr-xr-x</td><td>380</td></tr>
|
||||
<tr><td>toto.html</td><td>-rw-r--r--</td><td>568</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user