Skip to content

Instantly share code, notes, and snippets.

View PradalCyril's full-sized avatar

PRADAL Cyril PradalCyril

View GitHub Profile
@PradalCyril
PradalCyril / 05sql
Last active January 16, 2019 16:09
-- #1
SELECT equipe.nom, round(equipe.salaire,3) from equipe WHERE campus_mgr is null
-- #2
SELECT case when campus.nom_camp != 'Lorien' then equipe.nom else '#####' END from equipe INNER JOIN campus ON campus.id_camp = equipe.id_camp
-- #3
SELECT equipe.nom, LPAD(MONTH(date_embauche),2,0) from equipe
-- #1
SELECT id_camp, localite from campus
-- #2
SELECT equipe.nom, campus.nom_camp from equipe INNER JOIN campus ON campus.id_camp=equipe.id_camp
-- #3
var express = require('express');
var router = express.Router();
router.use(function (req, res, next) {
console.log('Time:', Date.now());
next();
});
/* GET home page. */
router.get('/', function (req, res, next) {
res.render('index', { title: 'Express' });
-- MySQL dump 10.13 Distrib 8.0.13, for osx10.14 (x86_64)
--
-- Host: localhost Database: cyril_p_wcs_bruxelles
-- ------------------------------------------------------
-- Server version 8.0.13
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
SET NAMES utf8mb4 ;
-- MySQL dump 10.13 Distrib 8.0.13, for osx10.14 (x86_64)
--
-- Host: localhost Database: cyril_p_wcs_bruxelles
-- ------------------------------------------------------
-- Server version 8.0.13
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
SET NAMES utf8mb4 ;
var express = require('express');
var router = express.Router();
/* GET users listing. */
router.get('/', function(req, res, next) {
res.send('Hey ! It\'s a GET');
});
/* GET user with ID. */
router.get('/:id(\\d+)', function(req, res, next) {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Counter Redux</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Redux CDN -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/4.0.1/redux.min.js"></script>
const express = require('express');
const app = express();
const port = 3000;
var cors = require('cors')
const connexion = require('./conf');
const bodyParser = require('body-parser');
// Support JSON-encoded bodies
app.use(bodyParser.json());
// Support URL-encoded bodies
app.use(bodyParser.urlencoded({
const http = require('http');
const port = 3000;
const requestHandler = (request, response) => {
console.log(request.url);
server
if (request.url == '/') {
response.writeHead(200, { 'Content-type': 'text/htlm' });
response.write('Bienvenue sur votre server!')
response.end();
DELETE FROM movie
Where id='5'
DELETE FROM movie
Where id>='10'