Hello Devz, Here is a simple tutorial of how to use ML.Net to make a prediction based on regression. ML.Net is an open source and cross-platform machine learning framework. A regression is a statistical method to find the relation between variables. Let’s use a budget context. We have a list of expenses with a cost […]
C# – Decision Tree – Simple Example
Hello Devz, Sometimes it is hard to take a decision. And to represent the possibilities of complex decisions, it is usefull to use a Decision Tree. Instead of having all the parameters at once, you can simply take small decision at a time and then go further. In this simple tutorial we will show an […]
C# – Calling OMDB WebService with an API key – Get movie information
Hello Devz, Do you know Open Movie Database (OMDB)? It’s like IMDB but providing an API to get information about any movie or TV show. OMDBAPI is free but limited to 1000 request per day. First you must generate your API Key via this page http://www.omdbapi.com/apikey.aspx You will receive your personal key via email. Don’t forget to […]
C# – SQLite and Entity Framework – Quickstart
Hello Devz, SQLite as a SQL Engine Database became a standard a few years ago already. As it’s name says: it’s lite, and it doesn’t require a dedicated server. Cheap and performant, what else? At the end of this simple tutorial you will be able to setup the minimum requirements to use SQLite with Entity […]
C# – Consume a WebService – Check VAT number from european commision
Here is a simple example of how to consume a WebService in a console app with C#. For this tutorial, we will use the free service from the European commission you can use to validate tax (VAT) number. Here is the web interface: http://ec.europa.eu/taxation_customs/vies/ First of all, create a new console application (named CheckVat) and add a new […]
WPF – ItemsControl and TemplateSelector
Let’s say that you want to create your UI but in a dynamic way. Imagine a view which is based on a list of items you want to display. But this list can vary (depending on rights, or context). In this simple example, we want a label with a textbox, then a checkbox. We can do […]
WPF – Paste Clipboard content from Excel to a GridView
Hello Devz, Manipulating the clipboard content is pretty easy. But it can become handy when pasting it in a GridView. Here a simple example on how to paste the content of the clipboard from Excel to a GridView. First things first! Here is how to use the clipboard: var clipboardContent = Clipboard.GetText(); Obviously you could use […]
WPF – MVVM TextBox Validation with IDataErrorInfo
Hello Devz, This post will describe how to do a simple MVVM TextBox validation with IDataErrorInfo. UI Data Validation is an important part of the FrontEnd creation. The FrontEnd should always be backed up by the BackEnd validation! But here we will focus only on the FE part. Before showing the code, you have to […]
WPF – Enum Binding With Description in a ComboBox
Hello Devz, In my two previous posts, I was talking about how to bind an enum (the classic way and the other way). But these have two major issues. First, all the items from the Enum will be bound and displayed. And sometimes you don’t want to display all of them (like ‘None’). Secondly, you […]
WPF – Enum Binding in a ComboBox – The Other Way
Hello Devz, In a previous post I was talking about the fact that there is no “out-of-the-box” solution to bind an Enum to a ComboBox. And I described the WPF way of doing it with the ObjectDataProvider defined in the XAML. Here is another way, more code oriented than XAML. This is the XAML part: […]