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
| // Example of constructor pattern | |
| function Person(firstName, lastName){ | |
| this.firstName = firstName; | |
| this.lastName = lastName; | |
| this.introduceSelf = function(){ | |
| alert('Hello, my name is ' + this.firstName + ' ' + this.lastName + '.'); | |
| } | |
| } |
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
| /// <summary> | |
| /// List of "approved" emv tags | |
| /// </summary> | |
| public enum EmvTag | |
| { | |
| /// <summary> | |
| /// Terminal verification results (TVR) | |
| /// </summary> | |
| TerminalVerificationResults = 0x95, |
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
| dGZCgaGAuQYUeI8AuQQzkuMROQMnvDtHWTvv7uQSxy3uSFrWprbggkKFJQgQOYGfHgoL6GOKhlkhtvCoHQSqPOLIcAXIOLtYdfQ4Pkldf1Zj1HPYuLmzkz6ixuQYvfQQltCDbBuk4VcPnlsBxk9mHk9vrvY0evX3rrmsukNwLrlfA8svDsuKULquxdfQZRk9zuzCOu5BIQuJhuyouGW0ymhjMJ0tKEW(ywywOWSon7fmz01kyoVhtjChVPETfmofFWgZLrxRuQJJturWBjOlYpmc7SW65LVyiNpHezfuonMw8P54pdH1KbvXGiI1RHcZe(L644eLgDpyEENfkmY5fdHc7h80HceiSGwIM5DAngPccMI3lOW(bpDOabclZ70Auy6ZW5fSXgRiy1bcZU1MCEXqOW(bpDOabcl1LrhVbf2p4PdfiqywxA6Lf80lkSFWthkqGWuUmbf2p4PdfiqGWK(2oJLyHKGWYqHUhuywNM9cMm6AfmN5flJ3ZRqHoMrdmM54XU4YyMzmJyoVzh7y3t8qAKzCEqxCrhJaHPeUJ3uV2cgj9PGsWCz01kL644eve8wc6I8dJWoZrrZ4)2EHel09GrsFkOemMAirL6YK8zzzXB05NxIJ9zfuoD(54zIOyfuoDeI15YNvq505ZkOCpXdJuhhNOqHXZeddm(x0e7mTIslOjMX9fnk09GvUZZKZyLqIfpjFqGWCM77OJ3Gc77odkm61wWSvIwimBLOfcZ5TB0Ll41ciqyolRJoEJZhLuhhNO0Oq3dkmsDCCIcfg9AlyUGYHPdjLwXqlKME9XIghwRIUIfdlmEMyyGX)IMysRyim2eNNAethskTIHYPK0Rp2Y1lwmSZ0kkTGMyABX7zQLgfiSG5imBV7vuyg3x0Oq3dgdfnVXzYKesS4j5dcZssgstRxBbJTEXY1q8Jbclyi1XXjkuGaHoMrHrQJJtuOWOxBbZfuomDiP0kgAH00Rpw04WAv0vSyyHjTIHWytCEQrmDiP0kgkNssV(ylxVyX |
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
| d4JtkaGAPuz9IQc7suuBJu1(evfntrvL5kQmBQ6XuYnjLCyuUnvAAur7KG9c7ws7NuQFsHAyuHXjQY5LsgkPadMuXWPuhuk60Q6ys4CKkTqkKLkkYIvbTCu9qrvjpfzzuWZjAIsPQPsYKj00vUOukUQuk9mrPUUiBKu0Lf2SeTDPWhfvL6RKc9zk67Icnsrvv)vfA0QuJxuYjffClvIRPIUhPGETkW3uj9BPAuafiguyGKGmKzdzUiZoa5cseKiuGeFz7svR9ncqmVhepm)Ev1YoazY7jBqmR9ncf)nndUwDXacxkCa6fbL)SgDlT1PzIZKGKHVud6FDGmYyLYyTYV2OPcun5Q4VPzWLqOaKVZeHc0y(OoOa5M87HcddK4xw(wj)Abfi3KFpuyyG4DFafi3KFpuyyGSBypMpQdkqUj)EOWWaXzwbuGCt(9qHHbQKzTVxHcKBYVhkmmmqrw2SQyiIdXazbfekGcK4lBxQATVraI59GAzCzPmge07eepm)Ev1YoaTiRL4bOuD830m4qbsAhEVaZnGqHUNoUAadeZAFJqXFtZGRvxmGWLchGYY4YszmiCrVtqF93rRURTpwicHcqmR99QekqYX4dkqYEQkckd1f8sMvKRPOOXvzongSdAM4mzoTcXNLJ6PQOmNgzl4TN3TZC30eKy)OSNQIWimmqlYAjEakd1f8sMvKRPOyVkZPXGDqZeNjZPb9mg8MjotQvi(SCntCMmxZeNv48eugFXDdb9obXQVlBFVcfi5y8bfO1YoazZdzmq28qgdK8M)1dWav(1xEdfO1YoazZdzmq28qgdK8M)1dWWa9IG0m8ARtMsYBT1jlT1XaOAYvXFtZGlHqbOXFtZGdfiRBg3mKh72bNTohKgQHGSUzCZqcYaiPD49cm3acf6E64QbqRLDaso2ssqjzC06MXndjmcu0iQdutR99Q260wj7qFaIhmpzhEVaZnaPz41wNmLK3GsY4O0o8EbMBaJaLKXXu9hmcuQgnI6aXsRJb6oEZ7bb9 |
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
| dmKFuaqirOQzreOULcv7suQ(LiuzyqKJbPwMi4zefttHCnQu2MKW3uGgNiQZjkfhKiTqIspuHYejc6IerBus0hPsvnsrKtkjzMIKBQa2PO6NIqgQKYsLK6PQMkHRsLkBLkvPVksXzjcK5QG2l6VevdwKQdtXILu9yimzP6YK2mv8zfnArXPvA1Iq51eHMTuUTqTBQ63smCHSCOEoLMo46c2ovY3fP04HOopKSEQufVNiG7lkL2VOKjAk4nuqG3YNq2ti7OZoA(y(oFNcESo3IxGks5N4siI3GawxQaVZPIhO0vMpoAK4vKJm(U2zD(TZpwX3xylEER2CQvwpWlBIeIenqkjRuW7dXc8oNk2YC08TIPtbpyAQhOGpo0GLcce4dwvoIMXAzDECPPuWhhAWsbbc8ogeWw8uWhhAWsbbc8rUIatt9af8XHgSuqGaFFDCweHgGIc(4qdwkiqGhBqOuWhhAWsbbce47RnXcEeW6s5nTgbEeuWC0uWBqaRlvG35uXdu6kZhhns8aENtftbpIGfkXYZSDLh2yTZ7nXQLcMJMx2wP0BblqGaFgDNzaMJ2nK4BftNcEW0upqbFCOblfeiW3xhNfrObOOGpo0GLcce4XLMsbFCOblfeiWh5kcmn1duWhhAWsbbc8ydcLc(4qdwkiqG3XGa2INc(4qdwkiqGaVtbRtCj47cfziGv(Q8GIDmi0Hs79I3omnQrIsdyJDyTsAvS0a2yhq7RzO0a2yhknGnODJ3Ga2I3sbVfmyGcEBj478v5bf7yqOdL27jYBhMg1irPbSXoCaTVMHVe8D7qzliV(PuS6nVe89SxMt(ErUTe8Dklbc8ikTcMcc81niK4exc((yLwbtbZrZC0mpbwzYjidsOrAq3CBKmYGoBQanDg3nzyUmmhjMpI5OjW7uW6exc((yLwbtbZtGvoyYdwrYjpcj3gHEufinAq6mUBYWCzyose4n(n2aBXtbVfmyGcEavKYhHvRc8ry1QaVTTDTEbGsmb(yZ6PGhqfP8ry |
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
| void Main() | |
| { | |
| /* use XOR to toggle bits */ | |
| var value = 0x11; // 00010001 | |
| var mask = 0xFF; // 11111111 (flip everything; make a mirror) | |
| var result = value ^ mask; // 11101110 | |
| OutputAsBinary(result); | |
| /* use OR to set bits (to true) */ | |
| value = 0x11; // 00010001 |
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 Employee : Aggregate | |
| { | |
| private readonly IAccountService _accountService; | |
| // all mutable properties are private there is no reason to expose these as properties | |
| // in the write model | |
| private string _firstName; | |
| private string _lastName; | |
| public Employee(IAccountService accountService) |
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 void CatchUpSubscription( | |
| string streamName, | |
| int lastSeenIndex, | |
| Action<EventInfo, int> processAction) | |
| { | |
| _processAction = processAction; | |
| int? startIndex = lastSeenIndex; | |
| if (lastSeenIndex == -2) | |
| startIndex = null; |
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 TryParseFactory | |
| { | |
| public delegate bool TryParseDelegate<T>(string s, out T result); | |
| private readonly Dictionary<Type, Delegate> _tryParsers = new Dictionary<Type, Delegate>(); | |
| public TryParseFactory() | |
| { | |
| Register<Guid>(Guid.TryParse); | |
| Register<int>(int.TryParse); |
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
| internal class DelimitedFieldLexer : IFieldLexer | |
| { | |
| private const int NoData = -1; | |
| private const int Delimiter = -2; | |
| private const int Initialized = -3; | |
| private const int EndOfLine = 0x0A; | |
| private const int WindowsEndOfLine = 0x0D; | |
| private const int Quote = 0x22; | |
| private const LexingState BreakCondition = LexingState.NoData | LexingState.EndOfLine |LexingState.StartingNextField; |