Author Archive

C# – how to iterate through an enum

Frequently I find I wish to iterate through an enum type to add items to a list or do something with each item. Doing so is simple, but remembering how causes a good few minutes of Google searching, so this post is here as an aid to my memory the next time I wish to

PHP Laravel – emptying database during seeding with foreign key constraints

It was little over a decade ago when I first began my developing career in some of the most basic of web-based projects. Back in those days, I was primarily based in web-development for a variety of projects including DW4N and a range of forums. In this challenge, PHP was my primary language of use,

C# adding reference error – Checking a C++ DLL is valid for a C# project

DLLs compatible with C# projects can either be managed or unmanaged. However, if they’re unmanaged, they cannot be included in the project using the standard References->Add Reference->Browse->OK method, as only managed DLLs can be added in .net applications in this method. To add unmanaged DLLs you need to use a form of DLLImport, which I

How to install OpenCV – Windows machines

Since 2012 when I first conducted an OpenCV project as part of my Bachelor’s dissertation at Keele, I have ended up having to install OpenCV about 4 times on various computers. Today is yet another occasion where the need for an installation of OpenCV has been necessitated but, because of the length of time between

Experience, exposure, or just plain exploitation?

If you’re a programmer, you might be used to people asking you how easy it is to develop a game, or code up a website. Sometimes they might ask for advice, or ask if you could help them out with an idea they’ve got. I’ve experienced it and seen it a fair few times in

Using Evidence-Based Design to Improve Pharmacy Department Efficiency

The Engineering Doctorate is very similar to an ordinary PhD in that we produce and publish academic papers in conferences and journals. The process of peer review helps ensure novelty and impact in new knowledge and keeps academic output to a high standard (in most cases). As part of my EngD, I have been lucky

Preventing Excel.exe from hanging when using the Microsoft Excel Interop DLL with C#

So it’s been a bit quiet around here recently because I’ve been mostly working on a client project at the office which hasn’t included anything onerous that I felt a quick post would be useful to aid future development. Until now. Part of the work I’ve been completing has included working with Microsoft Excel through

C# WPF – text box is not editable?

In my current work in the c#/WPF environment, I’ve had a need to create a new pop-out window with a load of text boxes and labels programmatically depending on a previous input. However, when I ran the code, the text boxes were not selectable, editable or changeable in any way. They just sat there, visible,

Calculating a log normal value from an average and standard deviation

It’s been a bit quiet round here recently due to project work at the office primarily with little Grasshopper work and little in the way of interesting snippets. However, one which I’ve decided to put here for future use is a function to calculate a log normal value from a given average and a given

A look back at 2015

With 2015 now well and truly over, I thought it might make for a good reflection to look back at how 2015 went in terms of the EngD, and prepare some goals for 2016 to measure a successful year. This way, when it comes to the end of 2016, I can look back and see