Posts

Showing posts from May, 2024

PHP - Beginner

< Beginner PHP >< Array >< Loop >< Function >< Pre-Def variable >< Session > < Read Write File > < CRUD > < Advanced PHP > < PHP MySQL PHP MyAdmin > < PHP MySQL Notes > Hello World  <?php echo "Hello World"; ?> Alternative in HTML <script language="php"> </script> echo "Hello World"; if supported do this <? echo "Hello World"; ?> General things  <?php echo "<strong>bold</strong>"; ?> or  <?php echo "A"; echo "B"; echo "C"; ?> Comments //single line comment /* multi line comment */ Variables $variablename=value;  must start with letter or underscore  _VarName can contain alphanumeric char A-Z, 0-9,  exemple  variable_name variable_12 variable name are case sensitive $name <>$NAME PHP auto converts variable to the correct data type <?php $name = `John`; $age =25; echo $name; ?> Variabl

ReactJS-Function

< React Course Notes >< ReactJS function >  Functions: const square = function(x) {   return x * x; }; console.log(square(3)); // → 9 Function`s Parameters A function can have multiple parameters  const roundTo = function(n, step) {   let remainder = n % step;   return n - remainder + (remainder < step / 2 ? 0 : step); }; console.log(roundTo(23, 10)); // → 20 or no parameters at all const makeNoise = function() {   console.log("Pling!"); }; makeNoise(); // → Pling! Nested functions const hummus = function(factor) {   const ingredient = function(amount, unit, name) {     let ingredientAmount = amount * factor;     if (ingredientAmount > 1) {       unit += "s";     }     console.log(`${ingredientAmount} ${unit} ${name}`);   };   ingredient(1, "can", "chickpeas");   ingredient(0.25, "cup", "tahini");   ingredient(0.25, "cup", "lemon juice");   ingredient(1, "clove", "garlic&quo

GIT

< JS C C++ Python >< coding Robotics CNC > < Robotics CNC Links > < CNC >< CNC tutorial > < 3d printing >< Azure MongoDB Spark > < AI Pytorch > < Ship building >< GIT >   source: jwiegley.github.io/git-from-the-bottom-up/  1.Definition of terms Repository it is a collection of commits it defines HEAD it contains a set of branches and tags Index changes are first registered in the index it is a way of confirming changes before doing a commit it is also called the staging area working trees it is any directory on your filesystem which has a repository associated with it typically indicated by the presence of a sub-directory within-it, named: git it includes all the files and subdirectories in that directory Commit it is a snapshot of your working tree at some point of time it is an archive of what the project`s tree looked like at a past date Whether on your machine or someone else`s  the state of HEAD at the tim your commit is