sudo apt-get install python3-pip
sudo pip3 install virtualenv
<?php | |
$db=mysqli_connect('localhost', 'root', '', 'crud'); | |
function Saved(){ | |
$name=$_POST['name']; | |
$address=$_POST['address']; | |
$query="INSERT INTO info (name, address) VALUES('$name', '$address')"; | |
mysqli_query($db, $query); | |
header('location: index.php'); //redirection sur index page apres l'insertion |
In your command-line run the following commands:
brew doctor
brew update
function addDomNodes(nodeToAdd, nodeParentWhereNodeIsAdded, typeOfInsertion = "innerHtml"){ | |
return new Promise((resolve) => { | |
requestAnimationFrame(() => { | |
typeOfInsertion === "innerHtml" ? nodeParentWhereNodeIsAdded.innerHTML = nodeToAdd : nodeParentWhereNodeIsAdded.insertAdjacentHTML('beforeend', nodeToAdd); | |
resolve(nodeParentWhereNodeIsAdded); | |
}, nodeParentWhereNodeIsAdded); | |
}); | |
} | |
function removeDomNodes(domChildToRemove, domParent){ |
from django.db.models import Q | |
from django.contrib import messages | |
class SearchViewMixin: | |
""" | |
this mixins allow a class based view to handle dynamically and automatically | |
a search. It add a GET param name as 's' which hold the searched term, and use | |
lookup_fields = [] to perform search |
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
//CSS | |
function string_to_slug (str) { | |
str = str.replace(/^\s+|\s+$/g, ''); // trim | |
str = str.toLowerCase(); | |
// remove accents, swap ñ for n, etc | |
var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;"; | |
var to = "aaaaeeeeiiiioooouuuunc------"; | |
for (var i=0, l=from.length ; i<l ; i++) { | |
str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i)); | |
} |
Just migrated it from Codepen.io to markdown. Credit goes to David Conner.
Working with DOM | Working with JS | Working With Functions |
---|---|---|
Accessing Dom Elements | Add/Remove Array Item | Add Default Arguments to Function |
Grab Children/Parent Node(s) | Add/Remove Object Properties | Throttle/Debounce Functions |
Create DOM Elements | Conditionals |
Just migrated it from Codepen.io to markdown. Credit goes to David Conner.
Working with DOM | Working with JS | Working With Functions |
---|---|---|
Accessing Dom Elements | Add/Remove Array Item | Add Default Arguments to Function |
Grab Children/Parent Node(s) | Add/Remove Object Properties | Throttle/Debounce Functions |
Create DOM Elements | Conditionals |