(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.
| var roc = { | |
| namespace: function(ns) { | |
| var parts = ns.split('.'), | |
| object = this, | |
| i, len; | |
| for (i=0, len=parts.length; i < len; i++) { | |
| if (!object[parts[i]) { | |
| object[parts[i]] = {}; | |
| } | |
| object = object[parts[i]]; |
| var $seach, $list; | |
| $seach = $('#seach'); | |
| $list = $('#list'); | |
| $seach.on('keydown', function(){ | |
| var $this = $(this); | |
| setTimeout(function(){ | |
| var val = $this.val(); | |
| var re = new RegExp(val); | |
| var newlist = $list.find('li').filter(function(item){ |
| docker 部署 gitlab | |
| `wget https://raw.githubusercontent.com/sameersbn/docker-gitlab/master/docker-compose.yml && docker-compose up -d ` |
| var list = [ | |
| 'Cras justo odio', | |
| 'Dapibus ac facilisis in', | |
| 'Morbi leo risus', | |
| 'Porta ac consectetur ac', | |
| 'Vestibulum at eros' | |
| ] | |
| var list_set = function () { | |
| list.push('Item '+ new Date().getTime()); | |
| $('#list').trigger('update:list'); |
| var y = le => (f => f(f)) (f => le(x => (f(f))(x))) | |
| var y = function(le) { | |
| return function(f) { | |
| return f(f); | |
| }(function(f) { | |
| return le( | |
| function(x) { return (f(f))(x); } |
| Deriving the Y Combinator in 7 Easy Steps | |
| December 01, 2010 | |
| The Y Combinator is a method of implementing recursion in a programming language that does not support it natively (actually, it's used more for exercising programming brains). The requirement, though, is that language to support anonymous functions. | |
| I chose JavaScript for deriving the Y Combinator, starting from the definition of a recursive factorial function, using a step-by-step transformation over the initial function. | |
| Update | |
| There's now a Chinese translation of this article as well as a Clojure port. |
| var location = function (target) { | |
| let vendors = { | |
| api: 'http://184.api.kr.xingyuanauto.com/basedata/api?Method=Xy.Kr.BaseData.', | |
| province: [''], | |
| provinceDisplay: [''], | |
| city: [''], | |
| cityDisplay: [''], | |
| cities: {}, | |
| citiesDisplay: {}, | |
| type: { |
| <!DOCTYPE html> | |
| <!-- | |
| Created using JS Bin | |
| http://jsbin.com | |
| Copyright (c) 2018 by anonymous (http://jsbin.com/kibowalije/1/edit) | |
| Released under the MIT license: http://jsbin.mit-license.org | |
| --> |
(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.