- We've got some components
A,BandCwhich provide different slots.const A = { template: `<div><slot name="a">Default A Content</slot></div>` }
const B = {
| -- This function is based on this description: | |
| -- https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html | |
| CREATE OR REPLACE FUNCTION | |
| sign_s3_url( | |
| m_host text, | |
| m_verb text, | |
| m_resource text, | |
| m_region text, | |
| m_key text, |
| import EXIF from 'exif-js'; | |
| const hasBlobConstructor = typeof (Blob) !== 'undefined' && (function checkBlobConstructor() { | |
| try { | |
| return Boolean(new Blob()); | |
| } catch (error) { | |
| return false; | |
| } | |
| }()); |
| DROP TABLE IF EXISTS survey_sessions; | |
| -- Imagine a table with survey sessions | |
| -- token: some id or token to access a survey | |
| -- answers: a key value store for answers | |
| CREATE TABLE survey_sessions ( | |
| token text, | |
| answers hstore); | |
| -- We need some data to play with | |
| INSERT INTO survey_sessions (token, answers) VALUES ('9IaxxP', 'a=>1, b=>2'); |
| """ | |
| SMTP->SES Relay Server | |
| Author: Brian Humphrey, Loku.com | |
| E-mail: bhump@loku.com | |
| Date: August 17, 2011 | |
| A Lightweight SMTP server that accepts all messages and relays them to SES | |
| Credit to http://www.doughellmann.com/PyMOTW/smtpd/ for a tutorial on smtpd with asyncore |
| WITH | |
| -- write the new values | |
| n(ip,visits,clicks) AS ( | |
| VALUES ('192.168.1.1',2,12), | |
| ('192.168.1.2',6,18), | |
| ('192.168.1.3',3,4) | |
| ), | |
| -- update existing rows | |
| upsert AS ( | |
| UPDATE page_views o |
| UPDATE election_results o | |
| SET votes=n.votes, pro=n.pro | |
| FROM ( VALUES (1,11,9), | |
| (2,44,28), | |
| (3,25,4) | |
| ) n(county_id,votes,pro) | |
| WHERE o.county_id = n.county_id; |