Taken directly from: http://jsfiddle.net/gikoo/qNrFX/
var demoApp = angular.module('demoApp', []);
demoApp.controller('nestedFormIsolation', function ($scope) {
$scope.setPristine = function(form){
form.$setPristine();
};
#! /usr/bin/perl | |
# https://www.emacswiki.org/emacs/GnuClient#toc13 | |
## | |
## This script uses gnudoit to put the contents of STDIN | |
## in an Emacs buffer called *Piped* | |
## | |
if (! `which gnudoit 2>/dev/null`) { | |
print STDERR "This script requires gnudoit\n"; |
find . -name '*.java' ! -type d -exec bash -c 'expand -t 4 "$0" > /tmp/e && mv /tmp/e "$0"' {} \; |
// Taken from: https://daveaglick.com/posts/capturing-standard-input-in-csharp | |
string stdin = null; | |
if (Console.IsInputRedirected) | |
{ | |
using (Stream stream = Console.OpenStandardInput()) | |
{ | |
byte[] buffer = new byte[1000]; // Use whatever size you want | |
StringBuilder builder = new StringBuilder(); | |
int read = -1; | |
while (true) |
// https://github.com/angular/angular.js/blob/5a60302389162c6ef45f311c1aaa65a00d538c66/i18n/src/parser.js | |
// e.g. '#,##0.###' | |
function parsePattern(pattern) { | |
var p = { | |
minInt: 1, | |
minFrac: 0, | |
maxFrac: 0, | |
posPre: '', | |
posSuf: '', | |
negPre: '', |
// https://github.com/angular/angular.js/blob/51d6774286202b55ade402ca097e417e70fd546b/src/ng/filter/filters.js#L428 | |
var R_ISO8601_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/; | |
// 1 2 3 4 5 6 7 8 9 10 11 |
Taken directly from: http://jsfiddle.net/gikoo/qNrFX/
var demoApp = angular.module('demoApp', []);
demoApp.controller('nestedFormIsolation', function ($scope) {
$scope.setPristine = function(form){
form.$setPristine();
};
[Conditional("DEBUG")] | |
public static void Assert(Expression<Func<bool>> assertion, string message, [CallerMemberName] string memberName = "", [CallerFilePath] string sourceFilePath = "", [CallerLineNumber] int sourceLineNumber = 0) | |
{ | |
bool condition = assertion.Compile()(); | |
if (!condition) | |
{ | |
string errorMssage = string.Format("Failed assertion in {0} in file {1} line {2}: {3}", memberName, sourceFilePath, sourceLineNumber, assertion.Body.ToString()); | |
throw new AssertionException(message); | |
} | |
} |
git rev-list HEAD -- lib/rules/space-in-brackets.js | tail -n1 | xargs git tag --contains | head -n1 |
HttpResponseMessage result = new HttpResponseMessage(HttpStatusCode.OK); | |
result.Content = new ByteArrayContent(File.ReadAllBytes("path")); | |
result.Content.Headers.ContentType = new MediaTypeHeaderValue("application/javascript"); | |
return result; |
// taken from: https://github.com/esvit/ng-table/blob/master/ng-table.js | |
scope: { | |
'params': '=ngTablePagination', | |
'templateUrl': '=' | |
}, | |
replace: false, | |
link: function (scope, element, attrs) { | |
scope.params.settings().$scope.$on('ngTableAfterReloadData', function () { |