Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
17 views

In TypeScript, only setters are overridden in subclasses, making it impossible to inherit getters from the parent class [duplicate]

The sample code is simple, as follows: class Node { id?: string; private _parent?: Node; get parent(): Node | undefined { return this._parent; } set parent(value: Node | ...
Billy Chen's user avatar
2 votes
0 answers
71 views

Override parent class swagger annotations

This is my parent class: public abstract class Measurement { @Schema(description = "The value", example = "1") public Double amount; @Schema(description ...
Essej's user avatar
  • 881
1 vote
2 answers
64 views

Is it good practice to override an abstract method with more specialized signature?

Background information below the question. In Python 3, I can define a class with an abstract method and implement it in a derived class using a more specialized signature. I know this works, but like ...
Maarten Bamelis's user avatar
0 votes
2 answers
91 views

Is it possible to create an equals override for an untyped class and it's typed counterpart?

I have two classes, non-generic BindingFilter and generic BindingFilter<T>: public class BindingFilter { public object Value { get; set; } public string Member { get; set; } ...
dgo's user avatar
  • 3,961
0 votes
1 answer
41 views

Serialize Class to XML with ReferenceLoopHandling and Custom Converter

I am converting a class to JSON and XML. The Json conversion for the class cities is done and is shown below. I am trying to do the same with an XML output, but see that these options for field custom ...
sinDizzy's user avatar
  • 1,374
0 votes
1 answer
43 views

Dot notation access in pd.Series() but with priority on elements in the index

My aim is to implement a class that inherits from pd.Series class and acts as a container object. This object will hold varied objects as its elements in the form of container = Container( a = 12, ...
Amin.A's user avatar
  • 389
2 votes
2 answers
96 views

Theme overrides don't work unless wrapped with MDC classes

I'm trying to customize Material chips using the Angular Material theming system. I expected this approach to work: @include mat.chips-theme(...); @include mat.chips-overrides(...); However, this ...
Jakub Krasnan's user avatar
1 vote
1 answer
88 views

Using override to fix compiler warning about hidden method isn't working

Below is a minimal example that reproduces the issue. #include <iostream> class A { public: int _numA; A(int x) { _numA = x; }; virtual int run(A&...
James's user avatar
  • 87
0 votes
0 answers
63 views

Why is C# calling this overload instead of a more specific one (maybe override related)? [duplicate]

I have this code, the parent class has an abstract bool Filter(EntityComponent entity) but in this class, I prefer implementing bool Filter(BaseComponent entity) because others are calling the latter ...
Luke Vo's user avatar
  • 21k
1 vote
2 answers
66 views

How do you extend a superclass property object in a subclass in JavaScript and get TypeScript to not complain?

Given this code: class Foo { data = { x: 1 }; } class Bar extends Foo { override data = { ...super.data, y: 1 }; } TypeScript complains on the super.data part: Class field 'data' defined by the ...
user avatar
1 vote
1 answer
54 views

I’m curious about how the destructor is overridden in C++ when declared as virtual

The base class and its derived class have different destructor names, so how is overriding possible? Could you explain what happens when a destructor is declared as a virtual function?
Code_JP's user avatar
  • 41
2 votes
1 answer
37 views

How to force graph to stop displaying after a certain x-axis value

In Stata, how can I force the graph to stop displaying after a certain point on the x-axis? For instance, say that I have: sysuse auto2, clear gen mid = (price + weight)/2 gen n = _n twoway /// ...
bill999's user avatar
  • 2,570
0 votes
0 answers
50 views

How to get a user's access token when overriding keycloak code (JAVA)

Some context: I’m working on a registration-form-extender module to extend Keycloak's functionality. The goal is to terminate all sessions and log the user out from all devices whenever they update ...
Dora Boutsini's user avatar
0 votes
1 answer
37 views

Component Registration Override C#: how to resolve?

Assuming the classes have the following structure for the purpose of recycling useful code: public abstract class BaseWriter {...} public class CommonWriter : BaseWriter {...} public class ...
Mateus Lima Silveira's user avatar
0 votes
0 answers
17 views

how can i override java.time.ZonedDateTime.now() that this can return custom clock time not the default clock time

for end2end testing i need to write a component java.time.ZonedDateTime.now() time to custom clock time, the solution given here https://better-coding.com/java-springboot-overriding-system-time-for-...
Muhammad's user avatar

15 30 50 per page
1
2 3 4 5
546