Category Archives: Uncategorized

WPF – pass multiple parameters to a Command

Posted in Uncategorized | Comments Off on WPF – pass multiple parameters to a Command

Linq – difference of two collections

I’ve recently worked on some ETL tasks where there is a requirement to to show what has changed between different versions of datasets. LINQ and a custom IEqualityComparer eats this problem for breakfast:

Posted in Uncategorized | Comments Off on Linq – difference of two collections

Streaming data with WCF

WCF defaults to buffering the entire message before transmitting. It is possible to stream your data so data can start to be processed on the server or client before it entirely transmitted. Comprehensive documentation can be found on Set server … Continue reading

Posted in Uncategorized | Comments Off on Streaming data with WCF

How to setup a MetaDataExchange endpoint with a WCF net.tcp binding

Create a host application, such as a Console Application for easy testing Add a reference to System.ServiceModel Add a service interface such as : Add a service implementation : Host the service as you wish: And a minimal app.config file … Continue reading

Posted in Uncategorized | 1 Comment

Showing a TextBox Watermark in WPF

Read all about it

Posted in Uncategorized | Comments Off on Showing a TextBox Watermark in WPF

Moq – Return different results for each call

More for my own recall than anything, but this feature of Moq that I hadn’t seen before solved an issue. If you need to return different results on each invocation of a method: Moq SetupSequence

Posted in Uncategorized | Comments Off on Moq – Return different results for each call

CouchDB QuickStart

I’m a complete CouchDB novice. Here is what I learnt in the first few hours. What is it? tldr – It’s a document database, that heavily uses http for querying and administration Installation Setting up a dev environment on a … Continue reading

Posted in Uncategorized | Comments Off on CouchDB QuickStart

My git command line cheatsheet

An extension of my short term memory: revert changes to file git checkout <filespec> create a new local branch and switch to it git checkout -b <branch_name> create a new local branch git branch <branch_name> switch branch git checkout <branch_name> … Continue reading

Posted in Uncategorized | Comments Off on My git command line cheatsheet

My Emacs Cheatsheet

I’ve been taking a look at emacs – this is my brain dump so far – mainly taken from the in-built tutorial Navigation Move forward a page Ctrl+v Move backward a page Meta+v Move to next line Ctrl+n Move to … Continue reading

Posted in Uncategorized | Comments Off on My Emacs Cheatsheet

SQL – find by text

Many moons ago (at least 18 months ago), I had a stored procedure that let me search for text in DML in the databases. Yeah, so I could search for “Order” and it would find all mentions in SPs, functiosn … Continue reading

Posted in Uncategorized | Comments Off on SQL – find by text