I need to use Dependency Injection in a static class. the method in the static class needs the value of an injected dependency. The following code sample demo
I have a Blazor Project, in the Program.cs(formaly aka Startup.cs) I added a service builder.Services.AddSingleton<Models.UserVisit>();
no matter what I use indexof() or contains or .equals() changing everything to uppercase or to lowercase It always return false and not found can someone please
I'm new here, I have a small problem in kivymd. Is there anyone here who would be able to help me? this is my main.py file from kivymd.app import MDApp from k
I'm developing Wordle in C++ using a .net graphic interface with visual studio. I have a file.h that contains a class "WordDatabase", and I need to use one of t
I'm coding in Python. I have a Base class which contains several methods. There are some child classes; they may have their own methods. I want the Base class c
I am trying to get auto completion of method parameter names for class instances but can't quite figure it out. Take this example class: class Abc: def meth
I'm using prototypal inheritance in javascript. The parent class is an animal and an example of one of the child classes is a cheetah. All of the child classes
Trying to create a function with a class Player with values "username" set to input and the rest set to numbers. Searched a few websites but the answers weren't
I'm trying to make a project using the standard std::list. There is a list of names that have to be accessed by multiple classes. The list has to be inside a cl
I hope you are all doing well. I've been having a small issue in a task for university, I have a variable in a class named Alpha where I want the value to be ch
I am trying to take a position (a,b) and via the code receive a random new position (a,b).. I am having great trouble implementing the code and what I got is by
i am trying to make a thing to store types in list. The best thing is to use a tuple. then to get the type i use tuple_element_t. But the problem is when append
I haven't been able to find an answer that relates specifically to my question. It's a bit of a "strange" case in terms of what I've seen. So I have a class C
So I have a problem with updating styles in JS for my class. In debug I can see that variables change correctly foreach object as they should, but style changes
I have this abstract class class Kuku(ABC): def __init__(self): self.a = 4 @property @abstractmethod def kaka(self): pass
I had an error in a Typescript class method declaration, but I don't understand how the error message relates back to the bug. The message seems to be saying
I started learning DSA ,while writing code for stack DS in c++ , I came across this error. So, while I was trying fixing it , I get to know that when I am using
In python, what is the difference between protected and public variable in a class class A: def __init__(self): self._protected="protected"
I want to add another property public int ID { get; set; } to the class below using C#. I don't know if there is a way beside T4 or partial class. How about Cod