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
IEnumerable<IEnumerable<int>> GenerateCage(int num, int target, params int[] excluded) | |
{ | |
return GenerateCageInner(num, target, 1, 9, new HashSet<int>(excluded)); | |
} | |
private IEnumerable<IEnumerable<int>> GenerateCageInner(int num, int target, int min, int max, HashSet<int> excluded) | |
{ | |
// Base case | |
if (num == 0) | |
{ |
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
angular.module('app', ['jmdobry.angular-cache']).config(function ($angularCacheProvider) { | |
// optionally set cache defaults | |
$angularCacheFactoryProvider.setCacheDefaults({ options... }); | |
}).run(function ($angularCacheFactory) { | |
// Create a cache here, or anywhere else. Just inject $angularCacheFactory | |
var newCache = $angularCacheFactory('newCache', { options... }); |
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
'use strict'; | |
var path = require('path'); | |
var folderMount = function folderMount(connect, point) { | |
return connect.static(path.resolve(point)); | |
}; | |
module.exports = function (grunt) { | |
// Project configuration. | |
grunt.initConfig({ |
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
angular.module('daterangepicker', []); | |
angular.module('daterangepicker').directive('dgDaterangepicker', [function () { | |
'use strict'; | |
return{ | |
restrict: 'A', | |
link: function (scope, elem, attrs) { | |
var options = attrs.options; | |
var parseOptions = function (options) { | |
if (!options) return; |
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
// Requires jQuery from http://jquery.com/ | |
// and jQuerySparklines from http://omnipotent.net/jquery.sparkline | |
// AngularJS directives for jquery sparkline | |
angular.module('sparkline', []); | |
angular.module('sparkline') | |
.directive('jqSparkline', [function () { | |
'use strict'; | |
return { |
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
angular.module('flot') | |
.directive('flotLine', [function () { | |
'use strict'; | |
return { | |
restrict: 'EA', | |
require: 'ngModel', | |
link: function (scope, elem, attrs, ngModel) { | |
var chart = null, | |
opts = { |
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
angular.module('flot') | |
.directive('flotStackedline', [function () { | |
'use strict'; | |
return { | |
restrict: 'EA', | |
require: 'ngModel', | |
link: function (scope, elem, attrs, ngModel) { | |
var chart = null, | |
opts = { |
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
angular.module('flot') | |
.directive('flotPie', [function () { | |
'use strict'; | |
return { | |
restrict: 'E,A', | |
require: 'ngModel', | |
link: function (scope, elem, attrs, ngModel) { | |
var chart = null, | |
opts = { |
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
// AngularJS directives for jquery.flot | |
// Dependencies jQuery and flot (http://www.flotcharts.org) | |
// jquery.flot.plugins: jquery.flot.pie.js, jquery.flot.stack.js, jquery.flot.time.js | |
angular.module('flot', []); |
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
// AngularJS Directive for jQuery Sparklines | |
// Dependencies: jquery and http://omnipotent.net/jquery.sparkline/ | |
angular.module('sparkline',[]) | |
angular.module('sparkline') | |
.directive('jqSparkline', [function () { | |
'use strict'; | |
return { | |
restrict: 'E,A', | |
require: 'ngModel', |