rbenv: version `ruby-2.7.3′ is not installed
rbenv install 2.0.0-p643
Here is what the above code is Doing:
1. Installing rbenv
2. Installing ruby-build
3. Installing Ruby 2.0.0-p643
rbenv install 2.0.0-p643
Here is what the above code is Doing:
1. Installing rbenv
2. Installing ruby-build
3. Installing Ruby 2.0.0-p643
struct Account { uint balance; uint dailylimit; } // Option 1: Assign to an initialised struct Account my_account = Account(0, 10); // Option 2: Assign to individual fields as required my_account.balance = 0; my_account.dailylimit = 10; Here is what the above code is Doing: 1. We create a struct called Account. 2. We create a…
message.guild.channels.cache.get(/* channel ID */).send(“welcome in this channel!”) Here is what the above code is Doing: 1. We’re using the on_message event to detect when a message is sent. 2. We’re using the message.author.bot check to make sure the bot doesn’t reply to itself. 3. We’re using the message.content check to see if the message content…
var a = new Set([1,2,3]); var b = new Set([1,3,2]); alert(eqSet(a, b)); // true function eqSet(as, bs) { if (as.size !== bs.size) return false; for (var a of as) if (!bs.has(a)) return false; return true; } Here is what the above code is Doing: 1. It creates two sets: a and b. 2. It calls…
arr.sort((x, y) => x.distance – y.distance); Here is what the above code is Doing: 1. We’re creating a new array called sortedArr. 2. We’re using the sort() method to sort the array. 3. We’re using the arrow function to compare the distance of each object. 4. We’re returning the sorted array.
Toppings {{topping}} check Here is what the above code is Doing: 1. We are creating a mat-select element with multiple selection enabled. 2. We are creating a mat-option element for each topping in the toppingList array. 3. We are binding the value of each mat-option to the topping. 4. We are binding the label of…
//when document load and complete all ajax response this event will fire only one time $(document).ajaxStop(function(){ alert(“All AJAX requests completed”); }); Here is what the above code is Doing: 1. When the document is ready, it will fire the alert “Document is ready”. 2. When the document is loaded and all the AJAX requests are…