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 http = require('http'); | |
const url = require('url'); | |
const port = 8000; | |
const requestHandler = (request, response) => { | |
const urlObj = url.parse(request.url, true).query | |
if(urlObj.name && urlObj.city){ | |
response.end(`Hello ${urlObj.name} How are you in your beautiful city of ${urlObj.city}!!!!`); | |
} else { |
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="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/4.0.1/redux.min.js"></script> | |
<title>Document</title> | |
</head> | |
<body> | |
<h1>Redux counter</h1> |
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 cowsay = require('cowsay'); | |
console.log(cowsay.say({ | |
text : "hello boy", | |
})); |
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
process.stdin.resume() | |
process.stdin.setEncoding('utf8') | |
console.log('What\'s your age ? ') | |
process.stdin.on('data', (age) => { | |
const year = new Date().getFullYear(); | |
const birthYear = year - age; | |
if(age <= 99 && isNaN(age)==false && birthYear<year){ | |
console.log("Vous êtes né en : " + (year - age)); |
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="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body> | |
<script src="person.js"></script> | |
</body> |
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 filmTitle = 'C\'est arrivé près de chez vous '; | |
const year= 1992; | |
const movieDirector = ' Remy Belvaux'; | |
alert(filmTitle + year + movieDirector); |
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
function fuelPrice(litres, pricePerLiter) { | |
switch(litres){ | |
case litres >= 10: | |
pricePerLiter = pricePerLiter - 25; | |
break; | |
case litres >= 8: | |
pricePerLiter = pricePerLiter - 20; | |
break; | |
case litres >= 6: | |
pricePerLiter = pricePerLiter -15; |
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
- seule occurrence du deuxième prénom de Néo (soit le A. de "Thomas A. Anderson): /A\./ | |
- expression régulière qui cherche la date contenue dans le document : /[0-9]{2}\/[0-9]{2}\/[0-9]{4}/g | |
- note contenue dans le texte, sans pour autant sélectionner une partie de la date: / +[0-9]{1}\/[0-9]{2}/g | |
- expression régulière qui renvoie les mots ayant au moins 14 caractères: /[a-z]{14,}/gi | |
- expression régulière qui correspond à l'url de la fiche du film sur IMDB: |
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
https://blog.logrocket.com/new-media-queries-you-need-to-know/?utm_source=CSS-Weekly&utm_campaign=Issue-400&utm_medium=web#utm_source=CSS-Weekly&utm_campaign=Issue-400&utm_medium=web | |
Cet article sur le CSS nous parle des nouveaux media queries qu'il est important de connaitre comme "light-level", "inverted-color", etc... Ces nouveaux media-queries adaptent, par exemple, votre site à la lumiere du jour, au dark mode s'il est activé, etc... |
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
675 grep "France,2019,PHP" wilders.csv | wc -l > php_france_2019.csv | |
676 cat php_france_2019.csv | |
677 grep "Biarritz" wilders.csv | grep "JavaScript" > biarritz.csv | |
678 ls | |
679 cat biarritz.csv | |
680 grep "Toulouse" wilders.csv | grep "JavaScript" > toulouse.csv | |
681 cat toulouse.csv | |
682 cat biarritz.csv toulouse.csv > javascript_biarritz_toulouse.csv | |
683 ls |