Skip to content

Instantly share code, notes, and snippets.

View guillaumebdx's full-sized avatar

Guillaume HARARI guillaumebdx

View GitHub Profile
<!doctype html>
<html lang="en">
<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">
<title>Document</title>
</head>
<body>
const myButton = document.getElementById('my_button');
myButton.addEventListener('click', () => {
let firstValue = document.getElementById('number1').value;
let operator = document.getElementById('operand').value;
let secondValue = document.getElementById('number2').value;
firstValue = parseInt(firstValue);
secondValue = parseInt(secondValue);
let firstValue = document.getElementById('number1').value;
let operator = document.getElementById('operand').value;
let secondValue = document.getElementById('number2').value;
firstValue = parseInt(firstValue);
secondValue = parseInt(secondValue);
switch (operator) {
case '+':
console.log(firstValue + secondValue);
<!doctype html>
<html lang="en">
<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">
<title>Document</title>
</head>
<body>
<!doctype html>
<html lang="en">
<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">
<title>Document</title>
</head>
<body>
<!doctype html>
<html lang="en">
<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">
<title>Document</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<style type="text/css">
<!DOCTYPE html>
<html>
<head>
<title>Exemple d'utilisation de Leaflet et d'OpenStreetMap</title>
<style>
html, body, #map {
width: 100%; height: 100%;
margin: 0px; padding: 0px;
overflow: hidden;
{% extends 'layout.html.twig' %}
{% block content %}
<form action="" method="post">
<input type="text" name="name" placeholder="Entrez le nom du produit">
<select name="category" id="">
{# TODO: Add categories here #}
</select>
</form>
{% endblock %}
<?php
namespace Molkky;
class Molkky
{
const MAX_RESULT = 50;
CONST MIDDLE_RESULT = 25;
public function getScore(array $seriesDeQuilles)
<?php
namespace Molkky;
use PHPUnit\Framework\TestCase;
class MolkkyTest extends TestCase
{
public function testMolkky()
{
$molkky = new Molkky();