| Provider | Singleton | Instantiable | Configurable |
|---|---|---|---|
| Constant | Yes | No | No |
| Value | Yes | No | No |
| Service | Yes | No | No |
| Factory | Yes | Yes | No |
| Decorator | Yes | No? | No |
| Provider | Yes | Yes | Yes |
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
| module.exports = function(grunt) { | |
| "use strict"; | |
| // Project configuration. | |
| grunt.initConfig({ | |
| // Metadata. | |
| pkg: grunt.file.readJSON('package.json'), | |
| banner: '/**\n' + | |
| '* <%= pkg.name %> v<%= pkg.version %> by <%= pkg.author %>\n' + |
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
| html { font-size: 62.5%; } | |
| body { font-size: 14px; font-size: 1.4rem; } /* =14px */ | |
| h1 { font-size: 24px; font-size: 2.4rem; } /* =24px */ |
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
| requirejs.config({ | |
| baseUrl: 'scripts', | |
| paths: { | |
| 'angular': 'lib/angular/angular', | |
| 'angular-animate': 'lib/angular/angular-animate', | |
| 'angular-aria': 'lib/angular/angular-aria', | |
| 'angular-cookies': 'lib/angular/angular-cookies', | |
| 'angular-messages': 'lib/angular/angular-messages', | |
| 'angular-mocks': 'lib/angular/angular-mocks', | |
| 'angular-resource': 'lib/angular/angular-resource', |
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
| // Establish the Player class-based object | |
| function Player(){ | |
| this.name; | |
| this.hitpoints = 100; | |
| this.attack = function attack(opponent){ | |
| opponent.hitpoints -= 10; | |
| alert(this.name+" just hit "+opponent.name); | |
| } | |
| } | |
| // Create two new separate Player instances |
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
| // Establish a parent class | |
| function Parentclass(){ | |
| this.parent_property1 = "Hola"; | |
| this.parentmethod1 = function parentmethod1(arg1){ | |
| return arg1+" Parent method 1 return data ..."; | |
| } | |
| } | |
| // Establish a child class | |
| function Childclass(){ | |
| this.child_property1 = "Adios"; |
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
| // Register oEmbed providers | |
| function instagram_oembed_provider() { | |
| wp_oembed_add_provider( 'http://instagram.com/p/*', 'http://api.instagram.com/oembed', false ); | |
| wp_oembed_add_provider( 'http://instagr.am/p/*', 'http://api.instagram.com/oembed', false ); | |
| } | |
| // Hook into the 'init' action | |
| add_action( 'init', 'instagram_oembed_provider' ); |
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
| .s3{ | |
| transition-duration: 0.8s; | |
| transition-property: transform; | |
| overflow:hidden; | |
| } | |
| .s3:hover | |
| { | |
| transform:rotate(360deg); | |
| } |
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
| <?php | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.com | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
| * Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php | |
| */ | |
| $args = array( |
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
| .directive('validateNi', function() { | |
| return { | |
| require: 'ngModel', | |
| restrict: 'A', | |
| link: function(scope, elem, attr, ngModel) { | |
| var validator = function(value) { | |
| if (/^\s*[a-zA-Z]{2}(?:\s*\d\s*){6}[a-zA-Z]?\s*$/.test(value)) { | |
| ngModel.$setValidity('ni', true); | |
| return value; |