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
/GRUYEREINSTANCEID/deletesnippet?index=0 |
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: https://xss-game.appspot.com/level1/frame?query=<script>+alert('alert')</script> | |
2: <a href='#' onerror="alert('alert');/> |
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
// Typage proposé par typescript: | |
// users: any[] | |
interface User { | |
name: string; | |
age?: number; | |
birthday?: string; | |
} | |
const prettyPrintWilder = (users: User[]): void => { |
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
mysql> SELECT t.name, COUNT(*) AS nb_players | |
FROM player p JOIN team t ON t.id = p.team_id | |
GROUP BY team_id | |
ORDER BY nb_players DESC; | |
+------------+------------+ | |
| name | nb_players | | |
+------------+------------+ | |
| Gryffindor | 36 | | |
| Slytherin | 21 | | |
| Ravenclaw | 15 | |
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
mysql> SELECT w.lastname, w.firstname, p.role, t.name | |
-> FROM wild_db_quest.player p | |
-> JOIN wild_db_quest.wizard w | |
-> ON w.id = p.wizard_id | |
-> JOIN wild_db_quest.team t | |
-> ON t.id = p.team_id | |
-> ORDER BY t.name, p.role, w.lastname, w.firstname; | |
+-----------------+-------------+--------+------------+ | |
| lastname | firstname | role | name | | |
+-----------------+-------------+--------+------------+ |
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
app.delete('/api/movie/:id', (req, res) => { | |
const idMovie = req.params.id | |
connection.query('DELETE FROM movie WHERE id = ?', [idMovie], err => { | |
if (err) { | |
res.status(500).send("Erreur lors de la supression d'un employé"); | |
} else { | |
res.sendStatus(200); | |
} | |
}); | |
}); |
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
const express = require('express'); | |
const connection = require('./conf'); | |
const app = express(); | |
const port = 3000; | |
app.use(express.json()); | |
app.use(express.urlencoded({ | |
extended: true | |
})); |
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
const express = require('express'); | |
const connection = require('./conf'); | |
const app = express(); | |
const port = 3000; | |
app.use(express.json()); | |
app.use(express.urlencoded({ | |
extended: true | |
})); |