The header image for the 'Passing multiple parameters to an ICommand in WPF' post, sorry the platform doesn't allow alt text on headers

Passing multiple parameters to an ICommand in WPF

The project I am currently working on is a sizable line-of-business desktop program written using the WPF framework; a framework I particularly like working with due to its extensibility and ease of design (via XAML).One of the powerful parts of WPF is the ICommand system for binding buttons to ViewModel methods; I won't go into the details of it here as it deserves an article of its own. However one of its basic functions is the ability to pass a parameter from the UI back to the ViewModel's ICommand property, such as the selected item in a data table.…

Read More

The header image for the 'Passing Enumerables to a SQL Stored Procedure' post, sorry the platform doesn't allow alt text on headers

Passing Enumerables to a SQL Stored Procedure

I have been asked the question "Can you pass an enumerable to a procedure?" or "How do you pass a table to a stored procedure" several times in the past. The simple answer is "yes", the slightly more complex answer is "yes, and this is how"!How to pass an Enumerable to a SQL Stored Procedure in .NETAlthough my example code here is in C# the same process applies to other .NET languages.You can indeed pass an enumerable object to your Stored Procedure by using a special type of SQL object called a "User Defined Table Type". UDTTs can…

Read More

The header image for the 'Obtaining the meta data from a SQL Query' post, sorry the platform doesn't allow alt text on headers

Obtaining the meta data from a SQL Query

I recently had a need to find a way of obtaining just the column names returned by a SQL Server Query; the query in question is ad-hoc and entered into an application by the user (in this case my application is a WPF desktop application, and the query is Microsoft T-SQL).…

Read More

The header image for the 'Do you fizz buzz, buzz fizz, or just scratch your head?' post, sorry the platform doesn't allow alt text on headers

Do you fizz buzz, buzz fizz, or just scratch your head?

Over the years I have interviewed a lot of developer candidates and given advice to a fair few potential developers who are looking for their first interviews. Again and again, the FizzBuzz test has cropped up, and I have seen both some fantastic and some not so fantastic answers to the problem. For those who are not aware of what the FizzBuzz test is, here is the standard question: Write a function which prints all the numbers from 1 to 100. But when printing a number which is a multiple of three print the word "Fizz" instead of…

Read More

The header image for the 'Hello Monkey' post, sorry the platform doesn't allow alt text on headers

Hello Monkey

Meet Fred (that's what I'm calling him); he was sat at the back of his cage at Bristol Zoo Gardens when I went to take a photograph of him. He spotted my camera and decided he wanted a better look, in the process of examining my camera he struck a pose for me! Fred is a Brown Spider Monkey who lives in the Monkey Jungle at Bristol Zoo. The Brown Spider Monkey is critically endangered which is the step before being extinct in the wild. They are extremely charismatic and have very strong personalities, they live in small units of…

Read More

The header image for the 'Modern Browser Security Reporting' post, sorry the platform doesn't allow alt text on headers

Modern Browser Security Reporting

I have written a few articles about 'Browser Security Headers' in recent months; I partly wrote them to encourage me to read more on the subject myself but I hope that someone starting off on the subject will find them useful. Rather than write another quick post on the subject I have decided to reference a new training video that Troy Hunt and Scott Helme have recently published on Pluralsight. For those who have not heard of Pluralsight before it is the largest (and in my opinion the best) online training resource for those looking to learn more about technical…

Read More

The header image for the 'How I run melodiouscode.net' post, sorry the platform doesn't allow alt text on headers

How I run melodiouscode.net

Partly for myself and partly for any interested readers I wanted to note down how melodiouscode.net works; what technologies and providers are used and for what purpose. This is not going to be a deep technical article but more of an overview and the basis for some more technical articles in the future.Although this is a just a simple blog (for now anyway!) I have been using it to learn more about the systems that are out there to support and secure a larger website. Much of the work I have done is overkill for a small blog…

Read More