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
Console.Write("Hello"); |
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
import okhttp3.ResponseBody | |
import retrofit2.Call | |
import retrofit2.http.GET | |
import retrofit2.http.Query | |
interface TerminalService { | |
@GET("login.php") | |
fun login(@Query("login") login: String, @Query("mdp") password: String): Call<ResponseBody> | |
@GET("reservations.php") |
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
<?php | |
$reservation = Array("id" => 1, "date_debut" => "2021-02-21", "date_fin" => "2021-02-28", "id_client" => 1); | |
$json = json_encode($reservation); | |
echo $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
<body> | |
<div id="vue_root"> | |
Counter: {{ counter }} | |
</div> | |
</body> |
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 mariadb = require('mariadb'); | |
const pool = mariadb.createPool({ | |
host: 'mydb.com', | |
user:'myUser', | |
password: 'myPassword', | |
connectionLimit: 5 | |
}); |
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('/', (req, res) => { | |
res.send('Hello World!') | |
}) | |
app.listen(port, () => { | |
console.log(`Example app listening at http://localhost:${port}`) |
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 http://localhost:3000/test | |
### | |
POST http://localhost:3000/test | |
### | |
PUT http://localhost:3000/test | |
### | |
DELETE http://localhost:3000/test |
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
async function retreiveNumbers() { | |
const response = await fetch("/random"); | |
const numbers = await response.json(); | |
// suite du code | |
} |
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
app.get("/rondoudou", (req, res) => { | |
res.send(`<html> | |
<body> | |
<img src="/test_static/rondoudou.gif" > | |
</body> | |
</html>`); | |
}); |
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
app.get("/rondoudou", (req, res) => { | |
res.send(`<html> | |
<body> | |
<img src="https://www.pokepedia.fr/images/thumb/c/cd/Rondoudou-RFVF.png/636px-Rondoudou-RFVF.png" > | |
</body> | |
</html>`); | |
}); |