Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
/** | |
* Welcome to Cloudflare Workers! This is your first worker. | |
* | |
* - Run "npm run dev" in your terminal to start a development server | |
* - Open a browser tab at http://localhost:8787/ to see your worker in action | |
* - Run "npm run deploy" to publish your worker | |
* | |
* Learn more at https://developers.cloudflare.com/workers/ | |
*/ |
select json_build_object('__table', 'user', 'firstName', e."first_name", 'lastName', e."last_name", 'managedResources', coalesce("t_managedResources"."data", '[]'), 'ratings', coalesce("t_ratings"."data", '[]')) as "data" | |
from "user" as "e" | |
left join ( | |
select "manager_id" as "fkey", json_agg(json_build_object('__table', 'resource', 'ratingTotals', "t_ratingTotals"."data")) as "data" | |
from "resource" as "e" | |
left join ( | |
select "resource_id" as "fkey", json_build_object('__table', 'rating_totals', 'avgSatisfaction', e."avg_satisfaction") as "data" | |
from "rating_totals" as "e" | |
) as "t_ratingTotals" on "t_ratingTotals"."fkey" = "e"."id" | |
group by "manager_id" |
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<title>d3 depth chart</title> | |
<script type="text/javascript" src="https://d3js.org/d3.v4.min.js"></script> | |
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js"></script> | |
<style> |
CREATE TABLE accounts( | |
id serial PRIMARY KEY, | |
name VARCHAR(256) NOT NULL | |
); | |
CREATE TABLE entries( | |
id serial PRIMARY KEY, | |
description VARCHAR(1024) NOT NULL, | |
amount NUMERIC(20, 2) NOT NULL CHECK (amount > 0.0), | |
-- Every entry is a credit to one account... |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
library(quantreg) | |
library(dplyr) | |
library(lubridate) | |
library(stringr) | |
library(readr) | |
library(ggplot2) | |
library(devtools) | |
library(splines) | |
/** | |
* = Recursive descent parser = | |
* | |
* MIT Style License | |
* By Dmitry Soshnikov <[email protected]> | |
* | |
* In this short lecture we'll cover the basic (non-predictive, backtracking) | |
* recursive descent parsing algorithm. | |
* | |
* Recursive descent is an LL parser: scan from left to right, doing |
Things that a test can be annotated with:
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>gd.wa</groupId> | |
<artifactId>minimal-pom</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>jar</packaging> |