close
Skip to main content
Filter by
Sorted by
Tagged with
Advice
1 vote
9 replies
116 views

What if a beginner asks you a question about an object? How do you explain it? How does it work? What is the difference between a class and an object? Give a real-world example of an object.
user32637553's user avatar
0 votes
2 answers
105 views

I'm using the equinox library for a project, written in python. This library is used to define dataclasses and strongly recommends to use the abstract/final pattern when designing these classes. I ...
Ben's user avatar
  • 679
Best practices
0 votes
4 replies
124 views

I'm designing a cable tester. Each core of the cable is represented by an instance of a class cableCore, which drives a stimulus to the core under test using the method selectCore(), and measures the ...
jwalters1955's user avatar
Best practices
0 votes
15 replies
206 views

How can I detect in a class that a copy operation is being performed between members of the same class? Is this even possible? I have a class that works perfectly, but with a slight drawback. #include ...
michaeladm's user avatar
-2 votes
0 answers
57 views

I'm trying to define a static template function in a class, but I get an unresolved external symbol error when I try to use it. I am referring to this article static template functions in a class In ...
craig1231's user avatar
  • 3,914
Advice
0 votes
1 replies
47 views

Generally, we either use foo/bar or a, b and c stuff, but there isn't much attention to class ideas. I suggest this: class test { constructor(a, b) { this.a = a || "Hello" ...
Unknown user UNKNOWN's user avatar
0 votes
1 answer
81 views

this is my first question in this website. the problem is, i tried to adapt a function of python 2 to python 3.14, the function is eliminaCarta, that take a class named carta and delete this carta for ...
Matias Alvarez's user avatar
1 vote
3 answers
224 views

I'm trying to create an array of class student that I initialize later: #include <iostream> #include <string> using namespace std; class student{ private: string name; ...
codequeen's user avatar
1 vote
1 answer
87 views

From this answer and similar blog posts I've used the decorator method to do data validation when creating a class. But now I need to validate one attribute relative to another. E.g.: class Planet: ...
thosphor's user avatar
  • 2,831
1 vote
1 answer
76 views

Hi I am a beginner to coding and I am trying to build The Odin Project To Do List . I have been stuck with this code for 2 days and this is my first time ever asking for help on a forum so please do ...
Oyin Kadiri's user avatar
Best practices
0 votes
3 replies
59 views

Suppose we have two classes A_class and B_class. We want to connect them in a way that allows to access methods and data of B_class from A_class . We can do it through inheritance: class A_class : ...
Drake Vimes's user avatar
Advice
0 votes
3 replies
61 views

I am designing the database for a student social network web application as part of a university project. I created a UML class diagram that includes entities such as users, publications, comments, ...
Doussan Benkerrou's user avatar
1 vote
1 answer
141 views

(Continuing from: Cast to custom class in PowerShell) I would like to build a custom cast like: class CheckBox { [Nullable[Bool]]$NullableBool CheckBox([Nullable[Bool]]$NullableBool) { $this....
iRon's user avatar
  • 24.8k
Best practices
0 votes
10 replies
84 views

I have this design for the following class: class MyClass(): a = None b = None def __init__(self, a, b): self.a = a self.b = b @classmethod def init_from(cls, c):...
Ben's user avatar
  • 679
1 vote
3 answers
70 views

I'm trying to subclass the AbstractWrappedSolver dataclass from the jax library diffrax. The class has this definition: class AbstractWrappedSolver(AbstractSolver[_SolverState]): """...
Ben's user avatar
  • 679

15 30 50 per page
1
2 3 4 5
5318