This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
===> ENV Variables ... | |
ALLOW_UNSIGNED=false | |
COMPONENT=kafka | |
CONFLUENT_DEB_VERSION=1 | |
CONFLUENT_MAJOR_VERSION=5 | |
CONFLUENT_MINOR_VERSION=1 | |
CONFLUENT_MVN_LABEL= | |
CONFLUENT_PATCH_VERSION=2 | |
CONFLUENT_PLATFORM_LABEL= | |
CONFLUENT_VERSION=5.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<meta http-equiv="Content-Type" content="application/xhtml+xml"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href='https://fonts.googleapis.com/css?family=PT+Sans|PT+Sans+Caption' rel='stylesheet' type='text/css'> | |
<style type="text/css"> | |
html, body { | |
margin: 0 auto; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SystemJS.config({ | |
baseURL: "/", | |
production: true, | |
paths: { | |
"github:*": "jspm_packages/github/*", | |
"npm:*": "jspm_packages/npm/*", | |
"vendor/": "src/vendor/", | |
"jspm_17/": "src/" | |
}, | |
bundles: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE board(id serial primary key, moves int[]); | |
INSERT INTO board(moves) values('{0,0,0}'); | |
WITH current AS (SELECT generate_series(1,3) p_no, unnest(moves) "pos" FROM board order by id desc LIMIT 3), | |
roll AS (SELECT generate_series(1,3) p_no, round(random()*2)+1 result), | |
move AS (SELECT coalesce('{"9":"2","3":"6"}'::json->>(c.pos+r.result)::text, (c.pos+r.result)::text)::int "new_pos", c.pos "old_pos" | |
FROM current c JOIN roll r ON c.p_no = r.p_no), | |
constrained_move AS (SELECT (CASE WHEN m.new_pos > 10 THEN m.old_pos | |
WHEN m.new_pos < 10 THEN m.new_pos | |
ELSE 10 END) "final_pos" FROM move m), | |
rec AS (INSERT INTO board(moves) (SELECT array_agg(cm.final_pos) FROM constrained_move cm)) |