Posts

Showing posts from February, 2018

How to disable a network connection from Control Panel

Image
Step 1: Open Control Panel Step 2: Navigate to Control Panel\All Control Panel Items\Network Connections In Control Panel\All Control Panel Items\Network Connections Step 3: Select Disable

Navigating between views in WPF / MVVM

Image
I have long been searching for a hard and fast way of navigating between views in an MVVM / WPF environment. For some time I have been using ways that either did not completely avoid code-behind or had violated the spirit of the MMVM pattern somewhat. Thanks to Rachel Lim's excellent blog post , I think I have nailed down a way of accomplishing this in a way that I am happy with. I have created a minimalist application application that utilises Rachel Lim's MVVM based pattern in conjunction with the Mediator pattern to enable us to switch from one view to any other view as and when desired. Update : A more recent post dispenses with the need to use a mediator pattern as a means of passing data between screens and navigating between them. This version uses dependency injection instead, which I consider to be a huge improvement when it comes to maintaining SOLID principles, scalability, ease of unit testing etc.: https://www.technical-recipes.com/2022/navigating-b...

How to disconnect your Visual Studio 2015 project from Team Foundation Server (TFS)

Image
Here's how: In Visual Studio with the project you'd like to disconnect already open, select File > Source Control > Advanced > Change Source Control... Select on the specific project you would like to disconnect and select the 'Unbind' option. (Some names/titles have been redacted for confidentiality) That project will then be unbound from TFS:

Applying Ant Colony Optimisation to travelling salesman problems in C#

Image
Some results of applying a C# / WPF implementation of the ant colony optimisation algorithm to the travelling salesman problem (TSP). My initial observation is that it finds fairly reasonable solutions within a given number of iterations, but falls short of algorithms such as two-opt, Lin-Kernighan etc. The software is built around the Model-View-ViewModel (MVVM) architecture, thereby keeping the graphical display and data separate. For an explanation of the ant colony algorithm see the Wikipedia page . Edge selection Each ant iteratively finds a path from the source node, visiting every other node until it reaches the start node again. The intermediate solutions (node choices) are referred to as solution states. At each iteration, each ant moves from a state x to state y, corresponding to a more complete intermediate solution. Thus, each ant k computes a set of feasible expansions to its current state in each iteration, and moves to one of these in probability. ...