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
class Sempai { | |
public static void main (String args[]) { | |
System.out.println("Notice me Sempaï"); | |
} | |
} |
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
var request = require("request"); | |
request("https://swapi.co/api/people/1/", function(error, response, body) { | |
// console.log("error:", error); // Print the error if one occurred | |
// console.log("statusCode:", response && response.statusCode); // Print the response status code if a response was received | |
// console.log("body:", body); // Print the HTML for the Google homepage. | |
const luke = JSON.parse(body); | |
request(luke.films[0], function(erreure, resondre, corps) { | |
// console.log("error:", error); // Print the error if one occurred | |
// console.log("statusCode:", response && response.statusCode); // Print the response status code if a response was received |
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 addAction = { | |
type: "ADD" | |
}; | |
const removeAction = { | |
type: "REMOVE" | |
}; | |
const addtenAction = { | |
type: "ADDTEN" |
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 name, count(*) as nb_player | |
-> from player | |
-> join team | |
-> on team.id=player.team_id | |
-> group by name; | |
+------------+-----------+ | |
| name | nb_player | | |
+------------+-----------+ | |
| Gryffindor | 36 | | |
| Hufflepuff | 12 | |
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 firstname, lastname, role, name from player | |
-> join wizard on player.wizard_id = wizard.id | |
-> join team on team.id = player.team_id | |
-> order by name, role, lastname, firstname; | |
+-------------+-----------------+--------+------------+ | |
| firstname | lastname | role | name | | |
+-------------+-----------------+--------+------------+ | |
| Sirius | Black | beater | Gryffindor | | |
| Lavender | Brown | beater | Gryffindor | | |
| Seamus | Finnigan | 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 port = 8000; | |
const connection = require("./conf"); | |
const bodyParser = require("body-parser"); | |
// Support JSON-encoded bodies | |
app.use(bodyParser.json()); | |
// Support URL-encoded bodies |
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 port = 8000; | |
const connection = require("./conf"); | |
const bodyParser = require("body-parser"); | |
// Support JSON-encoded bodies | |
app.use(bodyParser.json()); | |
// Support URL-encoded bodies |
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 port = 8000; | |
const connection = require("./conf"); | |
const bodyParser = require("body-parser"); | |
// Support JSON-encoded bodies | |
app.use(bodyParser.json()); | |
// Support URL-encoded bodies |
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 port = 3000; | |
const connection = require("./conf"); | |
// écoute de l'url "/api/employees" | |
app.get("/api/movies", (req, res) => { | |
// connection à la base de données, et sélection des employés | |
connection.query("SELECT * from movie", (err, results) => { |
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 port = 3000; | |
app.get("/api/movies", (req, res) => { | |
res.send("Récupération de tous les films"); | |
}); | |
app.get(`/api/movies/:id`, (req, res) => { | |
const id = req.params.id; |