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
| open FSharp | |
| open FSharp.Core | |
| [<Measure>] type hour | |
| [<Measure>] type gbp | |
| type LabourType = | |
| | Design | |
| | UIDesign |
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
| describe("YourComponentTests", () => { | |
| it("should resolve dependencies", () =>{ | |
| const f = TestBed.configureTestingModule({ | |
| imports: [AppModule, SpecialModule] | |
| }); | |
| f.compileComponents().then(res => res) | |
| const z = f.createComponent(YouComponent); | |
| }); | |
| }); |
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
| *.lock | |
| .fake |
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
| //see https://github.com/Microsoft/TypeScript/issues/15628 | |
| type Diff<T extends string, U extends string> = ({[P in T]: P } & {[P in U]: never } & { [x: string]: never })[T]; | |
| type Omit<T, K extends keyof T> = {[P in Diff<keyof T, K>]: T[P]}; | |
| type Test = Omit<{a: number, b: string, c: "hehe"}, "b"|"c">; // {a: number} | |
| type Subtract<T1 extends any, T2> = Omit<T1, keyof T2>; |
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
| //Deserialize a json object back into form inputs ready for a conventional post | |
| //Inverse of jquery $.serialize($form) | |
| const isPrimitive = (obj) => | |
| (typeof obj === 'string') || (typeof obj === 'number') | |
| const tryDumpValue = (obj) => | |
| { | |
| if(!isPrimitive(obj)) | |
| 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
| //Walk all of the subfolders and execute a command | |
| find ./ -mindepth 1 -maxdepth 1 -type d -exec bash -c 'cd {}/ && ls' \; |
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
| public static class WatinExtensions | |
| { | |
| public static async Task<Element> GetSingleSizzleAsync(this IEHost host, string sizzleSel, int timeout = 2000, int pollInterval = 500) | |
| { | |
| return await _Poll( | |
| () => host.Elements.Filter(Find.BySelector(sizzleSel))?.First(), | |
| element => element?.Exists ?? false, | |
| "Element matching expression " + sizzleSel + " not found after " + timeout + "ms", timeout, pollInterval | |
| ); | |
| } |
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
| .vs | |
| bin | |
| obj | |
| *.js |
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
| public class SubstitutingStreamWrapper : Stream | |
| { | |
| private readonly Stream _base; | |
| private readonly int _windowSize; | |
| private Queue<string> _bufferedSegments = new Queue<string>(); | |
| private readonly string _find; | |
| private readonly string _replace; | |
| public SubstitutingStreamWrapper(Stream stream, |
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
| public class PasswordValidationErrorCollector | |
| { | |
| private readonly PasswordValidator _passwordValidator; | |
| public PasswordValidationErrorCollector(PasswordValidator passwordValidator = null) | |
| { | |
| _passwordValidator = passwordValidator ?? new PasswordValidator(); | |
| } |
NewerOlder