How do I check if a type fits the unmanaged constraint in C#?
How do I check if a type `T` fits the `unmanaged` type constraint, such that it could be used in a context like this: `class Foo<T> where T : unmanaged`? My first idea was `typeof(T).IsUnmanaged` or s...
- Modified
- 29 Dec at 12:8
Flutter Error: RangeError (index): Invalid value: Not in range 0..2, inclusive: 3
I am using a long list in Flutter. All the items are rendering fine but I also receive the following error: ``` RangeError (index): Invalid value: Not in range 0..2, inclusive: 3 ``` The following is...
Intellisense for available 'using/import's in C# with Visual Studio Code
Edit: Vidual Studio Code and Visual Studio are 2 different things. Yes it's confusing but I know that VS has this feature, I'm asking about VS . Is there some extension/setting that makes Visual Stud...
- Modified
- 28 Dec at 22:29
How to Fix this C# issue No test matches the given testcase filter `FullyQualifiedName =
I am new to C# and Selenium and I have pretty much made a number of scripts but there comes a problem when I make more than 1 method or more than 1 class single method and single class always runs goo...
- Modified
- 28 Dec at 19:59
Determining which implementation to inject at runtime using .NET Core dependency injection
I have three types of users in my application, let's say `Type1, Type2 and Type3`. Then i want to create one service implementation for each type, let's say i have a service to get photos, i would hav...
- Modified
- 28 Dec at 22:24
Request against localhost relative url "Cannot assign requested address"
I have a visual studio 2017 [ / 2019 ] asp.net core web app project enabled with docker support using `FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base` and `FROM microsoft/dotnet:2.1-sdk AS build...
- Modified
- 2 Jan at 03:13
Azure Function - System.Data.SqlClient is not supported on this platform
I'm running the following `insert` code within my azure function into an azure sql server 2014 database: ``` private static void Command(SqlConnection sqlConnection, string query) { var s...
- Modified
- 28 Dec at 01:52
Can't perform a React state update on an unmounted component
## Problem I am writing an application in React and was unable to avoid a super common pitfall, which is calling `setState(...)` after `componentWillUnmount(...)`. I looked very carefully at my c...
- Modified
- 28 Dec at 01:11
componentDidMount equivalent on a React function/Hooks component?
Are there ways to simulate `componentDidMount` in React functional components via hooks?
- Modified
- 12 Dec at 10:55
Not able to use GetValueOrDefault() for Dictionary in C#
I've defined a Dictionary with some custom type like this, Now when i try to do section is of type `PricingSection` i'm getting an error saying > Severity Code Description Project File Line Suppressio...
- Modified
- 5 May at 14:58
Pylint "unresolved import" error in Visual Studio Code
I am using the following setup - [macOS v10.14](https://en.wikipedia.org/wiki/MacOS_Mojave)- - - - I want to use linting to make my life a bit easier in Visual Studio Code. However, for every import ...
- Modified
- 27 Jun at 16:8
Utilizing bluetooth LE on Raspberry Pi using .Net Core
I'd like to build a GATT client in .NET Core. It will deploy to a RPi3 running Raspbian Lite controlling multiple BLE devices. Is there currently support for Bluetooth LE in the .Net Core Framework (2...
- Modified
- 26 Dec at 14:24
Android studio 3.2.1 ArtifactResolveException: Could not resolve all artifacts for configuration ':classpath'
After I update Android Studio to 3.2.1 and gradle version in my project I am getting following build error. I have already checked lots of questions related this question but no luck. ``` buildscr...
- Modified
- 6 Jan at 08:28
(-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...
- Modified
- 6 Jul at 08:53
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...
- Modified
- 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...
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 ...
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...
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: ...
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...
- Modified
- 24 Dec at 15:6
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: (_) => ...
- Modified
- 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 ...
- Modified
- 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...
- Modified
- 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...
- Modified
- 20 Jul at 18:22
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...
- Modified
- 22 Dec at 19:10