(-215:Assertion failed) !_src.empty() in function 'cv::cvtColor' with cv::imread

I am trying to recognize text from an image to then have the text outputted; however, this error spits out: > Traceback (most recent call last): File "C:/Users/Benji's Beast/AppData/Local/Pro...

No constructor for type SwaggerGenerator can be instantiated using services from the service container and default values

I'm trying to add Swagger to my project. The error received is as follows. > No constructor for type 'Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator' can be instantiated using services from the s...

25 Dec at 22:30

GraphicsPath AddString not support enough to the font when use right to left language if operating system lower than Win10

I need to `generate an image from a string` in my WPF application, and show it. Here is my code: ``` // Create Image and generate string on it System.Windows.Controls.Image img = new System.Windows.C...

24 Apr at 21:23

SymbolInfo of extension method

I need to analyze some extension method. For example `Enumerable.ToList`. Code sample to analyze: ``` var test = @" using System.Linq; namespace Test { public class TestType { void ...

24 Dec at 21:4

SetActive() can only be called from the main thread

I am stuck with this problem for 3 days, I did a lot of research, but couldn't find any answer, Here is a brief explanation of what is happening, trying to work with Firebase Database and Authenticati...

9 Apr at 10:4

Change return type of a function in WCF without changing interface return type

I'm working on an old WCF service with many interfaces and services for a new system. I want to change return type of functions without changing all service interfaces and implementations as follow: ...

24 Dec at 16:52

How to store session data in server-side blazor

In a server-side Blazor app I'd like to store some state that is retained between page navigation. How can I do it? Regular ASP.NET Core session state does not seem to be available as most likely the...

Flutter: How to change the width of an AlertDialog?

I wonder how to change the default width of an AlertDialog, I only succeeded to change the border radius : Here is my code : ``` showDialog( context: context, builder: (_) => ...

10 Jan at 21:8

Servicestack service not loading

I am lost... What am i missing. I copied a working service and renamed it. the service will not load in service stack. cant access via api and not showing in metadata page... Code follows ``` using ...

23 Dec at 20:36

AppSelfHostBase not resolving

I have service stack in a .netcore xUnit test. I cannot resolve AppSelfHostBase. I downloaded the latest repo of servicestack and its there in the Servicestack namespace. But I cannot resolve it in my...

23 Dec at 02:10

Executing async code on update of state with react-hooks

I have something like: ``` const [loading, setLoading] = useState(false); ... setLoading(true); doSomething(); // <--- when here, loading is still false. ``` Setting state is still async, so wha...

Get HTML Code from a website after it completed loading

I am trying to get the HTML Code from a specific website async with the following code: ``` var response = await httpClient.GetStringAsync("url"); ``` But the problem is that the website usually ta...

22 Dec at 19:10

Add a generic handler for Send and Publish methods of the MediatR library in asp .net core

I use the CQS pattern in my asp.net core project. Let's start with an example to better explain what I want to achieve. I created a command: ``` public class EmptyCommand : INotification{} ``` The ...

24 Dec at 15:55

Calling Action in Razor Pages

as a newbie to Razor Pages I have a question regarding calling methods from Razor Page. - The method `SubtractProduct()` is defined in my domain model. - The Index Page has `IActionResult sell...

ServiceStack.Text model.ToCsv() not wrapping output properties in quotes

Using [ServiceStack.Text](https://github.com/ServiceStack/ServiceStack.Text) to output CSV files from a C# console application. It generates the output for all of the public properties on the model. T...

22 Dec at 05:44

Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe'

Trying to use SQLTypeProvider with postgres I get the following errorwhen running dotnet build > error FS3033: The type provider 'FSharp.Data.Sql.SqlTypeProvider' > reported an error: Could not load...

7 May at 05:45

adb devices => no permissions (user in plugdev group; are your udev rules wrong?)

I am getting following error log if I connect my android phone with Android Oreo OS to Linux PC ``` $ adb devices List of devices attached xxxxxxxx no permissions (user in plugdev group; are your ...

21 Nov at 06:24

.NET Core DI, ways of passing parameters to constructor

Having the following service constructor ``` public class Service : IService { public Service(IOtherService service1, IAnotherOne service2, string arg) { } } ``` What are the choic...

How to migrate Identity users from a MVC5 app to a ASP.NET Core 2.2 app

I have a web app built on MVC5 using Identity. I want to convert this project to a ASP.NET Core 2.2 web app. I created a new ASP.NET Core 2.2 web application with authentication set to Individual User...

21 Dec at 01:7

How can I get the retry count within a delegate executed through Polly retry policy?

I'm implementing Polly to retry requests in my C# web app. My sample code is included in this post. The code works as expected but the last parameter passed to `CreateFile()` (currently hard-coded a...

31 Jul at 10:54

Unity: What's the difference between a PlayMode UnityTest and an EditMode UnityTest?

I'm trying to learn how to write tests in Unity3D, [but the documentation is sparse.](https://docs.unity3d.com/Manual/testing-editortestsrunner.html) You can use `[UnityTest]` on both PlayMode or Edi...

20 Dec at 22:48

.Net Core ConfigureAppConfiguration adding additional sources overriding environment specific settings

When using the IConfigurationBuilder in a .NET Core 2.1 application with a Generic Host I configure 4 sources; but after the scope of ConfigureAppConfiguration there are 6 sources. At some point 2 a...

ASP.NET Core: AddEnvironmentVariables doesn't load variables

I have an `asp.net core` application (`.NET Core 2.1`). There is a code in `ConfigureServices` method in `Startup` class: ``` Configuration = new ConfigurationBuilder() .SetBasePath(_hostingEnvir...

Elasticsearch.net - Range Query

I'm trying to query an Elasticsearch index from C# via [Elasticsearch.net](https://github.com/elastic/elasticsearch-net) (not NEST). Specifically, I need to get all documents with a status of "success...

19 Dec at 19:11

Deserializing Elasticsearch Results via JSON.NET

I have a .NET application that I want to use to query Elasticsearch from. I am successfully querying my Elasticsearch index. The result looks similar to this: ``` { "took":31, "timed_out":false, ...

21 Dec at 21:2