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
| interface User { | |
| name: string, | |
| age: number | |
| } | |
| type ppw = (users: User[]) => void | |
| const prettyPrintWilder: ppw = (users) => { | |
| users.map((user) => { |
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 arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; | |
| arr.length < 1 | |
| ? "<div class=d-flex> <img src=IMAGE_NIVEAU_1> </div>" | |
| : arr.length > 1 && arr.length <= 10 | |
| ? "<div class=d-flex> <img src=IMAGE_NIVEAU_1><img src=IMAGE_NIVEAU_2> </div>" | |
| : arr.length > 10 && arr.length <= 20 | |
| ? "<div class=d-flex> <img src=IMAGE_NIVEAU_1><img src=IMAGE_NIVEAU_2><img src=IMAGE_NIVEAU_3> </div>" | |
| : arr.length > 20 | |
| ? "<div class=d-flex> <img src=IMAGE_NIVEAU_1><img src=IMAGE_NIVEAU_2><img src=IMAGE_NIVEAU_3><img src=IMAGE_NIVEAU_4> </div>" |
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 app = express(); | |
| const connection = require('./conf'); | |
| const port = 3021; | |
| const bodyParser = require('body-parser'); | |
| app.use(bodyParser.json()); | |
| app.use( | |
| bodyParser.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 app = express(); | |
| const connection = require('./conf'); | |
| const port = 3019; | |
| const bodyParser = require('body-parser'); | |
| app.use(bodyParser.json()); | |
| app.use( | |
| bodyParser.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 app = express(); | |
| const connection = require('./conf'); | |
| const port = 3016; | |
| const bodyParser = require('body-parser'); | |
| app.use(bodyParser.json()); | |
| app.use( | |
| bodyParser.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
| mysql> select count(*) as nb_player, team.name from player inner join team on team.id=player.team_id group by team_id order by nb_player desc; | |
| +-----------+------------+ | |
| | nb_player | name | | |
| +-----------+------------+ | |
| | 36 | Gryffindor | | |
| | 21 | Slytherin | | |
| | 15 | Ravenclaw | | |
| | 12 | Hufflepuff | | |
| +-----------+------------+ | |
| 4 rows in set (0.01 sec) |
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
| SELECT firstname, lastname, 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; | |
| +-------------+-----------------+--------+------------+ | |
| | firstname | lastname | role | name | | |
| +-------------+-----------------+--------+------------+ | |
| | Sirius | Black | beater | Gryffindor | | |
| | Lavender | Brown | beater | Gryffindor | | |
| | Seamus | Finnigan | beater | Gryffindor | | |
| | Rubeus | Hagrid | beater | Gryffindor | | |
| | Alice | Longbottom | beater | Gryffindor | | |
| | Minerva | McGonagall | beater | Gryffindor | |
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 app = express(); | |
| const connection = require('./conf'); | |
| const port = 3005; | |
| app.get('/', (request, response) => { | |
| response.send('Bienvenue sur Express'); | |
| }); | |
| app.get('/api/movies', (req, res) => { |
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
| import React, { Component } from 'react'; | |
| import Card from './components/Card/Card.jsx'; | |
| import { Button, CardImg, Jumbotron, Container } from 'reactstrap'; | |
| import { NavLink } from 'react-router-dom'; | |
| import AlgoCombat from './AlgoCombat'; | |
| import Select from './select.png'; | |
| import Superheroes from './Superheroes.jpg'; | |
| class SelectHero extends Component { | |
| constructor(props) { |
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 { | |
| text-align: center; | |
| } | |
| .cardDisplay { | |
| display: flex; | |
| flex-direction: row; | |
| justify-content: space-around; | |
| } | |
| .buttonDisplay { |
NewerOlder