This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // adapted from https://gist.github.com/timgit/7bc5896f5297301afb02 | |
| app.filter('bigNumber', function(){ | |
| return function(number){ | |
| if(number === null) return null; | |
| if(number === 0) return "0"; | |
| //precision level | |
| var rounder = 100; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // simpler version | |
| var defer = $q.defer(); | |
| var promises = []; | |
| angular.forEach(items, function(item){ | |
| promises.push(api.randomFunc(item)); | |
| }); | |
| $q.all(promises).then(function(ret){ | |
| /* do something fancy here */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // canvas needs "style" about its size attribute | |
| var c = document.getElementById("canvas"); | |
| var ctx = c.getContext("2d"); | |
| if (window.devicePixelRatio > 1) { | |
| var canvasWidth = c.width; | |
| var canvasHeight = c.height; | |
| c.width = canvasWidth * window.devicePixelRatio; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### MAC OS X ONLY OpenGL/SDL Makefile ! Tested on Yosemite | |
| # adapted by Lucas Horand - http://luhof.fr - from a random chunk of code by Laurent Noël | |
| # / ! \ You need a basic architecture with src, obj, includes folders / ! \ | |
| # app will be created in bin folder. | |
| ### | |
| ### FRIENDLY REMINDERS : | |
| # Use homebrew to install libs : http://brew.sh | |
| # before including OpenGL check #ifdef __APPLE__ ! | |
| ### |
NewerOlder