React

1 : la cycle de vie :

https://blog.hhking.cn/2018/09/18/react-lifecycle-change/

note sur mongo DB

Installation dans ubuntu :

https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

installer studio 3T:

https://studio3t.com/knowledge-base/articles/installation/#install-studio-3t

d’autres outils:

https://www.guru99.com/top-20-mongodb-tools.html

*********************************************************************************

les commands utils

show dbs, show databases

use db-lyu

db : afficher la base actuelle

show collections

mongoose :

connection :fsdfs

mongoose.connect('mongodb://localhost/test', {useNewUrlParser: true});
const db = mongoose.connection;
db.once('open', function() {
  // we're connected!
});

note sur git

git init

git add

git commit -m “xxxx”

git log –oneline

git reflog

git reset –head xxxxxx

git reset –head HEAD^^^ (reculer 3 étapes)

git reset –head HEAD~3 (reculer 3 étapes)

git reset –soft xxxxx (seulement changer index de repose)

git reset –mix xxxxx (change index de repos et la cache)

git diff

git remote add xxxx https://github.com/yujunjie0603/vue3-game-plan.git

git clone

git fetch

git pull

pull = fetch + merge

git merge 

 

use expression at the selector javascript

If you’re finding by Contains then it’ll be like this

    $("input[id*='DiscountType']").each(function (i, el) {
         //It'll be an array of elements
     });

If you’re finding by Starts With then it’ll be like this

    $("input[id^='DiscountType']").each(function (i, el) {
         //It'll be an array of elements
     });

If you’re finding by Ends With then it’ll be like this

     $("input[id$='DiscountType']").each(function (i, el) {
         //It'll be an array of elements
     });

If you want to select elements which id is not a given string

    $("input[id!='DiscountType']").each(function (i, el) {
         //It'll be an array of elements
     });

If you want to select elements which id contains a given word, delimited by spaces

     $("input[id~='DiscountType']").each(function (i, el) {
         //It'll be an array of elements
     });

If you want to select elements which id is equal to a given string or starting with that string followed by a hyphen

     $("input[id|='DiscountType']").each(function (i, el) {
         //It'll be an array of elements
     });

tableau en javascripte

la clé de tableau doit être en type interger, sinon, le longueur de tableau ne va pas être renseigné .

var person = [];
person[“firstName”] = “John”;
person[“lastName”] = “Doe”;
person[“age”] = 46;
var x = person.length;         // person.length will return 0
var y = person[0];             // person[0] will return undefined