- Test WCE
- ISSUE with creating a user locally on API / DB to allow testing.
- Get an access token for the DB.
- Test API can sort channels by these fields (maybe use API explorer)
- update UI defaults (the defaults in API have already been updated) for channel to have platform: stb and group: leads and subscribers, when no data for platform and UG (say, old channel) is provided by API.
- Test API can sort channels by these fields (maybe use API explorer)
This file contains hidden or 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
/** very simple spreadsheet idea. try 1 **/ | |
function link(cell, transform) { | |
let el; | |
return R` | |
${key:cell.key} | |
<td class=cell> | |
<input bond=${e => el = e} input=${el.value = transform(el.value)}> | |
</td> | |
`; |
This file contains hidden or 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
{ | |
"followers": [ | |
{ | |
"login": "rubys", | |
"id": 4815, | |
"node_id": "MDQ6VXNlcjQ4MTU=", | |
"avatar_url": "https://avatars1.githubusercontent.com/u/4815?v=4", | |
"gravatar_id": "", | |
"url": "https://api.github.com/users/rubys", | |
"html_url": "https://github.com/rubys", |
This file contains hidden or 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 PASS = ['32']; // green | |
const FAIL = ['31', '1']; // red, bold | |
function logStyle(ansiEscapeCodes, text) { | |
console.log(`\x1b[${ansiEscapeCodes.join(';')}m${text}\x1b[0m`); | |
} | |
class Tester { | |
constructor() {} |
This file contains hidden or 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
run(); | |
async function run() { | |
const orders = await getOrders('http://files.olo.com/pizzas.json'); | |
const orderCounts = countOrders(orders); | |
const topOrders = sortCounts(orderCounts).slice(0,20); | |
console.log(JSON.stringify({topOrders},null,2)); | |
} | |
async function getOrders(url) { |
Ideas:
// state is just objects, but what are changes to state?
// probably also just objects
// but what is the easiest way to "change state"
// let's look at the different types of state
// an object is just a map of keys to values
// a key is a string (without loss of generality)
This file contains hidden or 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
// generate a random unique code that has ~ 51 bits of entropy | |
function randid({int:int=false}={}) { | |
const randInt = Math.round((Math.random()*performance.now()*(+ new Date))/1000); | |
if ( !! int ) return randInt; | |
else return randInt.toString(36); | |
} | |
// generate a sequence of keys (that throws at MAX_SAFE_INTEGER, roughly ~53 bits) | |
function *nextkey(prefix = '') { | |
let count = 1; |
Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element
or the /deep/
path selector.
video::webkit-media-controls-timeline {
background-color: lime;
}
video /deep/ input[type=range] {
This file contains hidden or 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
#include <map> | |
#include <limits> | |
template<typename K, typename V> | |
class interval_map { | |
std::map<K,V> m_map; | |
public: | |
// constructor associates whole range of K with val by inserting (K_min, val) | |
// into the map |