This file contains 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="fr"> | |
<head> | |
<meta charset="utf-8"/> | |
<meta name="author" content="Claire Kodia"> | |
<meta name="description" content="Le Grand Œil sur sa tour de Barad-Dûr"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Bootstrap CSS --> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> | |
<link rel="stylesheet" href="./style.css"> |
This file contains 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
.grid { | |
display: grid; | |
grid-template-rows: repeat(5, minmax(10px auto)); | |
grid-template-columns: repeat(3, 1fr); | |
grid-template-areas: | |
"header header header" | |
"carousel carousel join" | |
"carousel carousel form" | |
"fellows fellows form" | |
"fellows fellows footer"; |
This file contains 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
mysql> SELECT * FROM wizard WHERE birthday BETWEEN '1975-01-01' AND '1980-12-31'; | |
+----+-----------+----------+------------+-------------+------------------------+-----------+ | |
| 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 | | |
| 6 | fred | weasley | 1978-04-01 | | | 0 | | |
+----+-----------+----------+------------+-------------+------------------------+-----------+ | |
4 rows in set (0.01 sec) |
This file contains 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
mysql> SELECT * FROM school; | |
Empty set (0.01 sec) | |
mysql> INSERT INTO school (name, country, capacity) VALUES ('Beauxbatons Academy of Magic', 'France', 550), ('Castelobruxo', 'Brazil', 380), ('Durmstrang Institute', 'Norway', 570), ('Hogwarts School of Witchcraft and Wizardry', 'United Kingdom', 450), ('Ilvermorny School of Witchcraft and Wizardry', 'USA', 300), ('Koldovstoretz', 'Russia', 125), ('Mahoutokoro School of Magic', 'Japan', 800), ('Uagadou School of Magic', 'Uganda', 350); | |
Query OK, 8 rows affected (0.02 sec) | |
Records: 8 Duplicates: 0 Warnings: 0 | |
mysql> SELECT * FROM school; +----+----------------------------------------------+----------+----------------+ | |
| id | name | capacity | country | | |
+----+----------------------------------------------+----------+----------------+ |
This file contains 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
### GET application status | |
GET https://http-practice.herokuapp.com/status | |
### GET application status (format JSON) | |
GET https://http-practice.herokuapp.com/status | |
Accept: application/json | |
### GET fictional wilders (format JSON for PHP 2nd page) | |
GET https://http-practice.herokuapp.com/wilders?language=PHP&page=2 | |
Accept: application/json |
This file contains 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
const http = require('http'); | |
const url = require('url'); | |
const port = 8000; | |
const requestHandler = (request, response) => { | |
const requestedUrl = request.url | |
const parsedUrl = url.parse(requestedUrl, true); | |
const name = parsedUrl.query.name | |
const city = parsedUrl.query.city |
This file contains 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
const express = require('express'); | |
const app = express(); | |
const port = 3000; | |
app.get('/', (request, response) => { | |
response.send('Bienvenue sur Express'); | |
}); | |
app.get('/api/movies', (request, response) => { | |
response.send('Récupération de tous les films'); |
This file contains 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
const express = require('express'); | |
const connection = require('./conf'); | |
const app = express(); | |
const port = 3000; | |
// écoute de l'url "/api/employees" | |
app.get('/api/employees', (req, res) => { | |
// connection à la base de données, et sélection des employés | |
connection.query('SELECT * from employee', (err, results) => { | |
if (err) { |
This file contains 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
SELECT lastname, firstname, role, name | |
FROM wizard | |
INNER JOIN player | |
ON wizard.id = player.wizard_id | |
INNER JOIN team | |
ON player.team_id = team.id | |
ORDER BY name, role, lastname, firstname ASC; | |
SELECT firstname, lastname |
This file contains 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
SELECT name, COUNT(*) | |
FROM player | |
JOIN team | |
ON player.team_id = team.id | |
GROUP BY name | |
ORDER BY COUNT(*) DESC; | |
SELECT name, COUNT(*) | |
FROM team | |
JOIN player |
OlderNewer