This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$movies = [ | |
['title'=>'Indiana Jones et le Royaume du Crâne de Cristal', 'actors' => ['Harrison Ford', 'Cate Blanchett', 'Karen Allen']], | |
['title'=>'Indiana Jones et la Dernière Croisade', 'actors' => ['Harrison Ford', 'Sean Connery', 'Denholm Elliott']], | |
['title'=>'Indiana Jones et le Temple maudit', 'actors' => ['Harrison Ford', 'Kate Capshaw', 'Jonathan Ke Quan']] | |
]; | |
$result=""; | |
foreach ($movies as $movieKey => $movie) { | |
$result .= "Dans le film " . $movie['title'] . ", les principaux acteurs sont : " ; | |
foreach ($movie['actors'] as $actorKey => $actor) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Créé un algorithme en pseudo-code | |
Créé l'algorithme suivant : compte le nombre maximum de bonbon que tu peux acheter, en fonction de l'argent que tu possèdes et du prix du bonbon. | |
En entrée tu as le réel argent qui contient le montant disponible, et le réel prix qui contient le prix unitaire du bonbon. | |
Le retour attendu est l'entier représentant nombre maximum de bonbon, de montant prix, que argent permet d'acheter ! | |
Par exemple, si argent est égal à 12,47 et prix est égal à 1,14, le résultat attendu sera 10 (car tu ne peux pas acheter 10,938596491 bonbons !). | |
Utilise une boucle pour calculer ce résultat, tu n'as pas le droit d'utiliser une méthode pour arrondir. | |
Si l'argent ou le prix sont inférieurs ou égaux à zéro, retourne 0. | |
Dépose le pseudo-code sur un Gist et partage le lien. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.wrapper{ | |
position: relative; | |
text-align: center !important; | |
} | |
.card{ | |
width: 500px; | |
margin: 0 auto; | |
} | |
.head{ | |
position: absolute; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
*le pistolet bat le poing mais perd contre le fouet | |
* gun > fists but gun < whip | |
*le poing bat le fouet mais perd contre le pistolet | |
* fists > whip but fists < gun | |
*le fouet bat le pistolet mais perd contre le poing | |
* whip > gun but whip < fists | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (isset($_POST['submit'])) { | |
$posts = []; | |
foreach ($_POST as $key => $post) { | |
$posts[] = htmlspecialchars(stripslashes(trim($post))); | |
} | |
$nom = $posts['nom']; | |
$prenom = $posts['prenom']; | |
$email = $posts['email']; | |
$telephone = $posts['telephone']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#1 Comme pour les étapes précédentes, teste toutes les expressions régulières du challenge sur le site http://regexr.com/, sur le même texte d'exemple, disponible pour rappel sur le Gist suivant. | |
#2 Trouve l'expression régulière qui cherche la seule occurrence du deuxième prénom de Néo (soit le A. de "Thomas A. Anderson). | |
#3 Trouve l'expression régulière qui cherche la date contenue dans le document. | |
#4 Trouve l'expression qui cherche la note contenue dans le texte, sans pour autant sélectionner une partie de la date (tu peux t'aider du caractère espace avant la note). | |
#5 Trouve l'expression régulière qui renvoie les mots ayant au moins 14 caractères (tu devrais trouver l'age du capitaine, à moins que ça ne soit son vaisseau !) | |
#6 Trouve l'expression régulière qui correspond à l'url de la fiche du fils sur IMDB https://www.imdb.com/title/tt0133093 (attention à ne pas sélectionner les parenthèses). | |
#1 https://regexr.com/41f6u /A./ | |
#2 https://regexr.com/41f7d /[0-9]{2}\/[0-9]{2}\/[0-9]{4}/g | |
#3 https:// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
*2018-10-24 Mickael Lehoux | |
* | |
*PlatformIO project | |
*//main.cpp | |
* | |
*Used to download firmware to ESP32 SD card from private server | |
*Use the ESP32Dev web server to start request for the last firmware by using HTTP request | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
*2018-10-24 Mickael Lehoux | |
* | |
*PlatformIO project | |
*//main.cpp | |
* | |
*ESP32's SD files are expose through HTTP web server | |
* | |
*/ | |
#include "main.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" | |
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" | |
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous"> | |
<title>Eye of Sauron</title> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
voici ma solution. | |
Alors j'ai utilisé git GUI car j'utilise pas GITK | |
Mais c'est la même chose | |
https://drive.google.com/file/d/1OFwvurP6KBLUT5Nwo629l-Pxd8sSr_y0/view |