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
class CandyCount { | |
public static void main(String[] args) { | |
double money = 12.4; | |
double price = 1.2; | |
int candies = 0; | |
if(money > 0 && price > 0) { | |
while ((money - price) >= 0) { | |
candies = candies + 1; | |
money = money - price; |
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
class Senpai { | |
public static void main(String[] args) { | |
// display Notice me Senpai in the terminal | |
System.out.println("Notice me Senpai"); | |
} | |
} |
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
1111 0000 1111 0000 = F0F0; | |
1F0 = 0001 0000 1111; | |
010 = 0000 0001 0000; | |
Languages interprétés: | |
PHP, | |
Perl, | |
Javascript | |
Languages compilés: |
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
<?php | |
$characters = [ | |
"Negan" => [ | |
"city" => "The Sanctuary", | |
"weapon" => "Lucille" | |
], | |
"Daryl" => [ | |
"city" => "Alexandria", | |
"weapon" => "crossbow" |
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
<?php | |
function writeSecretSentence(string $param1, string $param2):string | |
{ | |
return $param1 ." s'incline face à ". $param2; | |
} | |
echo writeSecretSentence("le serpent", "l'elephant"); | |
?> |
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
<?php | |
$weapons = ['fists', 'whip', 'gun']; | |
$indyWeapon = ""; | |
$opponentWeapon = $weapons[rand(0,2)]; | |
switch ($opponentWeapon) { | |
case 'fists'; |
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
<?php | |
$listOfMovies = [ | |
"Indiana Jones et la Dernière Croisade" => ["Harrison Ford","Sean Connery","Denholm Elliott"], | |
"Indiana Jones et le Temple maudit" => ["Harrison Ford","Kate Capshaw","Jonathan Ke Quan"], | |
"Les Aventuriers de l'Arche perdue" => ["Harrison Ford","Cate Blanchett","Paul Freeman"] | |
]; | |
foreach ($listOfMovies as $movie => $actor) { | |
echo "Dans le film " . $movie . ", les principaux acteurs sont : " . $actor[0] . ", " . $actor[1] . ", " . $actor[2] . "\n"; |
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
<?php | |
// --- Premiere Phrase --- | |
$stringOne = "0@sn9sirppa@#?ia'jgtvryko1"; /* mettre ici la phrase codée*/ | |
$stringOneLengt = strlen($stringOne); | |
$stringOneLengt = $stringOneLengt / 2; | |
$underString = substr($stringOne, 5, $stringOneLengt); |
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
<?php | |
$filmTitle = "Indiana Jones and the Last Crusade"; | |
$haveYouSeen = true; | |
$filmPublication = 1989; | |
$note = 8.2; | |
echo $filmTitle; | |
echo $haveYouSeen; | |
echo $filmPublication; |
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
import React from 'react' | |
const Film = (props) => { | |
return ( | |
<div> | |
<h3>{props.title}</h3> | |
<p>{props.opening_crawl}</p><br /> | |
<p>{props.director}</p> |
NewerOlder