Availability Anywhere Part 2 — Connecting to VPN automatically in Windows

This is the second part of the Availability Anywhere series. For your convenience you can find other parts in the table of contents in Part 1 – Connecting to SSH tunnel automatically in Windows Last week we saw how to configure automatic SSH…

Availability Anywhere Part 1 — Connecting to SSH tunnel automatically in Windows

This is the first part of the Availability Anywhere series. For your convenience you can find other parts using the links below: Part 1 — Connecting to SSH tunnel automatically in Windows Part 2 — Connecting to VPN automatically in Windows Let’s say…

.NET Inside Out Part 13 — Bypassing license checks

This is the thirteenth part of the .NET Inside Out series. For your convenience you can find other parts in the table of contents in Part 1 – Virtual and non-virtual calls in C# Last time we saw how to modify library on…

.NET Inside Out Part 12 — Modifying managed library on an IL level

This is the twelfth part of the .NET Inside Out series. For your convenience you can find other parts in the table of contents in Part 1 – Virtual and non-virtual calls in C# Imagine that you have a managed library which doesn’t…

Concurrency Part 10 — Reentrant mutex

This is the tenth part of the Concurrency series. For your convenience you can find other parts in the table of contents in Part 1 – Mutex performance in .NET We have already seen how to implement custom mutex using memory mapped files…

Concurrency Part 9 — Semaphores with custom locks

This is the ninth part of the Concurrency series. For your convenience you can find other parts in the table of contents in Part 1 – Mutex performance in .NET Last time we implemented custom mutex based on memory mapped files. We can…

Concurrency Part 8 — Tracking mutex owner

This is the eighth part of the Concurrency series. For your convenience you can find other parts in the table of contents in Part 1 – Mutex performance in .NET We know how to use global mutexes to synchronize processes. However, there is…

Concurrency Part 7 — Semaphores trickery

This is the seventh part of the Concurrency series. For your convenience you can find other parts in the table of contents in Part 1 – Mutex performance in .NET Last time we examined an interesting behavior of Mutex when it is abandoned.…

Capturing all output in Powershell

Today very simple trick to capture whole output from Powershell. Let’s see those files: 1.ps1

2.ps1

3.bat

4.vbs

5.exe

6.exe

Let’s now run this with powershell:

Okay, we have all STD OUT and STD ERR streams.…

Caching result of any function in C++

Imagine that you are writing a top-down dynamic algorithm. You already represented your dependencies as recursive functions and now you need to figure out how to decrease the memory usage and calculate things in correct order. On the other hand, you can just…

.NET Inside Out Part 11 — Using structs for devirtualization

This is the eleventh part of the .NET Inside Out series. For your convenience you can find other parts in the table of contents in Part 1 – Virtual and non-virtual calls in C# Last time we saw how type markers can result…

Custom memory allocation in C# Part 13 — In-place serialization

This is the thirteenth part of the Custom memory allocation series. For your convenience you can find other parts in the table of contents in Part 1 — Allocating object on a stack Recently Jean-Bernard Pellerin showed nice tricks for binary serialization in…

ILP Part 56 – Factorization benchmarking

This is the fifty sixth 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 benchmark factorization. First, let’s start with the code:

.NET Inside Out Part 10 — Using type markers for low level optimizations

This is the tenth part of the .NET Inside Out series. For your convenience you can find other parts in the table of contents in Part 1 – Virtual and non-virtual calls in C# If you are interested in the topic see the…

Decreasing pain of stolen focus

One of the most irritating thing in Windows is no way to prevent an application from stealing focus. There are multiple questions on Stack Overflow regarding the issue, there are rumors that Microsoft wanted to do something but they cannot detect it reliably.…

Comparing numbers is hard

We know that to compare floating point values we should use epsilon and not just compare bits. We may run into similar issues when comparing BigDecimal in Java:

What is the output? Of course it is false, otherwise I wouldn’t write this…

Custom memory allocation in C# Part 12 — Hiding objects from GC

This is the twelfth part of the Custom memory allocation series. For your convenience you can find other parts in the table of contents in Part 1 — Allocating object on a stack We already know how to allocate memory anywhere on the…

Modifying Android application on a binary level

Recently I had to modify an existing Android application for which I didn’t have a source code, only APK file. This may sound like an impossible task but actually it is pretty easy (very tedious, though). I didn’t want to use any compilers…

Machine Learning Part 8 — Backpropagation in neural net in SQL

This is the eighth part of the ML series. For your convenience you can find other parts in the table of contents in Part 1 – Linear regression in MXNet Last time we saw forward propagation in neural net. Today we are going…

Machine Learning Part 7 — Forward propagation in neural net in SQL

This is the seventh part of the ML series. For your convenience you can find other parts in the table of contents in Part 1 – Linear regression in MXNet Today we are going to create a neural net and calculate forward propagation…