Skip to main content

WPF – Enum Binding in a ComboBox – The Cla

Enum binding to combobox

Hello Devz, I had to write this post about how to do an Enum binding to a ComboBox, because everytime I need it, I’m surprised there is no “out-of-the-box” solution provided in WPF or Xamarin.Forms.

Please notice this line: xmlns:sys=”clr-namespace:System;assembly=mscorlib” And the ObjectDataProvider in the Window.Resources. With a simple Enum called StatusEnum:

So this was the […]

C# – Aspose.Cells – Create Excel files wit

Excel plus Aspose

Hello Devz, It is common to have to export data to an Excel file. But sometimes the code have to run on a server where Excel is not or can’t be installed. And anyway, to be honest the Excel Interop is a real piece of crap to use… So Aspose did a good work by […]

C# – SI prefixes for metric units – becaus

units - SI prefixes

Sometimes you will have to play with numbers, BIG numbers… Or teeny-tiny ones! To avoid having too many zeros you can use the SI prefixes (like metric units: mm, cm, m, km, …). Here are the results of our code:

And here is the helper:

Now if you need to specify the decimal separator as a […]

Google Dialogflow – create your own AI in

DialogFlow

Hello Devz, Having a Google Home at home and a Google Assistant in my pocket, I wanted to go further and create my own Actions. Pretty easy with Google DialogFlow! DialogFlow is a free web interface that allows you to create a, wait for it… dialog flow! Let’s say I want to add an expense […]

WPF – PasswordBox Helper

passwordbox

Because security matters, you will need at one point to use a PasswordBox in your WPF application (you know, the textBox hiding the password with stars). But Microsoft didn’t make this control bindable for security reasons (in memory access). So if you’re using MVVM, it will be a bit tricky. Different solutions exist, but really […]

MS SQL – Performance optimisation on the i

sql index

Hello Devz, Today I had an issue with the performance of a SQL stored procedure. This procedure was supposed to delete a few millions rows in a table. But it was quite slow… So after optimizing the query, I looked at the database itself. Having an indexed primary key is important but the level of […]

C# – Web Scraping – a simple HTML Agility

Web scraping with HTML Agility Pack

Hello Devz, Sometimes it can be useful to copy a part of the content from a website. That’s where web scraping is useful and HTML Agility Pack is one of the best tools to do it. In this tutorial, I will show you a simple HTML Agility Pack example. Decide what content you need Say […]

WPF – Inverted BooleanToVisibilityConverte

Hello Devz, WPF is providing a really useful converter called BooleanToVisibilityConverter. But the thing with this converter is that it’s really limited. Let’s say we want to use the same boolean to show one control and collapse another one, we just can’t… Here is new version of this converter that can accept a parameter to […]

Verify vulnerabilities on your WordPress s...

WPScan is a good tool to discover vulnerabilities on your WordPress website. To install it:

Execute the scan on www.example.com:

Happy hacking!  🙂  

Verify common vulnerabilities on your rout...

We will never say it enough, security and privacy are important. But what if your router has an old firmware and is vulnerable to some common exploits? One easy way to test it: RouterSploit. If you are familiar with the well know MetaSploit, it is more or less the same. It’s some kind of a […]