Web Log

Server-side, client-side, code snippets, scripts, automation, best practices, proven approaches, tips & tricks...

Multiple console output in C#

Write console output to file and screen at the same time
 
0
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
0
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

Auto realod application config in .NET

Reflect config file changes in application in a runtime
 
0
In .NET working with configuration is really easy and there are bunch of .NET classes that rely on config values so you do not have to specify values in their constructors. For me it a common practice to instantiate database connections of WCF client by only creating an instance with parameterless constructor while keeping values in config file. In case you have to use these kind of classes in a long running process, like windows service on which other processes are depending on ... read more

Easy and simple way to bind ADO object to POCO object

Simple one way binding of ADO database objects to POCO
 
0
This article is base don the article I wrote in September last year. Basically I wrote this piece of code because I needed something really lite for one way binding. There are a bunch of light ORMs and ORM-Like solution, but both of them provide two way binding, but for me insert/delete/update commands were already handled by stored procedures as it was an existing solution which needed some new features, so I needed something to make reading a lot easier ... read more

Working with GoogleMaps in jQuery style

jQuery plugin for GoogleMaps
0
I've used GoogleMaps on several web projects and it seemed to me that I'm repeating a lot of code used in the previous projects which lead me to write a common Javascript library to help me easily reuse the code by only copying the JavaScript library to a project or referencing it from CDN. I could not think of a better way to build this library than to use jQuery and build a pligin for this. ... read more

JavaScript

read more

Umbraco CMS

read more

.NET

read more

SQL/T-SQL

read more