Questions

How can I use Dependency Injection in a .Net Core ActionFilterAttribute?

``` public class AuthenticationRequiredAttribute : ActionFilterAttribute { ILoginTokenKeyApi _loginTokenKeyApi; IMemoryCache _memoryCache; public AuthenticationRequiredAttribute(IMemoryC...

Implementing Fur with Shells technique in Unity

I am trying to implement fur in Unity with the [Shells technique](http://developer.download.nvidia.com/SDK/10.5/direct3d/Source/Fur/doc/FurShellsAndFins.pdf). The Fins technique is purposely left out ...

11 Oct at 14:12

Flutter: Find the number of days between two dates

I currently have a user's profile page that brings out their date of birth and other details. But I am planning to find the days before their birthday by calculating the difference between today's dat...

24 May at 22:13

Multiple Implementations of IHostedService

I'm trying to create background services using IHostedService. Everything works fine if I only have ONE background service. When I try to create more than one implementation of `IHostedService` only t...

9 Oct at 07:16

How do you mock ILogger LogInformation

I have a class that receives an ILogger and I want to mock the LogInformation calls but this is an extension method. How do I make the appropiate setup call for this?

8 Oct at 17:55

referencing .NET framework 4 dll in .NET core 2.0

I have some dll that is written in `.Net` framework `4.0` and I can't run my program when I'm referencing it to my project which is written in `.NET core 2.0`. Although my IDE (vs 2017) can recognize...

8 Oct at 13:17

How to use Rijndael algorithm with 256 long block size in dotnet core 2.1

I'm trying to encrypt a string with `RijndaelManaged` in order to send it to a third-party service. I've implemented the procedure in older versions of .Net framework (4.5, 4.6.x) like below: ``` Rij...

No service for type Identity.UserManager when using multiple identity users

Currently, I have two models that inherit from `ApplicationUser`, which inherits `IdentityUser`. The user classes are: ``` public abstract class ApplicationUser : IdentityUser { [PersonalData] ...

Creating class dependency diagram in Rider IDE

Does that feature exist there? How is it able to be used? Rider official docs was useless for me within that issue.

12 Dec at 11:33

VirtualBox NS_ERROR_FAILURE (0x80004005) macOS

I'm using macOS and installed VirtualBox. When I start a machine, I'm getting the following error : ``` Failed to open a session for the virtual machine ubuntu. The virtual machine 'ubuntu' has ter...

15 Oct at 07:49

Why the default SynchronizationContext is not captured in a Console App?

I'm trying to learn more about the `SynchronizationContext`, so I made this simple console application: ``` private static void Main() { var sc = new SynchronizationContext(); Synchronization...

How can one generate and save a file client side using Blazor?

I want to have a SPA that's doing all the work client side and even generating some graphs/visuals. I'd like to be able to have the user click buttons and save the visuals, tables, and other things f...

6 Oct at 22:1

because an app is obscuring a permissions request, Settings can't verify your response

[](https://i.stack.imgur.com/7PpUU.jpg)While I allow USB debugging, tap on OK button, Messaging has comes > because an app is obscuring a permissions request, Settings can't verify your response ...

1 Feb at 13:7

How do you do fulltext search with Entity Framework Core?

I have the following query: I am having trouble converting it to an Entity Framework Core query. I have a SQL Server with a catalog that has a few indexes. I want to be able to use `FREETEXT` and `CO...

pod has unbound PersistentVolumeClaims

When I push my deployments, for some reason, I'm getting the error on my pods: > pod has unbound PersistentVolumeClaims Here are my YAML below: This is running locally, not on any cloud solution. ...

11 Apr at 14:23

C# method override resolution weirdness

Consider the following snippet of code: ``` using System; class Base { public virtual void Foo(int x) { Console.WriteLine("Base.Foo(int)"); } } class Derived : Base { public...

5 Oct at 08:59

TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced

I am trying to convert a csv into numpy array. In the numpy array, I am replacing few elements with NaN. Then, I wanted to find the indices of the NaN elements in the numpy array. The code is : ``` im...

No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor

When i try to navigate to an endpoint i get the following error ``` Type definition error: [simple type, class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor]; nested exception is com.fasterx...

ServiceStack SSE shut down IIS application pool

My company has chat application built on ServiceStack SSE (v.4.5.14). Recently, we keep getting following exceptions which sometimes can make IIS application pool shut down. ``` System.Web.HttpExcept...

4 Oct at 21:59

Global Variables in ASP.Net Core 2

I am developing a web application in ASP.NET Core and currently have a large set of keys, such as stripe account keys. Instead of having them spread throughout the project in different classes I would...

15 Jan at 03:57

How can you read the current value of an input in an onkeypress method in Blazor?

I have: ``` <input onkeypress="@Foo" /> ``` and: ``` @functions { void Foo(UIKeyboardEventArgs e) { } } ``` How do I pass, or otherwise retrieve, the value of the input in the hand...

4 Oct at 16:44

Serialize Newtonsoft JSON to byte array

What I am aiming to do is send JSON containing a header object and a compressed data in a field that is byte array. ``` [JsonObject(MemberSerialization.OptOut)] public class Message { public Messa...

25 Apr at 15:4

C# NSwag and swagger-codegen with Enums

I have a .Net Core v2.1 Web API which uses NSwag to generate its Swagger Json. I have a response model as such - ``` public class LoginResponse { public LoginResult LoginResult { get; set; } } ...

Flutter: Expanded vs Flexible

I've used both `Expanded` and `Flexible` widgets and they both seem to work the same. What is the difference between Expanded and Flexible?

How to compare two Json objects using C#

I have two Json objects as below need to be compared. I am using Newtonsoft libraries for Json parsing. ``` string InstanceExpected = jsonExpected; string InstanceActual = jsonActual; var InstanceObj...