updating data in a d3 histogram
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
/// Transform.js | |
/* | |
http://www.w3.org/TR/css3-transforms/#interpolation-of-transforms | |
Four rules for interpolating transform lists: | |
* If both lists are none, return nothing. | |
* If one of the lists is none, create a equivalent identity list, continue to next rule. | |
* If both lists have the same amount of arguments (having a common primitive), interpolate each pair of transform function and return computed value. | |
* else in worst case, convert both lists to matrices and interpolate those, return computed value. | |
To minimize GC, we have only one static object. |
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
function rescale(from_min, from_max, to_min, to_max, from) { | |
return to_min + ((to_max-to_min) * ((from_min-from) / (from_min-from_max))); | |
} | |
rescale.clamped = function(fMin, fMax, tMin, tMax, f) { | |
f = this(fMin, fMax, tMin, tMax, f); | |
if(tMin < tMax) { if(f < tMin) return tMin; else if(f > tMax) return tMax; } | |
else { if(f < tMax) return tMax; else if(f > tMin) return tMin; } | |
return f; | |
} |
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
/// Self-Contained JavaScript to prevent window scroll overflow bounce on iOS devices | |
/// Checks for whitelisted native scrolling via .scrollable class or if -webkit-overflow-scrolling is an inline-style | |
window.PreventWindowBounce = { | |
handleEvent: function EventListenerInterface (ev) { if(ev.type in this) this[ev.type](ev); }, | |
bindEvents: function () { | |
document.addEventListener('touchstart', PreventWindowBounce); | |
document.addEventListener('touchmove', PreventWindowBounce); | |
}, | |
/// The code works by checking whether the scroll area is against |
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
04912dac406c035a8b4d6387611c745194fd85ab3de591bb3fe21f5c13b1cbf5bd336469ac1b28aba064b5b20a5efc3357a78edef08e4df8175fe6a35d4bfa872f |
{
/* Where the box is placed */
position: ;
z-index: ;
float: ;
place-self: ;
justify-self: ;
align-self: ;
vertical-align: ;
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 EventEmitter = require('events'); | |
const electron = require('electron'); | |
const address = require('address'); | |
const Netmask = require('netmask').Netmask; | |
const http = require('http'); | |
const firstOpenPort = require('first-open-port'); | |
const got = require('got'); | |
const Polo = require('polo'); | |
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
#!/bin/bash | |
mkdir icon.iconset | |
qlmanage -t -s 1024 -o . icon.ai | |
mv icon.ai.png icon.png | |
convert icon.png -gravity center -background white -extent 1024x1024 -alpha Set -colorspace sRGB -define png:format=png32 icon.png | |
sips -z 16 16 icon.png --out icon.iconset/icon_16x16.png | |
sips -z 32 32 icon.png --out icon.iconset/[email protected] | |
sips -z 32 32 icon.png --out icon.iconset/icon_32x32.png | |
sips -z 64 64 icon.png --out icon.iconset/[email protected] |
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
Clients | |
List* | |
Client -> Detail | |
Add -> New Client | |
Detail | |
Unchanged* | |
Blur or close -> List | |
Edit a field -> Edited Details | |
Delete and confirm -> List | |
Edited Details |
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
Room& | |
Status | |
Event starts within 10m -> Booked | |
Free | |
Use now -> In Use | |
Booked | |
Check in -> In Use | |
10m grace period -> Free |
OlderNewer