VisualStudio has problem when multiple versions of Typescript are installed

You can have several versions of Typescript installed on your machine and each project in Visual Studio can be configured to use different version by specifying that version in .csproj file. Like this But you might still have problems with IntelliSense for some native javascript objects. VisualStudio uses file lib.d.ts  to learn interfaces of window objects, events, …

In defence of literate programming

We tend to write code differently when we know that someone will be reading it, don’t we … [Josh Johnston, X-Team] The thing is, you should always try to write (and rewrite) your code so that it is as clear as possible. Not only because of your possible code-reviewer, but also because of yoour future …

Hledám kancelář

PROSÍM O SDÍLENÍ Od 1.1.2016 budu pracovat na volné noze a potřebuji si najít nějakou pěknou kancelář. Nechci být celý den zavřený v kanceláři úplně sám, takže bych se rád k někomu připojil nebo našel někoho, kdo se připojí ke mně. Jsem programátor, takže k práci potřebuji klid na soustředění. Potřebuji také dobré světlo, aby …

How to set VisualStudio 2015 to always run “as Administrator” in Windows 10

You might have the same problem like me after upgrading to Visual Studio 2015. The project could not be loaded because it depended on IIS and to run IIS it needed administration rights. Solution? Run VS as Administrator. Better still? Make sure that it always runs under administrator rights. Just follow these simple steps 1) …

C# Coding conventions

These coding conventions were originally written by my colleagues Filip Kassovic and Michal Třešňák in ST-Software. I have only made slight updates and published it on my blog. Do not use “var” keyword when not necessary var response = SomeClass.SomeMethod(input); Reason we don’t see the type of “response” “Find Usages” or “Find all references” doesn’t find …

Download files via POST request in AngularJs

There are times when you need to download file but the download is initiated via POST request, because the request contains too much parameters to fit into limited GET request. In my case I needed to generate ZIP file. First you need to define custom method on your $resource which will handle the download method, like …

How to write for-loop like code in SQL

I needed to dynamically generate missing items in database. I had a list of Sports and Categories, and I needed to generate items with all combinations of these two entities. But some of them already existed in database, so those should be skipped. My idea was to perform kind of for-each loop iterating over the …

C# – How to find overlap of datetime intervals

I needed to count the overlap of the datetime intervals. After some coding I’ve refactored the code to static class and uploaded to Github, so that others can use it too. It might save you some time 🙂 There are currently two methods. One to get the interval overlap and the other to count the interval …