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); | |
| } | |
| } |
Taken directly from: http://jsfiddle.net/gikoo/qNrFX/
var demoApp = angular.module('demoApp', []);
demoApp.controller('nestedFormIsolation', function ($scope) {
$scope.setPristine = function(form){
form.$setPristine();
};| // 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 |
| // 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: '', |
| // 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) |
| find . -name '*.java' ! -type d -exec bash -c 'expand -t 4 "$0" > /tmp/e && mv /tmp/e "$0"' {} \; |
| #! /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"; |
| type A = { | |
| a: number | |
| }; | |
| const myA: A = { a: 1 }; | |
| const ac = [undefined, myA]; | |
| const ba: $ReadOnlyArray<A> = ac.filter(Boolean); |
| // ==UserScript== | |
| // @name CodeNull - Amazone Prime Video Ad Muter | |
| // @author nate-wilkins@code-null.com | |
| // @version 4.0 | |
| // @namespace http://tampermonkey.net/ | |
| // @description Detects and blocks ads on Amazon Prime Video. Automatically mute ads. Turn sound on again after the ad. | |
| // @match https://www.amazon.com/gp/video/* | |
| // @grant none | |
| // @run-at document-start | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=amazon.com |
| /* | |
| * Create an animation frame with a specified callback with | |
| * a target frame rate. | |
| */ | |
| const createAnimationFrame = ( | |
| callback: (timeDelta: number) => boolean, | |
| targetFrameRate?: number, | |
| timePrevious?: number, | |
| timeCurrent?: number, | |
| ): null | number => { |