##Spies
//Anonymous function
var spy = sinon.spy();
//Provided Function
var spy = sinon.spy(myFunc);
| // 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']; |
| /*! | |
| Underscore.js templates as a standalone implementation. | |
| JavaScript micro-templating, similar to John Resig's implementation. | |
| Underscore templates documentation: http://documentcloud.github.com/underscore/#template | |
| Modifyed by marlun78 | |
| */ | |
| (function () { | |
| 'use strict'; |
| # | |
| # Sources: | |
| # http://stackoverflow.com/questions/7704624/how-can-i-use-gzip-compression-for-css-and-js-files-on-my-websites | |
| # http://codex.wordpress.org/Output_Compression | |
| # http://www.perun.net/2009/06/06/wordpress-websites-beschleuinigen-4-ein-zwischenergebnis/#comment-61086 | |
| # http://www.smashingmagazine.com/smashing-book-1/performance-optimization-for-websites-part-2-of-2/ | |
| # http://gtmetrix.com/configure-entity-tags-etags.html | |
| # http://de.slideshare.net/walterebert/die-htaccessrichtignutzenwchh2014 | |
| # http://de.slideshare.net/walterebert/mehr-performance-fr-wordpress | |
| # https://andreashecht-blog.de/4183/ |
| <script type="text/ng-template" id="one.html"> | |
| <div>This is first template</div> | |
| </script> | |
| <script type="text/ng-template" id="two.html"> | |
| <div>This is second template</div> | |
| </script> |
| <?php | |
| return array( | |
| /* ... */ | |
| 'components' => array( | |
| /* ... */ | |
| 'urlManager' => array( | |
| 'enablePrettyUrl' => true, | |
| 'rules' => require(__DIR__ . '/routes.php'), | |
| ), |
| angular.module('services', []) | |
| .factory('State', function ($rootScope) { | |
| 'use strict'; | |
| var state; | |
| var broadcast = function (state) { | |
| $rootScope.$broadcast('State.Update', state); | |
| }; | |
| var update = function (newState) { |
| /*! | |
| * VERSION: 0.0.1 | |
| * DATE: 2013-12-03 | |
| * | |
| * @description: Plugin to manipulate transform properties of SVGJS objects, heavily based on the RaphaelPlugin | |
| * | |
| * @author: Rob Aldred, raldred@gmail.com | |
| */ | |
| (window._gsQueue || (window._gsQueue = [])).push( function() { |
| /** | |
| * @author RubaXa <trash@rubaxa.org> | |
| * @license MIT | |
| */ | |
| (function () { | |
| "use strict"; | |
| function _then(promise, method, callback) { | |
| return function () { |
| ;(function(define){define(function(require,exports,module){ | |
| //... | |
| });})(typeof define=='function'&&define.amd?define | |
| :(function(n,w){'use strict';return typeof module=='object'?function(c){ | |
| c(require,exports,module);}:function(c){var m={exports:{}};c(function(n){ | |
| return w[n];},m.exports,m);w[n]=m.exports;};})('module-name',this)); |