W3C Introduction to Web Components - explainer/overview of the technologies
This file contains 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
var Ctrl = function ($scope, initAnchorScrolling) { | |
initAnchorScrolling($scope); | |
}; | |
Ctrl.$inject = ['$scope', "initAnchorScrolling"]; | |
applicationServices.factory("initAnchorScrolling", | |
['scroll', '$location', '$timeout', function(scrollUtils, $location, $timeout) { | |
return function(scope) { |
This file contains 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
var r = request.send(uri, options, function(e, res, body) { | |
if (e) { | |
// error in request | |
args.callback(e); | |
} | |
// What if 3xx status code? Correct: you will get response data wrapped into Error :)) | |
else if (res.statusCode !== 200 && res.statusCode !== 201 && res.statusCode !== 202) { | |
// provide a default message when none is provided | |
body = body || 'server returned status code ' + res.statusCode; | |
This file contains 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
exports.deepEqual = function deepEqual (a, b) { | |
if (a === b) return true; | |
if (a instanceof Date && b instanceof Date) | |
return a.getTime() === b.getTime(); | |
if (a instanceof ObjectId && b instanceof ObjectId) { | |
return a.toString() === b.toString(); | |
} |
This file contains 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
<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?> | |
<VFPData> | |
<apisvar> | |
<nerrorno>1098</nerrorno> | |
<cerrmess>Ugyldig lisenskode i ProMed.</cerrmess> | |
<cprogline>Programmodul: settopppromedapi Linje: 3657</cprogline> | |
<cinfo>Programsti: c:\promed\ Datasti: c:\promed\ Tabell: DBFS Sortering: DBFS Filter: Reccount: 284 Recno: 78 EOF: .F.</cinfo> | |
</apisvar> | |
</VFPData> |
This file contains 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
<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?> | |
<VFPData> | |
<apisvar> | |
<nuserid>101</nuserid> | |
<cname>Demo</cname> | |
<ctype/> | |
<cbrtype/> | |
<signatur>DEM</signatur> | |
</apisvar> | |
<apisvar> |
This file contains 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', []) | |
.config(function($routeProvider) { | |
$routeProvider.when('/needsauth', { | |
// config for controller and view | |
resolve: { | |
'auth': function(AuthService) { | |
return AuthService.authenticate(); | |
} | |
} | |
}); |
This file contains 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
directivesModule | |
.directive('colorSource', [ | |
function () { | |
var linkFn = function colorPickerLinkFn(scope, element, attrs, ctrl) { | |
element.colorpicker({ | |
format: 'rgba' | |
}).on("changeColor", function cpChangeColorEventHandler(event) { | |
scope.$apply(function () { | |
var newColor = event.color.toRGB(); |
This file contains 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
var myApp = angular.module('myApp', []).directive('uiValidateEquals', function() { | |
return { | |
restrict: 'A', | |
require: 'ngModel', | |
link: function(scope, elm, attrs, ctrl) { | |
function validateEqual(myValue, otherValue) { | |
if (myValue === otherValue) { | |
ctrl.$setValidity('equal', true); |
This file contains 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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
OlderNewer