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
const [Bx,Hx,Qx] = [()=>crypto.getRandomValues(new Uint8Array(1))[0],x=>[...Array(x)].map(Bx),m=>n=>x=>y=>y<=n&&y>=m?y:Qx(m)(n)(x)(x())]; | |
export const guid = ()=>[Hx(4),Hx(2),[Qx(0b01000000)(0b01001111)(Bx)(Bx()),Bx()],[Qx(0b10000000)(0b10111111)(Bx)(Bx()),Bx()],Hx(6)].map(a=>a.map(a=>a.toString(16).padStart(2,'0')).reduce((a,b)=>a.concat(b),'')).join('-'); |
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
# CODE PARSES .CSV FILES: | |
# @csvrows = (@$row1, @$row2, @$row3...) | |
# @row1 = ("field","other field","bla bla bla"...) | |
# ie. an array of references to other arrays containing the values of the fields in each row | |
# CODE NEEDS TO RETURN: | |
# @$arrayref = (%$hash_of_row1, %$hash_of_row2...) | |
# %hash_of_row1 = {FIELDS => @$row1} | |
# %hash_of_row2 = {FIELDS => @$row2}... | |
# @row1 = (%$hash_of_field1, %$hash_of_field2...) |
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
<link rel="import" href="../../bower_components/polymer/polymer.html"> | |
<link rel="import" href="../../bower_components/firebase-element/firebase-element.html"> | |
<polymer-element name="db-retrieve"> | |
<template> | |
<firebase-element id="db" | |
location="http://cth-storage.firebaseio.com/" | |
data="{{data}}" | |
keys="{{keys}}" | |
childEvents |
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
<link rel="import" href="../../bower_components/polymer/polymer.html"> | |
<link rel="import" href="../../bower_components/firebase-element/firebase-element.html"> | |
<polymer-element name="db-save"> | |
<template> | |
<firebase-element id="db" | |
location="http://cth-storage.firebaseio.com/" | |
data="{{data}}" | |
keys="{{keys}}" | |
childEvents |
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
<link rel="import" href="../bower_components/polymer/polymer.html"> | |
<link rel="import" href="../bower_components/core-firebase/core-firebase.html"> | |
<polymer-element name="discount-room"> | |
<template> | |
<core-firebase location="https://discount-app.firebaseio.com/" | |
list="{{discount}}" | |
on-items-added={{update}}> | |
<input id="uchar" type="text"></input> | |
<button id="submit" on-click={{sendChar}}>Submit</button> |
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
How exactly does the Firebase JS client interact with Polymer? | |
Specifically, what can and can't I do in terms of defining new Firebase references and getting/setting values from within nested elements? | |
model of component: | |
+------- | |
|discount-room | |
|+------ | |
||discount-input |