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
{ | |
"require": { | |
"mfacenet/hello-world": "v1.*" | |
} | |
} |
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 | |
/** | |
* Place this code line at the top of your code | |
*/ | |
define('DEBUG_TIME', microtime( true )); | |
ini_set('xdebug.var_display_max_depth', '10'); | |
ini_set('xdebug.var_display_max_children', '256'); | |
ini_set('xdebug.var_display_max_data', '1024'); |
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://getbootstrap.com/docs/4.3/components/collapse/ --> | |
<!-- Use Collapse Bootstrap to hide/show rows --> | |
<!-- Available on Tables --> | |
<p> | |
<a class="btn btn-primary" data-toggle="collapse" href="#multiCollapseExample1" role="button" aria-expanded="false" aria-controls="multiCollapseExample1">Toggle first element</a> | |
<button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#multiCollapseExample2" aria-expanded="false" aria-controls="multiCollapseExample2">Toggle second element</button> | |
<button class="btn btn-primary" type="button" data-toggle="collapse" data-target=".multi-collapse" aria-expanded="false" aria-controls="multiCollapseExample1 multiCollapseExample2">Toggle both elements</button> | |
</p> | |
<div class="row"> |
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 var_dump($_POST); ?> | |
<form action="" method="post"> | |
First name: <input type="text" name="user[fname]" value="Yolo"><br> | |
Last name: <input type="text" name="user[lname]" value="Oloy"><br> | |
<input type="submit" value="Submit"> | |
</form> |
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 | |
$sql = "SELECT DISTINCT a.* | |
FROM provider a | |
INNER JOIN provider b ON a.id_cgpo = b.id_cgpo | |
WHERE a.id <> b.id | |
ORDER BY a.id_cgpo, a.id; | |
"; |
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 | |
// Base on the answer of : | |
// https://stackoverflow.com/a/24527099/7998119 | |
$list = [ | |
0 => [ | |
'id' => '1', | |
'parent' => '4', | |
], | |
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
<?php | |
$json = '[{"autres":1000000,"numeroBien":1},{"nature":"Résidence Principale","libelle":"Ma kaz","numeroBien":1},{"nature":"Résidence secondaire","libelle":"Ma kaz 2","numeroBien":4}]'; | |
// Cherche la clé 'nature' dans l'array et retourne toutes les valeurs associées sous forme d'arrayList | |
$column = array_column($json, 'nature'); | |
// Retourne la position (clé/key) du mot recherché | |
$keyArray = array_search('Résidence Principale', $column); // Retourne 0 | |
$keyArray = array_search('Résidence secondaire', $column); // Retourne 2 |
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.querySelectorAll("item") > pour prendre tous les items | |
// document.querySelector("item") > pour prendre un seul item s'il est bien définit. Renvoi le premier si plusieurs | |
// Les items peuvent prendre différentes formes : | |
// balise > item | id > #item | class > .item | |
// [id=monId] | [class=monId] | [name=monId] | ^ le chapeau permet de dire "Tout ce qui commence par..." | |
// "input[name^='myName']:checked" > Pour prendre l'item input qui a un name qui commence par myName ET qui est checked | |
// exemple: let varr = "input[name^='myName']:checked" | |
// Les champs seront formattés en milliers séparés | |
// Reformatter la valeur pour retirer les espaces avec un .replace(/ /g,"") |
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
{"version":1,"resource":"file://wsl%24/ubuntu/home/mushuledragon/development/en-janvier/opadd-docker/source/config/sync/field.field.node.producteur.field_producer_email.yml","entries":[{"id":"pv2m.yml","source":"searchReplace.source","timestamp":1651153137112}]} |
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
# remove specific file from git cache | |
git rm --cached filename | |
# remove all files from git cache | |
git rm -r --cached . | |
git add . | |
git commit -m ".gitignore is now working" |