(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 INPUT_TYPES = 'color|date|datetime|datetime-local|file|month|number|password|range|search|tel|text|time|url|week'.split('|') | |
| var App = React.createClass({ | |
| getInitialState: function() { | |
| return {} | |
| }, | |
| onChange: handleFormInputChange, | |
| render: function() { |
(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.
| // | |
| // _oo0oo_ | |
| // o8888888o | |
| // 88" . "88 | |
| // (| -_- |) | |
| // 0\ = /0 | |
| // ___/`---'\___ | |
| // .' \\| |// '. | |
| // / \\||| : |||// \ | |
| // / _||||| -:- |||||- \ |
| <!doctype html> | |
| <html ng-app="Demo" ng-controller="AppController"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title> | |
| Lazy Loading Images With AngularJS | |
| </title> | |
| <style type="text/css"> |
| # abort if already under tmux | |
| [[ -n $TMUX_PANE ]] && return | |
| # zsh-specific includes | |
| zmodload -i zsh/datetime | |
| zmodload -i zsh/stat | |
| # place to store the chart | |
| RAINBARF_OUT=~/.rainbarf.out | |
| # update period, in seconds |
| angular.module('kindeditor', []).directive 'kindeditor', -> | |
| require: '?ngModel' | |
| link: (scope, elm, attr, ngModel)-> | |
| unless ngModel then return | |
| ngModel.$render = (value)-> | |
| unless ngModel.editor | |
| csrfToken = $('meta[name=csrf-token]').attr('content') | |
| csrfParam = $('meta[name=csrf-param]').attr('content') | |
| extraParams = {} |
| app.post('/login', function(req, res) { | |
| console.log(res); | |
| passport.authenticate('local', function(err, user) { | |
| if (req.xhr) { | |
| //thanks @jkevinburton | |
| if (err) { return res.json({ error: err.message }); } | |
| if (!user) { return res.json({error : "Invalid Login"}); } | |
| req.login(user, {}, function(err) { | |
| if (err) { return res.json({error:err}); } | |
| return res.json( |
| ;; Installation: | |
| ;; In .emacs add: | |
| ;; (require 'doubanfm) | |
| (dolist (path-list (list "./lib/" | |
| "./lib/http-emacs" | |
| "./lib/emms-3.0")) | |
| (add-to-list 'load-path | |
| (expand-file-name path-list (file-name-directory load-file-name)))) |
| <string>(?:^\s+)?(<)((?i:script))\b(?![^>]*/>)</string> | |
| => | |
| <string>(?:^\s+)?(<)((?i:script))\b(?!([^>]*text/template[^>]*|[^>]*/>))</string> |