Search By Label
Ctrl/Cmd + Shift + P
Ctrl/Cmd+j
--force
to skip prompts.rails db:system:change --to=postgresql
const myMap = new Map();myMap.set('name', 'John');
myMap.set('age', 30);console.log(myMap.get('name')); // Output: 'John'
console.log(myMap.get('age')); // Output: 30
This command is useful for ensuring that your local npm cache is in a healthy state, which can help prevent issues when installing or updating packages. If any issues or corruption are detected, npm cache verify will attempt to fix them. It's a maintenance command to help maintain the reliability of your local npm package cache.
# Define a class
class Animal
end# Create an object
dog = Animal.new# Check if the object is an instance of a class
puts dog.is_a?(Animal) # true
puts dog.is_a?(Object) # true, since all objects are instances of Object
puts dog.is_a?(String) # false, since a dog is not a String
text = "Hello, World! This is a test. Hello, Universe!" new_text =text.sub("Hello", "Hi") puts new_text # => "Hi, World! This is a test. Hello, Universe!"
const numbers: readonly number[] = [1, 2, 3]; numbers[0] = 4; // Error! Cannot assign to an element of a readonly array numbers.push(4); // Error! Cannot push to a readonly array
"".present? # false (empty string) " ".present? # false (whitespace characters only) nil.present? # false (nil) "hello".present? # true (contains non-whitespace characters) [1, 2, 3].present? # true (array with elements)
"".blank? # true (empty string) " ".blank? # true (whitespace characters only) nil.blank? # true (nil) "hello".blank? # false (contains non-whitespace characters) [1, 2, 3].blank? # false (array with elements)
-- Assigning Values to Variables DECLARE @variable_name data_type; SELECT column_name INTO @variable_name FROM table_name WHERE condition;-- Creating a New Table
SELECT column1, column2 INTO new_table FROM old_table WHERE condition;-- Inserting Data into an Existing Table
INSERT INTO existing_table (column1, column2)
SELECT column1, column2 FROM source_table WHERE condition;