npm outdated
package.json
and see if there is a newer version in the NPM registry.jQuery
is installedimport $ from 'jQuery'
...
var content = $('#id').html();
import
statement so you have to transpile the code with Webpack commands, the bundler will check all the used dependencies and bind them in a single file without any dependency problems.git stash list
git stash show
git stash show -p
git stash show -p stash@{1}
git stash show -p 1
pg
for PostgreSQL or mysql2
for MySQL.pg
for PostgreSQL:const { Client } = require('pg'); // Bad: Concatenation (vulnerable to SQL injection) const insecureQuery = `SELECT * FROM users WHERE username = '${inputUsername}'`; // Good: Parameterized query (prevents SQL injection) const secureQuery = 'SELECT * FROM users WHERE username = $1'; const values = [inputUsername]; const client = new Client(); client.connect(); client.query(secureQuery, values, (err, result) => { // Handle the query result client.end(); });
pointer-events
CSS property is used to control under what circumstances an element can trigger user interface events like mouse clicks and hover. It allows you to control the visibility and interaction of elements on the page.pointer-events
property can take the following values:process.nextTick()
is a function in Node.js designed to schedule a callback function to be invoked in the next iteration of the event loop. Ctrl/Cmd + Shift + P
Ctrl/Cmd+j
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