Use Conventional Commits format:
<type>: <description>
[optional body]
[optional footer]
Use Conventional Commits format:
<type>: <description>
[optional body]
[optional footer]
| -- Check the BlkBy column | |
| EXEC sp_who2 | |
| -- Get all requests that have blocking sessions | |
| SELECT * | |
| FROM sys.dm_exec_requests | |
| WHERE DB_NAME(database_id) = 'YourDBName' | |
| AND blocking_session_id <> 0 | |
| -- Get the queries themselves |
| var before0 = GC.CollectionCount(0); | |
| var before1 = GC.CollectionCount(1); | |
| var before2 = GC.CollectionCount(2); | |
| var sw = Stopwatch.StartNew(); | |
| // Do... | |
| sw.Stop(); |
| [ServiceContract] | |
| public interface IMyService | |
| { | |
| [OperationContract] | |
| Task DoExpensiveOperation(Guid requestId); | |
| [OperationContract(IsOneWay=true)] | |
| void CancelExpensiveOperation(Guid requestId); | |
| } |
| function forEach(array, asyncAction, callback) { | |
| var size = array.length; | |
| var count = 0; | |
| var nextLoop = true; | |
| array.forEach(function (item) { | |
| if (nextLoop == true) { | |
| asyncAction(item, function (err) { | |
| if (err) { | |
| nextLoop = false; |
| // https://lostechies.com/jimmybogard/2008/08/12/enumeration-classes/ | |
| public abstract class Enumeration : IComparable | |
| { | |
| private readonly int _value; | |
| private readonly string _displayName; | |
| protected Enumeration() | |
| { | |
| } |
| // References | |
| // https://www.visualstudio.com/get-started/package/nuget/publish | |
| // https://docs.nuget.org/create/creating-and-publishing-a-package | |
| // https://docs.nuget.org/Create/using-a-gui-to-build-packages | |
| // Accesing NuGet folder | |
| cd {NuGet.exe folder} | |
| // Packing from a .csproj file | |
| nuget pack {relative file name}.csproj -Prop Configuration=Release |
| // http://www.codeguru.com/csharp/.net/net_data/sortinganditerating/article.php/c10993/SystemTransactions-Implement-Your-Own-Resource-Manager.htm | |
| // https://msdn.microsoft.com/en-us/library/ms229975(v=vs.85).aspx | |
| public class VolatileRM : IEnlistmentNotification | |
| { | |
| private int memberValue = 0; | |
| private int oldMemberValue = 0; | |
| public int MemberValue | |
| { |
| /// <summary> | |
| /// Abstraction for an easier Disposable pattern implementation. | |
| /// Consumers should override the DisposeManagedObjects and DisposeUnmanagedObjects | |
| /// to dispose the desired objects | |
| /// </summary> | |
| /// <remarks>https://msdn.microsoft.com/pt-br/library/fs2xkftw(v=vs.110).aspx</remarks> | |
| public abstract class Disposable : IDisposable | |
| { | |
| protected bool disposed = false; |
| // Basic unitOfWork pattern as described by Martin Fowler (http://martinfowler.com/eaaCatalog/unitOfWork.html) | |
| // Other methos as 'registerNew' are going to be managed by each repository | |
| public interface IUnitOfWork : IDisposable | |
| { | |
| void Commit(); | |
| Task CommitAsync(); | |
| void Rollback(); | |
| } | |
| public interface IUnitOfWorkFactory |