(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// bind needs a getter to update the property. | |
// emptytext has no setter. So you need to create one | |
Ext.define('Override.Textfield', { | |
override: 'Ext.form.field.Text', | |
setEmptyText: function(emptyText) { | |
this.emptyText = emptyText; | |
this.applyEmptyText(); | |
} | |
}); |
var Option = require('fantasy-options') | |
var Some = Option.Some; | |
var None = Option.None; | |
var Compose = function(x){ | |
this.val = x; | |
} | |
Compose.prototype.map = function(f){ | |
return new Compose(this.val.map(function(u){return u.map(f); })); |
function! TextObjectFunction() | |
normal! ]}% | |
execute "normal ?function\<CR>" | |
normal! vf{% | |
endfunction | |
vnoremap af :<C-U>silent! :call TextObjectFunction()<CR> | |
omap af :normal vaf<CR> |
**~~ NOTE: This is a Stage 0 proposal. ~~**
Please direct all future feedback to that repo in the form of directed issues.
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
function lens(get, set) { | |
var f = function (a) { return get(a); }; | |
f.set = set; | |
f.mod = function (f, a) { return set(a, f(get(a))); }; | |
return f; | |
} | |
var first = lens( | |
function (a) { return a[0]; }, | |
function (a, b) { return [b].concat(a.slice(1)); } |
/* | |
* Copyright (c) 2010 Tobias Schneider | |
* This script is freely distributable under the terms of the MIT license. | |
*/ | |
(function(){ | |
var UPC_SET = { | |
"3211": '0', | |
"2221": '1', | |
"2122": '2', |