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
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| func main() { | |
| fmt.Println("Hello, ESGI!") | |
| // GET /users → 200, Content-Type: application/json, [] |
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
| <!DOCTYPE html> | |
| <html lang="fr-FR"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="description" content="Découvrez notre tout nouveau site internet."> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Le titre de votre site internet</title> | |
| </head> | |
| <body> | |
| <form method="POST" action="/php/register.php"> |
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
| RewriteEngine on | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule ^(.*)$ /webapi/index.php?route=$1 [L,QSA] |
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 partial = (callback, ...initialArguments) => { | |
| return (...additionalArguments) => { | |
| const allArguments = [...initialArguments, ...additionalArguments]; | |
| if (allArguments.length >= callback.length) { | |
| return callback(...allArguments); | |
| } | |
| return partial(callback, ...allArguments); | |
| }; |
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
| // For these excercises : | |
| // - Only use recursion (or direct recursion) | |
| // - Array.prototype methods are prohibited | |
| // - for, while & do while loops are prohibited | |
| // - Array.prototype.length is accepted | |
| /** | |
| * @description Update every item of an array | |
| * @param {<Type>(item: Type) => Type} update A function that will update one item | |
| * @param {Array<Type>} items An array of items to update |
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 request = new XMLHttpRequest(); | |
| const errorElement = document.getElementById("error"); | |
| const postsElement = document.getElementById("posts"); | |
| request.addEventListener("timeout", function() { | |
| errorElement.innerText = "Le délai d'attente maximum est dépassé pour la requête."; | |
| }); | |
| request.addEventListener("error", function() { | |
| errorElement.innerText = this.statusText; |
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
| <!DOCTYPE html> | |
| <?php | |
| $cart = [ | |
| [ "product" => "paper", "quantity" => 7, "price" => 1.26 ], | |
| [ "product" => "pen", "quantity" => 2, "price" => 0.12 ], | |
| [ "product" => "eraser", "quantity" => 5, "price" => 0.89 ] | |
| ]; | |
| $stocks = [ |
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
| <?php | |
| $cart = [ | |
| [ | |
| "product" => "paper", | |
| "quantity" => 7, | |
| "price" => 1.26 | |
| ], | |
| [ | |
| "product" => "pen", |
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
| <!DOCTYPE html> | |
| <?php | |
| $students = [ | |
| [ | |
| "id" => 1, | |
| "name" => "Amanda ANDERSSON", | |
| "CC1" => 10, | |
| "CC2" => 17, | |
| "CC3" => 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
| <?php | |
| $cart = [ | |
| ["product" => "paper", "quantity" => 7, "price" => 1.26], | |
| ["product" => "pen", "quantity" => 2, "price" => 0.12], | |
| ["product" => "eraser", "quantity" => 5, "price" => 0.89] | |
| ]; | |
| $stocks = [ | |
| ["product" => "paper", "quantity" => 88], |
NewerOlder