Blend two colors together.
color1
(string): - The first color, in hexidecimal format.color2
(string): - The second color, in hexidecimal format.
const nums = [1,2,3,4,5,6] | |
// imperative, step by step // | |
var addOneToAll = (collection) => { | |
var output = []; | |
for (var i = 0, i < collection.length, i++ ){ | |
output.push(collection[0] + 1); | |
} | |
return output; | |
} |
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |
const isMethodNamed = (name) => ifElse(has('callee'), | |
ifElse(compose(isMemberExpression, prop('callee')), | |
compose(equals(name), prop('name'), prop('property'), prop('callee')), | |
F | |
), | |
F | |
) | |
//// assume we have a CallExpression |
Unhandled exception at line 7, column 225 in http://www.dailymotion.com/ | |
0x800a1391 - JavaScript runtime error: 'Modernizr' is undefined | |
SEC7117: Network request to http://www.dailymotion.com///s2.dmcdn.net/QHKJl.js did not succeed. | |
This Internet Explorer instance does not have the following capabilities: internetClient privateNetworkClientServer | |
DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337 |
import React from 'react'; | |
import {throttle} from 'lodash'; | |
import compose from 'recompose/compose'; | |
import setPropTypes from 'recompose/setPropTypes'; | |
import lifecycle from 'recompose/lifecycle'; | |
const _propTypes = { | |
onScrolled: | |
limit: | |
frequency: |
import Signal | |
import Html | |
port message: Signal String | |
main : Signal Html.Html | |
main = | |
Signal.map view model |
// a partially applied function, takes A, and returns a function that takes B, C | |
const PieChart = (crossFilter) => (chart, node) => { | |
const { width, height, dcValues } = chart; | |
const { elasticX, cap, othersGrouper, ticks } = dcValues; | |
const dimensions = crossFilter.dimension(chart.dimensions); | |
const group = dimensions.group().reduceCount(); | |
const innerRadius = Math.min(width,height) * 0.2; | |
const PieChart = dc.pieChart(node); |
import Html exposing (..) | |
import Html.Events exposing (..) | |
import Html.Attributes exposing (..) | |
import Signal exposing (..) | |
import StartApp.Simple as StartApp | |
type alias Model = | |
{ events: List String } | |
initialModel : Model |
export const renderList = (mapProps) => (list, ...rest) => { | |
if (list) { | |
const propsMapper = [...rest].length ? mapProps(...rest) : mapProps | |
return list.map(propsMapper) | |
} | |
} |