How to fix the ArgumentException “Value does not fall within the expected range” when working with an image

Today I tried to reuse the image splitting feature in my program ShrinkerImages. Only with a single image, namely a photo from my Lumia 435. However, it was the first time I actually came across an image with a lower DPI than the usual 96. If an image has a DPI other than 96 (I …

Read More How to fix the ArgumentException “Value does not fall within the expected range” when working with an image

Web Ants Finished

After a long break, I finally brought myself to program something in Dart again. Working with Dart Editor is still a test of nerves. Looks are subjective, but even TypeScript in VS seems more comfortable to work with than Dart in Dart Editor. Not to mention that 8GB of RAM is not enough for it: …

Read More Web Ants Finished

How to Create a Column with a Configurable Floating-Point Type in SQL Server

At first I tried it with a column of type Real, so the column definition was, for example, Column(1,1), but that always gave me an error “Parameter or variable ‘Column’ has an invalid data type.”. So I tried it with the Decimal data type instead. In general, let’s take the column definition Column(2,1) as an …

Read More How to Create a Column with a Configurable Floating-Point Type in SQL Server

How to Stop IntelliSense from Turning Off in Visual Studio

It is a bit puzzling that deleting or renaming a single (in my case empty) folder helps, but it really does. I wrote the simplest possible CMD script for it so that it is as convenient as possible for you. So open the Command Line as administrator and run this command: rename “C:\Users\Radeksunamo\AppData\Roaming\Microsoft\VisualStudio\10.0” “10.0_OLD” from …

Read More How to Stop IntelliSense from Turning Off in Visual Studio

How to Add an Icon to a Console Application (C#)

Add references to these 4 assemblies to your console application: PresentationCore, System.Drawing, System.Xaml and WindowsBase. This is how you add the PresentationCore assembly, just press OK! The file(s) containing these classes must include the following using directives. They are the ones present in Program.cs after creating a console application, plus the ones I added via …

Read More How to Add an Icon to a Console Application (C#)