Changing select/map to use a scoped this argument in addition to passing the observable sequence.
Changes from:
selector: (T => Int => U)
to:
selector: (T => Int => Observable => U)
| var cv = document.getElementById('cv'); | |
| var c = cv.getContext('2d'); | |
| var txtDiv = document.getElementById('txt'); | |
| var fileBtn = document.getElementById("up-button"); | |
| var img = new Image(); | |
| img.src = 'a.jpg'; | |
| img.onload = init; // 图片加载完开始转换 | |
| fileBtn.onchange = getImg; | |
| // 根据灰度生成相应字符 |
| @keyframes flipleft { | |
| from { transform: rotate(0); } | |
| 50% { transform: rotate(180deg); } | |
| to { transform: rotate(180deg); } | |
| } | |
| @keyframes flipright { | |
| from { transform: rotate(0); } | |
| 50% { transform: rotate(-180deg); } | |
| to { transform: rotate(-180deg); } |
Changing select/map to use a scoped this argument in addition to passing the observable sequence.
Changes from:
selector: (T => Int => U)
to:
selector: (T => Int => Observable => U)
| var Y = (function(){ | |
| return { | |
| Car:function(model){ | |
| this.model = model; | |
| this.applyBreak = function(){ | |
| alert("done break!!"); | |
| } | |
| } | |
| } |
| import sublime | |
| import sublime_plugin | |
| import re | |
| class CompactExpandCssCommand(sublime_plugin.TextCommand): | |
| def run(self, edit, action='compact'): | |
| rule_starts = self.view.find_all('\{') | |
| rule_ends = self.view.find_all('\}') |
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |
| /* | |
| natcompare.js -- Perform 'natural order' comparisons of strings in JavaScript. | |
| Copyright (C) 2005 by SCK-CEN (Belgian Nucleair Research Centre) | |
| Written by Kristof Coomans <kristof[dot]coomans[at]sckcen[dot]be> | |
| Based on the Java version by Pierre-Luc Paour, of which this is more or less a straight conversion. | |
| Copyright (C) 2003 by Pierre-Luc Paour <natorder@paour.com> | |
| The Java version was based on the C version by Martin Pool. | |
| Copyright (C) 2000 by Martin Pool <mbp@humbug.org.au> |