Deriving a new Array from an existing Array:
['■','●','▲'].slice(1, 3) ⟼ ['●','▲']
['■','●','■'].filter(x => x==='■') ⟼ ['■','■']
['▲','●'].map(x => x+x) ⟼ ['▲▲','●●']
['▲','●'].flatMap(x => [x,x]) ⟼ ['▲','▲','●','●']
A collection of links to the "Master the JavaScript Interview" series of medium stories by Eric Elliott.
with | |
dau as ( | |
-- This part of the query can be pretty much anything. | |
-- The only requirement is that it have three columns: | |
-- dt, user_id, inc_amt | |
-- Where dt is a date and user_id is some unique identifier for a user. | |
-- Each dt-user_id pair should be unique in this table. | |
-- inc_amt represents the amount of value that this user created on dt. | |
-- The most common case is | |
-- inc_amt = incremental revenue from the user on dt |
#!/bin/bash | |
# node-reinstall | |
# credit: http://stackoverflow.com/a/11178106/2083544 | |
## program version | |
VERSION="0.0.13" | |
## path prefix | |
PREFIX="${PREFIX:-/usr/local}" |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Find the best resources for learning Google Apps Script, the glue that connects all Google Workspace services including Gmail, Google Drive, Calendar, Google Sheets, Forms, Maps, and more.
A good place to learn more about Google Apps Script is the official documentation available at developers.google.com. Here are other Apps Script resources that will help you get up to speed.
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
# ref: http://37signals.com/svn/posts/3004-ab-testing-tech-note-determining-sample-size | |
# | |
# p1 = Variable A results. e.g. conversion rate from test A | |
# p2 = Variable B results | |
# power = chance of false negative (A power of 0.80 means that there is an 80% chance that if there was an effect, we would detect it ) | |
# sig.level = chance of false positive (0.05 = 5%) | |
power.prop.test(p1=0.1, p2=0.11, power=0.8, alternative='two.sided', sig.level=0.05) | |
# Output will be a number signifying minimal sample size that meets the above criteria |