SQLxD Part 10 — WHERE and tests

This is the tenth part of the SQLxD series. For your convenience you can find other parts in the table of contents in Part 1 – XML Transformation Today we are going to test our code. First, we need to have some mocks:…

SQLxD Part 9 — WHERE and LIKE operator

This is the ninth part of the SQLxD series. For your convenience you can find other parts in the table of contents in Part 1 – XML Transformation As the last predicate we implement LIKE operator. It is not that simple so the…

SQLxD Part 8 — WHERE with joined predicates

This is the eighth part of the SQLxD series. For your convenience you can find other parts in the table of contents in Part 1 – XML Transformation We continue implementing the predicates. Today we will join them to construct logic expressions. In…

SQLxD Part 7 — WHERE with simple predicates

This is the seventh part of the SQLxD series. For your convenience you can find other parts in the table of contents in Part 1 – XML Transformation Last time we saw how to handle FROM clause. Today we are going to implement…

SQLxD Part 6 — FROM

This is the sixth part of the SQLxD series. For your convenience you can find other parts in the table of contents in Part 1 – XML Transformation We already know how to transform XML nodes into SQL-like rows. Now it is time…

SQLxD Part 5 — Generating columns

This is the fifth part of the SQLxD series. For your convenience you can find other parts in the table of contents in Part 1 – XML Transformation We already have the model, can parse XML document, and know how to refer to…

Capturing Azure Webapp application log in Azure Log Analytics

Let’s assume that you have webapp deployed as an app service in Azure. It would be great if we could utilize Log Analytics to capture logs. Currently it is possible to capture various types of details: Windows metrics, infrastructure logs etc., however, Log…

Capturing thread creation to catch exceptions

Unhandled exceptions crashes application domain which in turn crashes whole process. What if we want to create some background job and handle its exceptions? We can create tasks and add continuation for failure, we can use asynchronous code and catch exceptions in place…

How to override sealed function in C# Revisited

Clickbait title once again. We have already seen how to override sealed function which we did by performing jump to other method. Today we are going to do that by rewriting CLR metadata. Method descriptor Each method descriptor contains address of function machine…

ILP Part 46 — Gray Code

This is the forty sixth part of the ILP series. For your convenience you can find other parts in the table of contents in Part 1 – Boolean algebra Hi. Today we are going to generate Gray code using ILP. I am not…

ILP Part 45 — Deadline 24 2017 Election

This is the forty fifth part of the ILP series. For your convenience you can find other parts in the table of contents in Part 1 – Boolean algebra Today we solve Election task from Deadline 24 2017 using ILP. You can read…

SQLxD Part 4 — Selectors

This is the fourth part of the SQLxD series. For your convenience you can find other parts in the table of contents in Part 1 – XML Transformation Now we can implement classes representing multi-part identifiers. We start with the following: using System.Collections.Generic;…

SQLxD Part 3 — Model and parsing XML

This is the third part of the SQLxD series. For your convenience you can find other parts in the table of contents in Part 1 – XML Transformation We want to represent nodes in the following way: using System; using System.Collections.Generic; using System.Linq;…

DLL Injection Part 6 — Injecting managed code into specific App Domain

This is the sixth part of the DLL Injection series. For your convenience you can find other parts in the table of contents in Part 1 – Registry In Part 4 we saw how to inject managed DLL and execute some code in…

Debugging WCF high memory usage

Recently I was debugging high memory usage in application written in .NET 4 using WCF. After few hours application was eating almost 8 GB of memory. I made a memory dump and started digging into it. First, statistics of heap (sorted by total…

Browser link injecting into MVC action response

Imagine that you have the following action in MVC 5 controller: [HttpGet] public string GetData() { return JsonConvert.SerializeObject( new JObject( new JProperty(“message”, “Ok”), new JProperty(“data”, new JObject( new JProperty(“value”, “< /body>“) )) ) ); } We create simple object on a fly, serialize…

SQLxD Part 2 — Grammar

This is the second part of the SQLxD series. For your convenience you can find other parts in the table of contents in Part 1 – XML Transformation In order to implement SQLxD database, we need to know, what kind of queries we…

ILP Part 44 — Pizza riddle simplified

This is the forty forth part of the ILP series. For your convenience you can find other parts in the table of contents in Part 1 – Boolean algebra Today we are going to solve Pizza practice problem from Hash Code 2017 contest…

ILP Part 43 — Maximum revisited

This is the forty thrid part of the ILP series. For your convenience you can find other parts in the table of contents in Part 1 – Boolean algebra We have already seen how to implement function in ILP. Last time we used…

SQLxD Part 1 — XML Transformation

This is the first part of the SQLxD series. For your convenience you can find other parts using the links below : Part 1 — XML Transformation Part 2 — Grammar Part 3 — Model and parsing XML Part 4 — Selectors Part…