Skip to content

Instantly share code, notes, and snippets.

A\.
([1-9]{2})\/([0-9]{2})\/([0-9]{4})
([1-9]{1})\/([0-9]{2})
[a-zA-Z]{14}
(https.*)[a-zA-Z0-9]
mysql> select lastname, firstname, role, name from player join wizard on wizard.id=player.wizard_Id join team on team.id=player.team_id
-> order by name ASC,
-> role asc,
-> lastname asc,
-> firstname asc;
+-----------------+-------------+--------+------------+
| lastname | firstname | role | name |
+-----------------+-------------+--------+------------+
| Black | Sirius | beater | Gryffindor |
| Brown | Lavender | beater | Gryffindor |
<?php
require('personnage.php');
$John = new Personne();
$John->nom = "Duff";
$John->prenom = "John";
$John->adresse = "12 rue okok";
$John->anniversaire = "2000-01-01";
$John->afficherinfo();
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Titre de la page</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Titre de la page</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<?php
function writeSecretSentence(string $animals,string $something): string
{
return $animals . " s'incline face à " . $something;
}
$something = ['fire','sun','moon'];
echo writeSecretSentence("enter an animal",$something[rand(0,2)]);
<?php
$weapons = ['fists', 'gun', 'whip'];
$opponentWeapon = $weapons[rand(0,2)]; // Cela permet de choisir une arme de manière aléatoire
if ($opponentWeapon == $weapons[0]){
$indyweapon = $weapons[1];
}
elseif ($opponentWeapon == $weapons[1]){
$indyweapon = $weapons[2];
}
<?php
const BR ='<br />';
$movie = [
'Movie1' => ['acteur1', 'acteur2', 'acteur3'],
'Movie2' => ['acteur1', 'acteur2', 'acteur3'],
'Movie3' => ['acteur1', 'acteur2', 'acteur3'],
];
foreach ($movie as $key => $value){ //(1)
echo BR.$key . BR; // (key)
<?php
$nomFilm = 'Indiana Jones';
$vu = true;
$dateSorti = '1989';
$noteFilm = '8.5/10';
echo "$nomFilm";
if ($vu == true) {
echo "<br>vu";
} else {
echo "<br> pas vu";
@noelan
noelan / html.html
Created March 4, 2019 19:53
exo bootstrap 1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<title>JS Bin</title>
<link rel="stylesheet" href="stylecss.css">
</head>