Archive for September 2015

Authentication via headers
Simple Web API authentication using request headers
Authentication in web services is a bit more different than with web pages because of one simple reason. There is no UI for entering credentials to authenticate to consume service... read more
Parallel infinite loop in C#
Using Parallel for infinite loop in C#
In .NET framework 4.5 Task Parallel Library of TPL is introduced. It is the same thing as Threading but in additional layer of abstraction... read more
Easy collection comparing in C#
Copmare collections in C# the easy way
Collections are part of pretty much any application and they are convenient to store any type of data. Introducing LINQ in .NET things got a lot easier as your code does not need to be full with loops for performing simple operations on collections of any type... read more
Multiple console output in C#
Write console output to file and screen at the same time
Console applications are the simplest one and very convenient when you need to quickly test some functionality. Some time the functionality that you test with console application may take time and since it is test usually it happens that it crashes... read more
Parse date of Facebook OpenGraph API response with JavasScript
Converting datetime string from Facebook API response to JavaScript Date object
Recently I had an issue while working on an update for my Facebook Album Browser plugin with dates returned from Facebook OpenGraph API. The dates are returned in the following form 2011-06-13T23:31:19+0000 and luckily for me, converting this string to an actual Date object in JavaScript worked pretty well for most of the browsers, but some of them like Safari on iPad did not know to convert this string to a Date object and because of that I was getting default JavaScript date 1970-01-01 00:00:00 UTC+00. After some time spent googling and checking regular expressions, I did not find a suitable solution for this. ... read more