Welcome to Duracellko.NET

Quantum Computing and Nondeterminism

Some time ago, I set out on a journey to understand "What kinds of problems can quantum computation solve efficiently?" I decided to write a series of blog posts to explain this as simply as possible. In previous posts, I discussed the qubit and measurement. In this post, I will finally answer the question. The most common answer is, "It can run computations in parallel." However, as I showed in the previous post about measurement, that is not exactly true. A quantum computer cannot simulate a computer with the enormous number of processors. However, it can simulate a different kind of machine in some special cases: the Nondeterministic Turing machine.

Read more...

Quantum Computing measurement

This is the second post in my journey to discover "What kinds of problems can quantum computation solve efficiently?" In the first post, I explained what a qubit is and how it can be represented. In this post, I will cover measurement in (not only) quantum mechanics. You have probably heard that when measuring a qubit, it collapses to one of the measured states and loses its actual value. This led me to some natural questions: What is the difference between measurement and any other operation? How does a qubit know it is being measured?

Read more...

Quantum Computing - qubit

When I asked the question, "What makes quantum computation more powerful?" or "What kinds of problems can quantum computation solve efficiently?", the usual answer was, "It can run computations in parallel." While this is perhaps the most accurate single-sentence answer, I find it both inaccurate and misleading. A few years ago, I began my journey studying quantum computing. My background is in computer science, so my main interest was to understand the problem space that can be solved more efficiently by quantum computation. I did not study physics beyond high school, and my goal was not to delve deeply into quantum physics. In the next few blog posts, I will attempt to provide a better explanation to the question, "What kinds of problems can quantum computation solve efficiently?"

Read more...

Window icon in WinUI 3

When developing a Windows application using WinUI 3, by default it displays default Windows icon in taskbar: Default Windows application icon Changing this icon is a little bit more complicated than in other .NET UI frameworks. In WinForms and WPF Window class has Icon property. And these frameworks have classes to work with icon objects. Universal Windows Platform application doesn't have window under control and the platform automatically sets the icon from application assets.

Read more...

Round-lot validation (part 4)

In my previous blog post I was writing about round-lot validation on data type decimal in .NET. I presented that the implementation using simple division of the numbers does not return any false-negatives. It means that the function never returns false, when a value fits into a round lot. However, it can return false-positives. It means that the function may return true, when the value doesn't fit into the round-lot. I also presented a small update to mitigate false-positives, but we didn't eliminate them completely.

Read more...

Round-lot validation (part 3)

Recently I was implementing a validation checking that a number entered by user fits into a configured round-lot. And I decided to write few blog posts about it. In the previous post I presented implementation of the function for data type double. And in this post I will focus on decimal data type.

Read more...

Round-lot validation (part 2)

Recently I was implementing a validation checking that a number entered by user fits into a configured round-lot. And I decided to write few blog posts about it. In the previous post I described the problem and created naive implementation that didn't work in some cases. And I presented implementation that should handle those cases, but there is unanswered question about acceptedError.

Read more...

Round-lot validation (part 1)

Recently I was implementing a validation checking that a number entered by user fits into a configured round-lot. For example when the round-lot is 2 then only even numbers are allowed values. Other examples would be:

Read more...

Hosting both Blazor Server and WebAssembly in single website

Blazor framework supports 2 types of hosting and running of Blazor application. Blazor Server runs application on server inside ASP.NET Core application and only exchanges HTML fragments and events with client. And Blazor WebAssembly runs application completely inside web browser and in some cases does not need server at all. What if you want to use both models in the same application and run different type based on client device type.

Read more...

Configure Blazor app from server

Microsoft recently release Blazor WebAssembly 3.2.0 Release Candidate. This version includes configuration of an application by appsettings.json configuration file.

Read more...