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
import * as d3 from "d3"; | |
const MARGIN = { TOP: 10, BOTTOM: 60, LEFT: 100, RIGHT: 10 }; | |
const WIDTH = 600 - MARGIN.LEFT - MARGIN.RIGHT; | |
const HEIGHT = 400 - MARGIN.TOP - MARGIN.BOTTOM; | |
let flag = true; | |
class Coffee { | |
constructor(element, data) { |
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 | |
var_dump($_POST); | |
?> | |
<form action="thanks.php" method="post"> | |
<div> | |
<label for="nom">Nom :</label> | |
<input type="text" id="nom" name="user_name"> | |
</div> | |
<div> |
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 | |
$characters = [ | |
"Negan" => [ | |
"city" => "The Sanctuary", | |
"weapon" => "Lucille" | |
], | |
"Daryl" => [ | |
"city" => "Alexandria", | |
"weapon" => "crossbow" |
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 | |
function writeSecretSentence (string $first, string $second) { | |
if (is_string($first) && is_string($second)){ | |
$message=$first . " s'incline devant " . $second; | |
return $message; | |
}else{ | |
$message="error"; | |
return $message; | |
} |
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 | |
$weapons = ['fists', 'whip', 'gun']; | |
$opponentWeapon = $weapons[rand(0,2)]; | |
switch ($opponentWeapon) { | |
case 'fists': | |
$indyWeapon = 'gun'; | |
break; | |
case 'whip': |
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 | |
$indiMovies = [ | |
'indiana jones and the last crusade' => ['Harrisson Ford', 'Sean Connery', 'Alison Doody'], | |
'indiana jones and the temple of doom' => ['Harrisson Ford', 'Kate Capshaw', 'Jonathan ke quan' ], | |
'indiana jones and the kingdom of the crystall skull' => ['Harrisson Ford', 'Shia Leboeuf', 'Karen allen' ], | |
]; | |
foreach ($indiMovies as $key => $title) { | |
echo $key; |
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 | |
$indiMovies = [ | |
'indiana jones and the last crusade' => '1989', | |
'indiana jones and the temple of doom' => '1984', | |
'indiana jones and the kingdom of the crystall skull' => '2008', | |
]; | |
asort($indiMovies); |
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
import java.util.Arrays; | |
class Movies { | |
public static void main(String[] args) { | |
String[] movies = { "les aventuriers de l'arche perdus", "le temple maudit", "la dernière croisade" }; | |
String[][] actors = new String[][] { { "Harrison Ford", "Kareen Allen", "Paul Freeman" }, | |
{ "Harrison Ford", "Kate Capshaw", "Jonathan ke quan" }, |
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
class Indy { | |
public static void main(String[] args) { | |
String movieName = "Indiana Jones and the Last Crusade"; | |
boolean saw = true; | |
int releasedDate = 1989; | |
float rated = 8.2f; | |
System.out.println(movieName); | |
System.out.println(releasedDate); |
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
class candyCount { | |
public static void main(String args[]) { | |
double money = 12.4; | |
double price = 1.2; | |
double candies = 0; | |
if (money > 0 && price > 0) { | |
while (money - price >= 0) { | |
candies++; | |
money = money - price; |
NewerOlder