(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| const { rxObserver } = require('api/v0.3'); | |
| const { timer, combineLatest } = require('rxjs'); | |
| const { take, filter } = require('rxjs/operators'); | |
| const a$ = timer(0, 10).pipe( | |
| take(5) | |
| ); | |
| const b$ = timer(0, 4).pipe( |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| var response={ | |
| authors:[ | |
| { | |
| id: 1, | |
| name: "Monica", | |
| posts: [ | |
| { | |
| id: 1, | |
| title: "how to write fast js", |
Q: Why don't have to write conditional statement to determine whether input is object or array? A: because Object.keys behave similarly when input is input or object, It returns an array of index when input is an array. See below example from MDN doc.
var arr = ['a', 'b', 'c']; console.log(Object.keys(arr)); // console: ['0', '1', '2']
| 1. | |
| Q: A function doesn't have to return in order to be called a closure. Simply accessing variables outside of the immediate lexical scope creates a closure. | |
| A: Nested functions, inner function access the outer function's variable. Then it's a closure, whether or not it return the variable to make it accessible outside. | |
| 2. | |
| Q:function getMaxOfArray(numArray) { | |
| return Math.max.apply(null, numArray); | |
| } | |
| A: This apply method takes an array as argument instead of argument list, so that we can use an array like object as argument. | |
| getMaxOfArray([1,2,3]) instead of Math.max(1,2,3) | |
| 3. |
Q: How do you think the word "cascading" in "Cascading Style Sheets" relates to specificity?
A: Cascading means while multiple rules applies to one element, the more specific rule override general rule. The latest applied rule override rules applied earlier.
Q: text in h1 is blank A:
| function arrayOfLight(number){ | |
| var a = []; | |
| for(i=0; i<=number; i++){ | |
| a.push(i); | |
| } | |
| return a; | |
| } |
| --Exercise 1 | |
| --Fetch ISBN of all book editions published by the publisher "Random House". You should have 3 results. | |
| SELECT e.isbn | |
| FROM editions AS e | |
| JOIN publishers AS p ON (e.publisher_id = p.id) | |
| WHERE p.name = 'Random House'; | |
| --Exercise 2 | |
| --Instead of just their ISBN number, fetch their Book Title as well. You should still have the same 3 results but with more information. But instead of just one column, we should have 2 columns in the result set. | |
| SELECT e.isbn, b.title |
| # |