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
w next word | |
e end of word | |
b is back a word | |
dd line | |
split buffer | |
ctr +l w + v |
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
@colorScale = d3.scale.quantile() | |
.domain([0, .01, .1, .2, .3, .5, .8, 1.3, 2.1, 3.3]) | |
.range(@colors) | |
_renderLegend: -> | |
# quantizes colors and adds an extra 0 | |
_legendData = [0].concat(@colorScale.quantiles()) | |
_legendData.unshift(0) |
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
_fillRowArrayBlanks: -> | |
curLen = @displayedArray.length | |
diff = @watchSamples - curLen | |
filler = [] | |
for i in [0...diff] | |
filler[i] = [ | |
point: '-' | |
pinned: true | |
] |
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
_spaceLines: -> | |
keys = d3.selectAll('.key')[0] | |
extraRows = 0 | |
_lineSpacer = (d, i) => | |
keyPos = keys[i].getBBox().x | |
keyEdge = keyPos + keys[i].getBBox().width | |
edge = @w - @m*2 |
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
window.URL = window.URL || window.webkitURL | |
blob = new Blob([csvString], {type: 'text/plain'}) | |
objectURL = window.URL.createObjectURL(blob) | |
@$el.find('.confirm').parent().attr("href", window.URL.createObjectURL(blob)) | |
@$el.find('.confirm').parent().attr("download", @_checkFileName()) |
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
_transformFeedData: (feed) -> | |
processedFeed = {} | |
intervalWindow = [] | |
timeStep = {} | |
metaCounter = 1 | |
timeStep = @_getTimeStep feed[0].time, feed[1].time | |
initialDate = new Date(feed[0].time).getTime() | |
metaCounter = @_getMetaCount initialDate, timeStep |
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
_scrollContainer: -> | |
targets = d3.select(d3.selectAll('g.node.selection').pop()).node() | |
return unless targets | |
selectionCoord = targets.pop().getBoundingClientRect() | |
selectedTarget = d3.select('g.selected') | |
selectedTarget = _.compact selectedTarget[0] | |
return unless selectedTarget.length > 0 | |
selectedCoord = selectedTarget[0].getBoundingClientRect() | |
bottomCoord = Math.max selectionCoord.bottom, selectedCoord.bottom |
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
{ | |
"name": "flare", | |
"children": [ | |
{ | |
"name": "analytics", | |
"children": [ | |
{ | |
"name": "cluster", | |
"children": [ | |
{"name": "AgglomerativeCluster", "size": 3938}, |
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
i = setInterval(function() {e = $(".down")[0]; if(e) e.onclick(); else clearInterval(i);}, 500); |
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
$(function () { | |
// generated timestamps | |
t = ['1/1/2010 00:00', '1/1/2010 01:00','1/2/2010 23:00']; // (hourly data for two days) | |
// generated values | |
vals = [34, 15, 28, 16, 8, 47, 35, 41, 1, 24, 13, 19, 18, 27, 32, 6, 39, 25, 9, 14, 22, 40, 38, 48, 36, 12, 3, 31, 43, 29, 42, 2, 21, 23, 11, 44, 30, 10, 49, 33, 17, 37, 7, 4, 45, 46, 50, 5, 26, 20]; // random list of values - two days in length | |
// declaring model | |
var graphVals = new Backbone.Model({time: t, value: vals}); |