Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
2 votes
2 answers
132 views

How could I code a hierarchy of SQL DOMAINs without duplicating the code for the root SQL domain (thus implementing inheritance)? E.g., here is a hierarchy of SQL domains: text advise comment name ...
Best practices
0 votes
2 replies
55 views

I’ve searched the space of Python nested class inheritance and have read its not best practice. I’ve a NameError on the following: class A() pass class B(A) pass I indeed understand ...
1 vote
2 answers
160 views

I would like to know the proper way to get the following code to work. With inheritance, you can call the function of a parent pointer and execute the child function. But, if there are two parent ...
Advice
1 vote
3 replies
145 views

We're using an attribute, which looks somewhat like this (simplified): unit SomeProject.ThreadLibrary.Attributes; interface type ThreadAffinityAttribute = class (TCustomAttribute) ...
0 votes
1 answer
54 views

I'm testing SwiftData model inheritance (new in iOS 26) and encountering a crash when combining: A model that inherits from another model A separate model with relationships to the parent class ...
Best practices
0 votes
2 replies
85 views

I've recently come across the new S7 and its class systems. I have some experience with classes using Python, but never really grasped it quite well. This is not a pure coding question (I'm not ...
RYann's user avatar
  • 683
1 vote
1 answer
164 views

I have a generic class for a "general" tree node as follows (simplified): public class GeneralTreeNode<V> { public virtual GeneralTreeNode<V>? Parent { get; set; } public ...
1 vote
1 answer
149 views

The following code throws, which indicates that x has a value while it should be empty: #include <initializer_list> #include <optional> #include <print> #include <stacktrace> #...
9 votes
1 answer
602 views

Let's say I have an abstract class with a public abstract method. If I make that method virtual instead of abstract (i.e. provide a default implementation), is that a breaking change? I think not ...
0 votes
0 answers
67 views

In Java, having two interfaces: public interface SomeAbstractResult {} public interface SomeInterface { Collection<SomeAbstractResult> someMethod(); SomeAbstractResult someMethod2(); } ...
zajer's user avatar
  • 842
0 votes
1 answer
89 views

I have tried using both base class and interface and in both instances I am told a constructor that takes my arguments does not exist. I have two classes that are related to each other and I want to ...
Best practices
0 votes
6 replies
186 views

Somewhat similar to this question, I have something like this: class DerivedA: public Base { void operation(const Base& x, const Base& y) override // pure virtual in Base { ...
0 votes
0 answers
61 views

I am having trouble wrapping my head around subclass mappings. I have 3 classes: @Data public class Parent { long id; String name; public boolean isEmpty() { return StringUtils.isEmpty(name)...
Advice
0 votes
9 replies
140 views

Explain please why the output is "Base" ? Isn't getClassName method inherited? class Base { public String className = "Base"; public String getClassName() { ...
3 votes
1 answer
204 views

I'm getting a TypeInitializationException when running this C# code. It happens when a constructor tries to add an instance to a static list that should already be initialized. You can run it here: ...

15 30 50 per page
1
2 3 4 5
...
2860

AltStyle によって変換されたページ (->オリジナル) /