In functional programming you often want to apply a function partly. A simple example is a function add.
It would be nice if we could use add like:
var res2 = add(1, 3); // => 4
var add10To = add(10);
var res = add10To(5); // => 15
Currently considering https://github.com/webdriverio/webdrivercss
Core Goals:
| # get existing queries results | |
| users = get_query_result(132) # this one has {id, name} | |
| events_by_users = get_query_result(131) # this one has {user_id, events count} | |
| # actual merging. can be replaced with helper function and/or some Pandas code | |
| events_dict = {} | |
| for row in events_by_users['rows']: | |
| events_dict[row['user_id']] = row['count'] | |
| for row in users['rows']: |
| /** | |
| * Basic proof of concept. | |
| * - Hot reloadable | |
| * - Stateless stores | |
| * - Stores and action creators interoperable with Redux. | |
| */ | |
| import React, { Component } from 'react'; | |
| export default function dispatch(store, atom, action) { |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParentA quick guide on how to setup Node.js development environment.
nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.
| query IntrospectionQuery { | |
| __schema { | |
| queryType { name } | |
| mutationType { name } | |
| subscriptionType { name } | |
| types { | |
| ...FullType | |
| } | |
| directives { |
| -- conway's game of 💩 | |
| -- shittily written by benley | |
| module Main where | |
| import Control.Concurrent | |
| import Data.Array.Unboxed | |
| import System.Environment | |
| data Cell = Live | Dead deriving Eq |
| function createRandomArray( lenght, max ) { | |
| return Array.apply( null, Array ( lenght ) ).map( function( _, i ) { | |
| return Math.round( Math.random() * max ); | |
| }); | |
| } | |
| console.log( createRandomArray( 20, 300 ) ); |
| //how to implement CRUD with F# and entityframework and TypeClasses | |
| //transform this into an highorder type | |
| type Customer with static member queryId = <@ fun ( λ : Customer ) -> λ.Id @> | |
| //just a helper | |
| type entity<'T> = ('T -> int) | |
| //our highorder context |