Joining SQL tables with different collation

This will be a very short read but I think someone can find this post useful in the future (probably that will be me) because there are a lot of misguiding answers out there. I’ll show one practical example on where you can hit this TSQL problem and an easy solution on how to resolve it.

simpsons.jpg
* absolutely no clue what image to attach to this post so we might go with this one until better idea comes up *

The problem

We need to retrieve only the from T1 table in the DB1 database and join them with the T2 table  in the DB2 database by the T1.Name and T2.Name with the condition that T1.Name needs to starts with T2 name we need to run this query. Read More »

Advertisements

Golden award for dividing The Kingdom

In the last few months I didn’t have much spare time for writing posts on this blog or maybe I was just being lazy. But that doesn’t mean that nothing interesting was happening during this period. So the next few post will be some “retro” stuff from the previous months and I think deserve to be published here. This post will be about the “Digital Gold” Codility challenge.

DivideTheKingdom

I got a “Golden Award” for this solution so here are the details about the challenge task:

An old king wants to divide his kingdom between his two sons. He is well known for his justness and wisdom, and he plans to make a good use of both of these attributes while dividing his kingdom.Read More »

Those who can’t farm – make farmland fields algorithms

Farming is something that I want to do in the future, farming with using technology and robots and… but I’ll write about that in some other occasion. One of the latest Codility challenges  was farmland sprinklers arrangement problem and finding an optimal way to do that. Besides that I got algorithm mind challenge this time I got inspiration and made me daydream about the possibilities in farming with using technology.

SprinklersArrangement.png

So here is what you need to do in order to help Joe the Farmer.
Joe the Farmer owns a square plot of farmland whose sides are of length N. The land is split into N rows and N columns of equal size, so that there are N2 identical square fields within the farmland. Read More »

Migrating SignalR from ASP.NET Web API 2 to Self Hosted Server (Part 3)

This is the last one of the series I’ve planned about SignalR, this time I’ll demonstrate how can we migrate the SignalR system that we previously created to a self hosted server and in that way have a very light weight server application that will have all the functionalities that we need and nothing more than that. The point is to get the exact same behavior of the server as we had it when we build it with WebAPI2.

SelfHostedSignalR.png
Photo Credit Code Project 

In a case you missed the first two posts please review them here
Part1: SignalR, what is happening under the hood
Part 2: How to build chat server and client with SignalR and ASP.NET WebAPI 2Read More »

How to build chat Server and Client with SignalR and ASP.NET Web API (Part 2)

So here we go we the second part about using SignalR where I’m going to show you a practical example on how to build a SignalR based chat system, how to build the client and how to build the server. In case you missed the first part about SignalR and want to discover more on what is happening on a lower level please check my previous article SignalR: What is happening under the hood (Part 1).

ChatClients.png

The code is available on GitHub and the solution currently contains two projects, one for the client implementation and one for the server implementation. Later, I plan to add another project here for the self-hosted server and we’ll use the same client but this time using this server.Read More »

SignalR: What is happening under the hood (Part 1)

SignalR provides us the possibility of real time, two way communication between the browser (or any other client) and our server. There are many possibilities on what can you do with this technology, many advantages that you can use, I don’t want to be too wide in one article so I plan to write three of them starting with this one. Here I want to write more about SignalR, what is happening under the hood  and describe some of the main components when building a system on top of it. But what is theory without practice?

signarlRSystem.jpg

That is why, in the second article, I’m going to make sample demo on how to implement SingnalR in your Web API 2 server and also make sample client that will communicate with that server.Read More »