Skip to content

Instantly share code, notes, and snippets.

@b0ndurant
b0ndurant / app.js
Created May 13, 2019 16:21
Découverte de NodeJs - exercice 1
console.log(`quel est votre age ?`);
process.stdin.on('data', (number) => {
if (!Number(number)) {
console.log('votre age doit etre un chiffre')
console.log(`quel est votre age ?`);
}
else if (number > 99) {
console.log('votre age ne peut depasser 99 ans')
console.log(`quel est votre age ?`);
}
@b0ndurant
b0ndurant / index.html
Created April 14, 2019 12:56
quete javascript 1
<html>
<head>
</head>
<body>
<script src="main.js"></script>
</body>
</html>
1/ SELECT id_camp,localite FROM campus;
2/ SELECT nom,nom_camp FROM equipe JOIN campus ON equipe.id_camp = campus.id_camp;
3/ SELECT nom,fonction,nom_camp FROM equipe JOIN campus ON equipe.id_camp = campus.id_camp WHERE fonction = 'assistant' AND nom_camp IN ('Lorien','la comte');
4/ SELECT nom,fonction,date_embauche FROM equipe WHERE NOT fonction='assistant' AND EXTRACT(YEAR FROM date_embauche) = 2017;
5/ SELECT nom FROM equipe WHERE nom LIKE '%r%a%';
1 : /La/g
2 : /[0-9]{2}\/[0-9]{2}\/[0-9]{4}/g
3 : / [0-9]\/[0-9]{2}/g
4 : / format[a-z]{1,}/gi
5 : /\([a-z ]{1,}\)/gi
@b0ndurant
b0ndurant / poo.php
Last active March 22, 2018 15:37
quete poo
<?php
class Personne
{
//Attributs
private $firstName;
private $lastName;
private $address;
private $birthDate;
//Methodes
@b0ndurant
b0ndurant / sql_part2.sql
Created March 17, 2018 18:32
sql part 2
-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64)
--
-- Host: localhost Database: sql_part2
-- ------------------------------------------------------
-- Server version 5.7.21-0ubuntu0.17.10.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
kl
-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64)
--
-- Host: localhost Database: aurelien_m_wcs_lille
-- ------------------------------------------------------
-- Server version 5.7.21-0ubuntu0.17.10.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
@b0ndurant
b0ndurant / index.php
Last active March 15, 2018 16:26
index.php
<?php
function writeSecretSentence(string $param1,string $param2) : string {
return $param1 . " s'incline face a ". $param2;
}
echo writeSecretSentence ("param1", "param2");
?>
@b0ndurant
b0ndurant / post_formulaire.php
Last active March 11, 2018 22:24
quete formulaire
<?php
if($_POST)
{
$errors = array();
if(empty($_POST['user_name']))
{
$errors['user_name'] = "<p style='color:red;'>remplis ton nom</p>";