Skip to content

Instantly share code, notes, and snippets.

View akovac35's full-sized avatar

Aleksander Kovač akovac35

View GitHub Profile
@prichelle
prichelle / gist:3edb6373a4995ada4f6d
Last active November 5, 2019 10:12
Tree (ExceptionList) serialization (BLOB) in LocalEnvironment using ESQL ASBITSTREAM FUNCTION
-- Create a folder "ExceptionList" in the LocalEnvironment tree. This Folder will hold the BLOB representation of the ExceptionList
SET OutputLocalEnvironment.Variables.BitStream.Info = 'exceptionList';
-- Define a XML parser element to be used to serialize the ExceptionList into bitstream
CREATE LASTCHILD OF OutputLocalEnvironment.Variables.BitStream DOMAIN('XMLNSC') NAME 'XMLNSC';
-- Attach or create the tree that has to be serialized under the XML parser element. here it is the ExceptionList
SET OutputLocalEnvironment.Variables.BitStream.XMLNSC.ExceptionList = InputExceptionList;
-- Create the BLOB representation of the ExceptinList using the function ASBITSTREAM
SET OutputLocalEnvironment.Variables.BitStream.BLOB =
ASBITSTREAM(OutputLocalEnvironment.Variables.BitStream.XMLNSC.ExceptionList OPTIONS FolderBitStream);
@luismts
luismts / GitCommitBestPractices.md
Last active November 14, 2024 08:28
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@SteveSandersonMS
SteveSandersonMS / Customer.cs
Created September 4, 2019 10:48
Blazor + FluentValidation example
public class Customer
{
public string FirstName { get; set; }
public string LastName { get; set; }
public Address Address { get; } = new Address();
public List<PaymentMethod> PaymentMethods { get; } = new List<PaymentMethod>();
}
public class Address
{