Skip to main content
How are we doing? Please help us improve Stack Overflow. Take our short survey

Questions tagged [instance]

In object-oriented programming an instance is an occurrence or a copy of an object, whether currently executing or not.

instance
0 votes
0 answers
4 views

Scaling out a Asynchronous SageMaker Endpoint

I've deployed a Asynchronous SageMaker Endpoint and I want it to scale out (to 0 instances) when nothing is requested for a period of times and to scale in when something is requested (to <=1 ...
Francesco Camussoni's user avatar
0 votes
1 answer
29 views

What is the best approach to handle class instances in django application in a production environment?

I would like to consider 2 approaches. First, you could create a class and its instance in a class and inside views import the instance and call its methods. Second, you import the class and create ...
Sachin Das's user avatar
-2 votes
0 answers
38 views

How to use type(obj)([......]) to create class instance [duplicate]

Please see py-automapper sourcecode class Address(BaseModel): street: Optional[str] number: Optional[int] zip_code: Optional[int] city: Optional[str] address = ...
user26374984's user avatar
0 votes
1 answer
35 views

is there a way to get the avg score into the grades function without it having an error

I'm relearning python and I decided to make a student grade analyzer program where you enter your grades then it gets the avg of all grades and go to grades function that I made and checks what ...
laith maree's user avatar
3 votes
1 answer
50 views

TypeError: Privileges.show_privileges() missing 1 required positional argument: 'self' [closed]

I'm a beginner in python and I'm using python crash course 2019 as my reference. I'm having difficulty figuring out what is wrong with my code gaining the type error as said in the title. here is my ...
python_noobie's user avatar
0 votes
1 answer
29 views

How to test a widget method with mocktail

I am trying to test whether a widget's method was actually called, but I don's seem to be able to get it right. My widget looks something like this: class MyWidget extends StatefulWidget { const ...
Fi Li Ppo's user avatar
  • 156
0 votes
0 answers
17 views

Python Selenium Web Driver Chrome Processcumulative issues in While Statement

I'm currently implementing the crawl function, but the crawl works fine, but the instance of selenium webdriver doesn't shut down normally, so it keeps accumulating and I found StackOverFlow to ask ...
안세준's user avatar
-1 votes
1 answer
57 views

How can I number the instance of a duplicate record?

I have contacts who have the same phone number listed multiple times. I'd like to delete all but one of those records. I only have read only access to the database, so I'll have to create a csv file ...
Scott Hansen's user avatar
1 vote
2 answers
30 views

How to reference .this from within an instance of react interface?

I'm using a primereact component, whose props include a function, and I want to use one of the other props in this function. The overall scheme of things looks like this: interface Props { label?: ...
Nomenator's user avatar
  • 1,107
0 votes
0 answers
25 views

Second instance of a class suppresses/deletes the first one in my Python program [duplicate]

I am creating the Pong game using the Turtle module in Python. So far, I have one file for the paddles (the bars that players control to hit the ball) called paddles.py and a second file for the main ...
Aya Noaman's user avatar
0 votes
2 answers
75 views

Need advice returning an instance of object using a pointer - bad_alloc at memory location?

I'm having some trouble trying to return an instance from a list of instances from a function. I have a set where I store instances of my Student class. I'm trying to return an instance from the "...
f99's user avatar
  • 17
-1 votes
0 answers
22 views

Can we declare instance variable of a class inside a member function in Python class [duplicate]

Suppose I have a class class SelfCheck: def __init__(self,data): self.insideData = data def setData(self,data): self.insidesetData = data def getData(self): print(&...
Arun Agarwal's user avatar
-1 votes
1 answer
53 views

Does an abstract class get instantiated by its subclass? [duplicate]

While you cannot make an instance of an abstract class, in this example the super keyword is used to reference the instance variable of the super class, hence a reference that is provided in the ...
zozo's user avatar
  • 1
0 votes
2 answers
38 views

Ec2 instance nextjs build issue in t2micro

When I try to build in ec2 instance for nextjs app it got stuck I don't know why? And in local machine the build size is 600mb so I can't send it to GitHub and pull it on ec2 instance so can anyone ...
AVINASH KUMAR SINGH's user avatar
-1 votes
1 answer
122 views

How to mark an *instance* of a Python class as deprecated?

I have inherited the maintenance on some API code. One of the things I need to update is some environment information (think staging, production). The old names were test and production, while the new ...
Colin 't Hart's user avatar

15 30 50 per page
1
2 3 4 5
362