All Questions
476
questions
2
votes
1
answer
52
views
Dynamic tag class in Angular17+
My navbar doesn't react on page change
My app.component.html
<html>
<app-navbar></app-navbar>
<router-outlet></router-outlet>
</html>
This tag starts my navbar....
1
vote
1
answer
98
views
How does JavaScript "decide" how to print a class name?
I'm trying to write an inheritence logic where I clone an input class and inherit from remaining parent classes. In order to do that, I need to create a new class, deep copying one of the classes ...
0
votes
1
answer
34
views
vue.js: failure to set multiple classes with a variable part
I need to add few different classes on a div: one is static, another one with a variable, the last one is depending on a inner prop. The next option fails: nothing's in the output
<div v-for="...
0
votes
0
answers
131
views
Python (3.10) Extending existing object interface
Was looking around for "clean" approach (supposedly, given the need) for "Wrapping up existing object by implicitly (without inheritance) extending the interface".
Rationale:
No ...
0
votes
1
answer
34
views
in javascript/emca script 7, is there a to get how many an inputs a class has?
i'm currently working on a project which requires the user to generate a relative decent chunk of data to be saved locally. and this will be repeated data which is similar, but unique strings.
what i'...
0
votes
1
answer
344
views
Dynamically define class with inheritance and static attributes (sqlmodel / sqlalchemy metaclasses)
I have the following class definition that I would like to make dynamic:
class SQLModel_custom(SQLModel, registry=self.mapper_registry):
metadata = MetaData(schema=self.schema)
I've tried ...
1
vote
2
answers
124
views
Create JS classes dynamically while looping through object
I'd like to create some kind of factory to automate the process of creating JS classes. The factory should loop through an object that contains classes names and their respective parameters. The ...
0
votes
2
answers
303
views
How to pass a dynamic Class to a function with a constructor
I've got an instance where I want to create X number of Classes that all need a constructor to assign a logging service, and then all have a method create which will handle the data object differently ...
0
votes
1
answer
370
views
How to import only the class that I'll use dynamically on Typescript
I have an application that has many classes and a class that handle one of that classes (choosed by user) using polymorphism. Is there a way to import and use only the class that the user asked?
...
0
votes
1
answer
48
views
Creating classes from list in python
I'd like to create classes from a list:
Super class
BaseMethods.py
class BaseMethods:
def setData(self,newData):
self.moduleData = newData
def getData(self):
return self....
0
votes
0
answers
22
views
Making a Java-Framework, choose object-Type by string-input
I am trying to make an Java-Framework. What I am trying to do is quite hard to explain, so I made a simple example.
Let's say, I provide a main-Class and a Vehicle-Class:
public class Main{
...
-1
votes
1
answer
95
views
Dynamically change class call path?
In the code below, is it possible to dynamically call MyFunction() by changing OtherClass1 with strings a and b?
string a = "OtherClass1", b = "OtherClass2";
myClass = new MyClass(...
0
votes
1
answer
676
views
How to create dynamic class property in typescript
Consider a class like this -
class MyClass {
constructor() {
const dynamicProperty = {
name: 'ujjwal gupta',
setName(value) {
this.name = value
...
0
votes
1
answer
345
views
Can I implement a class method dynamically in Python?
In Python, it's no secret that you can implement attributes of an instance of a class dynamically. Here's what that looks like:
class MyClass(object):
def __getattribute__(self, name):
if ...
1
vote
0
answers
311
views
Qt C++ How to create a global dynamic Object?
This problem has been bothering me for 2 days, I don't know how to implement it, thanks in advance
I Have defined 3 class Equipment, Equipment1 and Equipment2. Equipment is the base class and the 3 ...