Category Archives: Software Development

programming / coding / software development :: Sql Server + T-Sql, C#, Javascript, Html, Css, Python, Vba, Php, Visual Studio, Asp.Net MVC, Node.js, Office automation … whatever suits my needs

Mitstreiter gesucht für neues Open Knowledge Lab Nürnberg / Fürth / Erlangen

Hack your city!

Die Open Knowledge Labs sind regionale Gruppen von Codern, Datenspezialisten, Journalisten, Verwaltungsmitarbeitern, Designern und Künstlern, die sich regelmässig treffen, um an  interessanten Projekten im Bereich Offene Daten zu arbeiten. Sie entwickeln Apps, die informieren, die Gesellschaft positiv gestalten helfen und die Arbeit von Verwaltung und Behörden transparenter machen sollen.  

Die OKLabs sind Teil von Code for Germany, einem Programm der Open Knowledge Foundation Deutschland, das Entwicklungen im Bereich Transparenz, Open Data und Bürgertechnologien fördern will. Die lokalen Labs sind Teil eines internationalen Netzwerks aus Mentoren und Gleichgesinnten. Mehr Infos:

read more

MongoDB Browser Admin Console not starting

When installing MongoDB as a service on my Windows development machine I had the issue that the Admin Console under localhost:28017 threw Err_Connection_Refused. After some research I learned, that you need the –rest option when configuring the service on the command line, like so:

 The installation guidelines for running MongoDB as Windows service unfortunately omit the –rest option.


MongoDB Http Interface Manually Create a Windows Service for MongoDB

read more

How to html-encode special characters in T-SQL

When talking to people other than DBAs you need to transport the message contained in your data. Marketing or sales people expect formatted output and the only way to process query results for database mail is to transform them to html. Unfortunately there is no inbuilt function to html-encode special characters in T-SQL. So I decided to work on a semi-complete solution written natively in T-SQL ...

Generating a date sequence in T-SQL using a numbers table

This is a follow-up to my article How to generate a date sequence in T-SQL.

In my experience, it is frequently required to map data to points  in time – display data on a periodic schedule, aggregate access log data by time intervals and so on. It goes without saying that this mapping should be handled as quick as possible. Of course performance matters.

In my previous post I discussed a method to generate these time points on-the-fly. Here I present a full solution for pre-generating a number sequence and generate a date sequence from it (which might be stored in a table as well).

read more

How to generate a date sequence in T-SQL

If you ever had the pleasure to run queries over an access log I bet you had a desperate need for a date sequence to map query results to.

There are plenty of pages out there discussing the best way to create and populate number tables. After reading this great post on stack overflow I came up with a slight variation of one of the solutions mentioned there, like so:

This returns 273 records with dates from  Jan, 1 2014 to Sep, 30 2014.

The advantages of this solution are:

read more

npm and bower integration in Visual Studio

It took me some time to grasp the idea about how to use npm and bower in Visual Studio node.js projects, given the fact that Nuget is such a great package manager for this environment. From an perspective it would be preferable to use just a single tool for package management and load javascript libraries the same way we load .Net libraries. After all this is how you do it in the context – loading bootstrap, jquery etc via Nuget or using a preconfigured project template with all required javascript libraries, css files and so on.

read more