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>
<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 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>
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);
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);
<!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>
const myButton = document.getElementById('my_button');
const result = document.getElementById('result');
myButton.addEventListener('click', () => {
let firstValue = document.getElementById('number1').value;
let operator = document.getElementById('operand').value;
let secondValue = document.getElementById('number2').value;
firstValue = parseInt(firstValue);
<?php
namespace App\Entity;
use App\Repository\UserRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\User\UserInterface;
/**
<?php
namespace Roman;
class Roman
{
public const ROMANS = [
'M'=>1000,
'CM'=>900,
'D'=>500,