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
int main() | |
{ | |
printf("hello world") | |
return 0 | |
} |
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 mysql = require('mysql'); | |
const connection = mysql.createConnection({ | |
host : 'localhost', // adresse du serveur | |
user : 'root', // le nom d'utilisateur | |
password : 'Henriette2', // le mot de passe | |
database : 'sqlquests', // le nom de la base de données | |
}); | |
module.exports = connection; | |
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('yo yo'); | |
}); | |
//Une route /api/movies qui renvoie un string | |
app.get(`/api/movies`, (req, res) => { |
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
DELETE FROM movie | |
WHERE id='5' | |
DELETE FROM movie | |
WHERE id> 10 |
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
DELETE FROM movie | |
WHERE id='5' | |
DELETE FROM movie | |
WHERE id> 120 |
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
UPDATE movie | |
SET name='Men in Black' | |
WHERE id='5'; | |
UPDATE movie | |
SET name='Deadpool',poster'https://upload.wikimedia.org/wikipedia/en/thumb/2/23/Deadpool_%282016_poster%29.png/220px-Deadpool_%282016_poster%29.png' | |
WHERE id='8'; | |
UPDATE movie | |
SET comment=' ' |
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
SELECT * FROM movie | |
SELECT name FROM movie | |
SELECT id, poster FROM movie | |
SELECT poster,comment AS avis_spectateur FROM movie |
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
let express = require('express'); | |
let app = express(); | |
const port = 3000; | |
app.get('/', (req, res) => { | |
res.send(`<h1>Bienvenue sur votre serveur !!</h1>`); | |
}); | |
app.get('/contact', (req, res) => { | |
res.send(`<h1>Nous ne sommes pas joignables pour le moment !</h1>`); |
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
var http = require('http'); | |
http.createServer(function (require, response) { | |
response.writeHead(200, {'Content-Type': 'text/html; charset=utf-8'}) | |
var url= require.url; | |
if(url ==='/about'){ | |
response.write(`<h1>What's up Dude?</h1>`) | |
response.end() | |
}else{ |
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
<!DOCTYPE html!> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Page Title</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/4.0.1/redux.min.js"></script> | |
</head> |
NewerOlder