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 | |
// For demonstration purpose only | |
// Arrays | |
$names = ['clement', 'tomy', 'jacques']; | |
print_r($names); | |
echo $names[0]; | |
$people = [ |
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 | |
// For demonstration purpose only | |
// Tester de trouver les mots de passe sur https://crackstation.net | |
$password = 'webstart'; | |
// MD5 | |
echo md5($password); |
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 | |
// For demonstration purpose only | |
// Datetime | |
// http://php.net/manual/en/class.datetime.php | |
$date = new Datetime; | |
// 1. Date object |
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 | |
// For demonstration purpose only | |
// API using CURL | |
// Get | |
$ch = curl_init(); |
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
// https://github.com/mariadb-corporation/mariadb-connector-nodejs/blob/master/documentation/connection-options.md | |
require("dotenv").config(); | |
const mariadb = require("mariadb"); | |
(async () => { | |
let conn; | |
if (process.env.APP_ENV == "heroku") { | |
conn = await mariadb.createConnection( |
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
function load() { | |
document.querySelector(".message").textContent = | |
"Le texte est chargΓ© c'est bon"; | |
//document.querySelector(".loading").style.display = "none"; | |
document.querySelector(".loading").remove(); | |
document.querySelector("h1").style.backgroundColor = "yellow"; | |
const text = document.querySelector("h1").textContent; | |
console.log(text); | |
/* |
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
function addTaskInDom(task) { | |
const taskElement = document.createElement("div"); | |
const taskCheckbox = document.createElement("input"); | |
taskCheckbox.type = "checkbox"; | |
const id = `checkbox-${task.id}`; // const id = "checkbox-" + task.id; | |
taskCheckbox.id = id; | |
const taskLabelElement = document.createElement("label"); | |
taskLabelElement.textContent = task.text; |
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
let recipes = []; | |
const form = document.querySelector("form"); | |
form.addEventListener("submit", function (e) { | |
e.preventDefault(); | |
if ( | |
!form.name.value || | |
form.time.value < 1 || |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Document</title> | |
<link rel="stylesheet" href="style.css" /> | |
<script src="scripts.js" defer></script> | |
</head> | |
<body> |
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
document.querySelector("form").addEventListener("submit", async (e) => { | |
e.preventDefault(); | |
document.querySelector(".loading").style.display = "block"; | |
const results = document.querySelector("#results"); | |
results.innerHTML = ""; | |
let response; |
OlderNewer