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
var w = 600, | |
h = 300; | |
// colours selected from colorbrewer palette | |
var color = d3.scale.ordinal() | |
.domain(["q0-5", "q1-5", "q2-5", "q3-5", "q4-5"]) | |
// .range(colorbrewer.RdYlBu[5].reverse()); | |
.range(colorbrewer.YlOrRd[5]); | |
// .range(colorbrewer.PiYG[5].reverse()); |
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() { | |
var n = 9, // number of layers | |
m = 1, // number of samples per layer | |
sourceData = stream_layers(n, m, 0.1); | |
/* | |
sourceData = [ | |
[{x:0,y:9800}], | |
[{x:0,y:128}], | |
[{x:0,y:60}], |
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
import Graphics.Input as Input | |
import Mouse | |
clicked = Input.input 0 | |
rectangle : Color -> Element | |
rectangle c = [rect 50 40 |> filled c] |> collage 50 50 | |
rect1 = Input.hoverable clicked.handle (\b -> if b then 1 else 0) (rectangle red) | |
rect2 = Input.hoverable clicked.handle (\b -> if b then 2 else 0) (rectangle green) |
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
import String | |
import Graphics.Input (Input, input) | |
import Graphics.Input.Field as Field | |
content : Input Field.Content | |
content = input Field.noContent | |
main : Signal Element | |
main = | |
lift scene content.signal |
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
import Graphics.Input (Input, input) | |
import Graphics.Input.Field as Field | |
import Text | |
content : Input Field.Content | |
content = input Field.noContent | |
tf = toFloat |
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
import Graphics.Input (Input, input) | |
import Graphics.Input.Field as Field | |
import Text | |
content : Input Field.Content | |
content = input Field.noContent | |
tf = toFloat |
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
import Graphics.Input (Input, input) | |
import Graphics.Input.Field as Field | |
import Text | |
content : Input Field.Content | |
content = input Field.noContent | |
tf = toFloat |
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
module StackPair where | |
import Either as E | |
import Either (Either (..), lefts, rights) | |
type Numbered a = {a | n: Int} | |
type Entry a = Either (Numbered a) (Numbered a) | |
type Entries a = [Entry a] |
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="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-icons/av-icons.html"> | |
<link rel="import" href="../paper-fab/paper-fab.html"> | |
<link rel="import" href="../topeka-elements/category-images.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> |
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="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<polymer-element name="my-element"> |
OlderNewer