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
package main | |
import ( | |
"bytes" | |
"net/http" | |
"github.com/labstack/echo/v4" | |
"encoding/json" | |
"os" | |
) |
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 paho.mqtt.client as mqtt | |
import threading | |
import random | |
host = "192.168.99.100" | |
port = 1883 | |
# Connexion | |
client = mqtt.Client("TomFlitterman") | |
client.connect(host, port) |
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
// Closure | |
function multiplicateur(facteur) { | |
return nombre => nombre * facteur; | |
} | |
let doubler = multiplicateur(2); | |
alert(doubler(10)); | |
// Détermine une séquence d'additions de 5 et de multiplications par 3 pour obtenir un nombre n spécifié en paramètres : | |
function findSolution(target) |
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 date_translate($day, $month, $year, $text) { | |
// day | |
if ($day == '01') { | |
$day = '1'; | |
} elseif ($day == '02') { | |
$day = '2'; | |
} elseif ($day == '03') { |