Skip to content

Instantly share code, notes, and snippets.

View NancyBolstad's full-sized avatar

Nancy Bolstad NancyBolstad

View GitHub Profile
@NancyBolstad
NancyBolstad / multiFilter.js
Created February 27, 2019 13:20 — forked from jherax/arrayFilterFactory.1.ts
Filters an array of objects with multiple criteria.
/**
* Filters an array of objects with multiple criteria.
*
* @param {Array} array: the array to filter
* @param {Object} filters: an object with the filter criteria as the property names
* @return {Array}
*/
function multiFilter(array, filters) {
const filterKeys = Object.keys(filters);
// filters all elements passing the criteria
@NancyBolstad
NancyBolstad / README.md
Created September 5, 2018 10:17 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@NancyBolstad
NancyBolstad / SQL-Movie-Rating-View-Modification.sql
Created July 1, 2018 10:04
My answers to SQL exercises for db-class.org /Part 3/
-- SQL Movie-Rating View Modification Exercises[
-- Question 1
-- Write an instead-of trigger that enables updates to the title attribute of view LateRating.
-- Policy: Updates to attribute title in LateRating should update Movie.title for the corresponding movie. (You may assume attribute mID is a key for table Movie.) Make sure the mID attribute of view LateRating has not also been updated -- if it has been updated, don't make any changes. Don't worry about updates to stars or ratingDate.
--
-- Question 2
-- Write an instead-of trigger that enables updates to the stars attribute of view LateRating.
-- Policy: Updates to attribute stars in LateRating should update Rating.stars for the corresponding movie rating. (You may assume attributes [mID,ratingDate] together are a key for table Rating.) Make sure the mID and ratingDate attributes of view LateRating have not also been updated -- if either one has been updated, don't make any changes. Don't worry about updates to title.
--
-- Question 3

SHORTCUTS

Key/Command Description
Tab Auto-complete files and folder names
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + U Clear the line before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + W Delete the word before the cursor
Ctrl + T Swap the last two characters before the cursor