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
/* | |
Créé un algorithme en pseudo-code | |
Créé l'algorithme suivant : compte le nombre maximum de bonbon que tu peux acheter, en fonction de l'argent que tu possèdes et du prix du bonbon. | |
En entrée tu as le réel argent qui contient le montant disponible, et le réel prix qui contient le prix unitaire du bonbon. | |
Le retour attendu est l'entier représentant nombre maximum de bonbon, de montant prix, que argent permet d'acheter ! | |
Par exemple, si argent est égal à 12,47 et prix est égal à 1,14, le résultat attendu sera 10 (car tu ne peux pas acheter 10,938596491 bonbons !). | |
Utilise une boucle pour calculer ce résultat, tu n'as pas le droit d'utiliser une méthode pour arrondir. | |
Si l'argent ou le prix sont inférieurs ou égaux à zéro, retourne 0. | |
Dépose le pseudo-code sur un Gist et partage le lien. |
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 | |
$movies = [ | |
['title'=>'Indiana Jones et le Royaume du Crâne de Cristal', 'actors' => ['Harrison Ford', 'Cate Blanchett', 'Karen Allen']], | |
['title'=>'Indiana Jones et la Dernière Croisade', 'actors' => ['Harrison Ford', 'Sean Connery', 'Denholm Elliott']], | |
['title'=>'Indiana Jones et le Temple maudit', 'actors' => ['Harrison Ford', 'Kate Capshaw', 'Jonathan Ke Quan']] | |
]; | |
$result=""; | |
foreach ($movies as $movieKey => $movie) { | |
$result .= "Dans le film " . $movie['title'] . ", les principaux acteurs sont : " ; | |
foreach ($movie['actors'] as $actorKey => $actor) { |
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 | |
$messages = ["0@sn9sirppa@#?ia'jgtvryko1", "q8e?wsellecif@#?sel@#?setuotpazdsy0*b9+mw@x1vj", "aopi?sgnirts@#?sedhtg+p9l!"]; | |
$results = []; | |
foreach ($messages as $key => $message) { | |
$results[$message]['keyNumber'] = strlen($message) / 2; | |
$results[$message]['subString'] = substr($message, 5, $results[$message]['keyNumber']); | |
$results[$message]['replacedString'] = str_replace('@#?', ' ', $results[$message]['subString']); | |
$results[$message]['decodedMessage'] = strrev($results[$message]['replacedString']); |
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> | |
<head> | |
<meta charset="utf-8"/> | |
<title>findThePrecious.com - the mordor army</title> | |
</head> | |
<body> | |
<header> | |
<nav> | |
<a href="/home">findThePrecious.com</a> |
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
####~~~!!!! ici le lien vers le schéma de la résolution DNS !!!!~~~#### | |
https://drive.google.com/file/d/1_DnnP6BFMai1jIp_BmI79amc1aIRUKEL | |
####~~~!!!! ici le lien vers le schéma de la résolution DNS !!!!~~~#### | |
Tracing DNS delegation for "jeep.com": | |
Loading root server list (static data): | |
-> a.root-servers.net (198.41.0.4) | |
-> b.root-servers.net (192.228.79.201) |
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
1 echo leNomDuCoupable | |
2 echo "trop long à gérer cette quete" | |
3 history > mon_historique.log |
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 | |
$title = "Indiana Jones and the Last Crusade"; | |
$date = new \DateTime('1989-05-24'); | |
$rank = 8.3; | |
$baseRank = 10; | |
$styles=['Action','Adventure','Fantasy']; | |
$rated = true, | |
echo $title; | |
echo $date->format('d-F-Y'); | |
echo $rank."/".$baseRank; |
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
#1 Sensiolabs | |
#2 Blackfire.IO / Twig | |
#3 Symfony / Laravel | |
#4 ~~Faux~~ -> Vrai | |
#5 Faux | |
#6 composer create-project <skeleton-de-ton-choix> <project-name> | |
#7 Faux | |
#8 Parce que c'est la partie visible de l'application | |
#9 Faux (ce n'est plus le cas sous SF4) | |
#10 7.1 |
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('How old are you? ') | |
var age = 0; | |
process.stdin.on('data', (age) => { | |
if(!isNaN(age) && age < 99 && age > 0){ | |
bothYear = 2017-age | |
console.log('You\'re both in ' + bothYear) | |
}else { | |
console.log('Please enter number when give you\'re age or check you entered a correct 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="fr"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" | |
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | |
<title>Document</title> |