Skip to content

Instantly share code, notes, and snippets.

@ConnorFM
ConnorFM / index.php
Created March 12, 2019 13:43
Fonctions avec php
<?php
function writeSecretSentence (string $PARAMETRE_1 , string $PARAMETRE_2):string{
return $PARAMETRE_1 . " s'incline face à " . $PARAMETRE_2 . "<br>";
}
echo(writeSecretSentence("l'homme", "la femme"));
echo (writeSecretSentence("la femme" , "l'homme"));
echo "no sexism";
# Created by newuser for 5.1.1
#!/usr/bin/env zsh
# Complétion
autoload -U compinit
compinit
#Insensible à la casse
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}'
@ConnorFM
ConnorFM / form.php
Last active September 13, 2024 20:24
Contact Form
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<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">
<?php
class Personne
{
// Attributes
public $name;
public $firstName;
public $adress;
public $birthDate;
mysql> SELECT * FROM wizard WHERE birthday BETWEEN '1975-01-01' AND '1985-12-31' and is_muggle=0;
+----+-----------+----------+------------+-------------+---------------------------------------+-----------+
| id | firstname | lastname | birthday | birth_place | biography | is_muggle |
+----+-----------+----------+------------+-------------+---------------------------------------+-----------+
| 1 | harry | potter | 1980-07-31 | london | | 0 |
| 2 | hermione | granger | 1979-09-19 | | Friend of Harry Potter | 0 |
| 4 | ron | weasley | 1980-03-01 | | Best friend of Harry | 0 |
| 5 | ginny | weasley | 1981-08-11 | | Sister of Ron and girlfriend of Harry | 0 |
| 6 | fred | weasley | 1978-04-01 | | | 0 |
| 7 | george | weasley | 1978-04-01 |
mysql> INSERT INTO `wild_db_quest`.`school` (`name`, `country`, `capacity`) VALUES ('Beauxbatons Academy of Magic', 'France', '550');
Query OK, 1 row affected (0,09 sec)
mysql>
mysql> INSERT INTO `wild_db_quest`.`school` (`name`, `country`, `capacity`) VALUES ('Castelobruxo', 'Brazil', '380');
Query OK, 1 row affected (0,13 sec)
mysql>
mysql> INSERT INTO `wild_db_quest`.`school` (`name`, `country`, `capacity`) VALUES ('Durmstrang Institute', 'Norway', '570');
Query OK, 1 row affected (0,14 sec)
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 |
| Finnigan | Seamus | beater | Gryffindor |
| Hagrid | Rubeus | beater | Gryffindor |
| Longbottom | Alice | beater | Gryffindor |
| McGonagall | Minerva | beater | Gryffindor |
mysql> select name, count(player.id) as members_numbers from team join player on player.team_id=team.id group by team.id order by members_numbers desc;
+------------+-----------------+
| name | members_numbers |
+------------+-----------------+
| Gryffindor | 36 |
| Slytherin | 21 |
| Ravenclaw | 15 |
| Hufflepuff | 12 |
+------------+-----------------+
4 rows in set (0.00 sec)
Monsieur,
merci pour ce rendez-vous que vous nous avez accordé et pour les retours que vous avez effectué.
Comme convenu avec vous après la démo, durant ce sprint nous nous attacherons à créer une page d'authentification, qui permettra aux seuls membres de votre équipe d'accéder à evenTeam. Par ailleurs, vous aurez la possibilité d'ajouter les dits membres au listing des employés aptes à y accèder.
Enfin, nous rendrons possible l'affichage, la création ou la modification des évènements.
N'hésitez pas à revenir vers nous si une priorité se présentait à vous d'ici notre rendez-vous de ce vendredi à 15h.
@ConnorFM
ConnorFM / boondock.js
Created April 22, 2019 15:27
JS Basics
// Define some variables
const movieName = 'The Boondock Saints';
const releaseYear = '1999';
const director = 'Troy Duffy'
const message = 'The movie ' + movieName + ' ,directed by' + director + ' and released in ' + releaseYear + ' is my favourite movie' ;
// Display a popup
alert(message);