Instantiation is the process of creating objects from a class in most object oriented and object based languages. In the C++ language, instantiation is the process of creating a class or function from a class template or function template.
Questions tagged [instantiation]
2609 questions
0
votes
0 answers
python: instantiate all subclasses with a similar input iteratively
I am trying to instantiate all the sublcasses of my abstract class that i have in my code, because the tagger function takes the same input. this is the code:
import spacy
nlp = spacy.load("en_core_web_sm")
from abc import ABC, abstractmethod
class…

zara kolagar
- 881
- 3
- 15
0
votes
3 answers
Kivy/Python: missing 1 required positional argument
I am not too terribly familiar with classes/class methods and how they work, and I know my code is atrocious! I wanted to dip my toe into the world of UI, and so I wanted to take a simple function I wrote in Python to see if I could create an app…

dooooooozer
- 3
- 1
- 5
0
votes
2 answers
Is it possible to create the objects of class dynamically?
for example, i have 10 classes created with some methods in it. now, i want to create a method which takes one of these classname as input parameter in String format and instantiate that class.
public void instantiateclass(String Classname)
{
//…

Suresh
- 1
0
votes
1 answer
Is an instance of a concrete subclass an instance of the abstract class?
By definition, we cannot instantiate an abstract class:
>>> import abc
>>> class A(abc.ABC):
... @abc.abstractmethod
... def f(self): raise NotImplementedError
...
>>> A()
Traceback (most recent call last):
File "", line 1, in…

Géry Ogam
- 6,336
- 4
- 38
- 67
0
votes
2 answers
What is the difference between "TextEditingController titleController;" and "titleController = TextEditingController();"?
Sorry if this is a really simple question but still is a fundamental question for me to know what is the difference between these two line of code?:
TextEditingController titleController;
and
titleController = TextEditingController();
For more…
user11874694
0
votes
2 answers
Creating a new instance of a class with a protocol-conforming class as an argument
I have the following code setup (written in Swift):
protocol DataFetcherType {
init(_ mainData: String, fetchData: Bool)
}
class DataFetcher1: DataFetcherType {
required init(_ mainData: String, fetchData: Bool) {
}
}
class…

Hunter Holland
- 15
- 5
0
votes
1 answer
Checker not found. promblem in verilog modelsim
module Vr_ALU (A, B, ALUCtrl, ALUOut, Zero);
input [31:0] A;
input [31:0] B;
input [2:0] ALUCtrl;
output [31:0] ALUOut;
output Zero;
wire [31:0] sig_a;
wire [31:0] sig_b;
wire [31:0] sig_sum;
wire sig_cin;
wire sig_cout;
always…
0
votes
1 answer
Instantiate from raycast without intersect
So I want to know how to instantiate a GameObject without intersection in Unity3D. As of now, the sphere instantiates intersected with the object that I hit with the raycast. I am using the location of hit.point, but would like to know if there is…

Zany_Zachary1
- 117
- 7
0
votes
1 answer
Magento Extending Paypal Standard - Can't instantiate Model
I am working with Paypal 1.4.2
I have extended Paypal Standard module to allow for some custom coding
My config.xml file looks like the following:
1.0.0
…

Farhan Munir
- 89
- 7
0
votes
3 answers
Scala objects constructed inside if
I want to do something I feel is simple, but I cannot figure out the way to do it. It is the following: according to some String variable I want to create an object of some specific type. However, the underlying objects have the same methods, so I…

Bossipo
- 178
- 1
- 10
0
votes
1 answer
unity instantiating multiple objects on the same position. I would like to spread them out
I am trying to spread out the instantiated objects to fill up the grey area in a grid layout. So far I am stuck at this point where I have all the objects stacked on eachother. I did try a few things but they would make the object not visible. Here…

kobecodes
- 13
- 5
0
votes
1 answer
Why more balls are instantiating?
I'm making a game in unity where the user drags to shoot a ball at some objects at a distance. So far I have this DragAndShoot script:
//using System.Collections;
//using System.Collections.Generic;
using UnityEngine;
…

physics35
- 11
- 1
0
votes
1 answer
Instantiation of Global fields
I wrote a code for detecting cycle in graph.
The input is given such that there can be several lines with each line of form a # b .
It denotes that there is an edge from a to b.
My code worked and then I played with it a bit and came across a…

Ayush
- 41
- 5
0
votes
1 answer
C#/Unity Instantiating class creating copies with same instance ID of 0
The function below is supposed to create a new instance of SolarSystem_Manager and add it to a list however when var clone = Instantiate(_solar) is run, it returns a nullreference error. All instances of _solar have the same ID when I created…

CR9GAMING
- 13
- 3
0
votes
1 answer
Question Regarding some Haverbeke "Eloquent JavaScript" Constructor Code
I am having a bit of difficulty understanding a few lines of code from page 108 of Marijn Haverbeke's "Eloquent JavaScript" book.
Namely, in the example below, I don't understand what "element = (x, y) => undefined" in the constructor parameter list…

MRodriguez
- 379
- 3
- 10