Skip to content

Instantly share code, notes, and snippets.

View guillaumebdx's full-sized avatar

Guillaume HARARI guillaumebdx

View GitHub Profile
//...
public function forward()
{
$this->currentSpeed = 15;
$this->echoStatus("Go !");
}
public function brake()
{
while ($this->currentSpeed > 0) {
$this->currentSpeed--;
import React, {Component} from 'react';
import axios from "axios";
class Table extends Component
{
constructor()
{
super()
this.state = {
titles: [],
// connect motor controller pins to Arduino digital pins
// motor left
int enA = 10;
int in1 = 9;
int in2 = 8;
// motor right
int enB = 5;
int in3 = 7;
int in4 = 6;
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
<?php
namespace App\Controller;
class WindyController extends AbstractController
{
public function cam()
{

# Énoncé du Dojo Calculer les points au mölkky

Règles du jeu: (voir https://fr.wikipedia.org/wiki/M%C3%B6lkky)

On ne gère le score que d’un seul joueur.

  • si une seule quille tombe, on ajoute au score les points de la quille
  • si plus d’une quille est renversée, on ajoute au score le nombre de quille renversées
  • si le joueur dépasse les 50 points, il retombe à 25
<?php
namespace Molkky;
use PHPUnit\Framework\TestCase;
class MolkkyTest extends TestCase
{
public function testMolkky()
{
$molkky = new Molkky();
<?php
namespace Molkky;
class Molkky
{
const MAX_RESULT = 50;
CONST MIDDLE_RESULT = 25;
public function getScore(array $seriesDeQuilles)
{% 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 %}
<!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;