Skip to main content

Questions tagged [class]

A template for creating new objects that describes the common state(s) and behavior(s). NOT TO BE CONFUSED WITH HTML CLASSES OR CSS CLASS SELECTORS. Use [html] or [css] instead.

Filter by
Sorted by
Tagged with
Advice
0 votes
5 replies
57 views

I'm struggling with the following code: ...
Quousque tandem abutere's user avatar
0 votes
0 answers
55 views

I'd like to document the code I currently have to write as good as poosible. According to the lazarus documentation: The Lazarus IDE can display tooltip hints when mouseovering identifiers. From my ...
Seppde's user avatar
  • 33
4 votes
1 answer
83 views

I want to create a class that will create updateable plots. I plan on having 8-16 figures in one window, so it would be nice to have a class that would initiate these for me. These graphs will auto-...
Deepolisnoob's user avatar
0 votes
1 answer
106 views

I've done some amateur object-oriented programming in C++ and I have a quick question of what is possible when creating your own class. I've attempted to make a generalized 3-tuple template class that ...
Sir Is-Ikke Null-a-ton's user avatar
1 vote
1 answer
107 views

I run calculations with muliple subs and functions looping up to get a result. Based on the number of iterations done by counters I change some variables to suit my needs. So far the counters have ...
Chris's user avatar
  • 23
Best practices
0 votes
8 replies
52 views

Let's say I have a class with many parameters. In Typescript, this is how the class is created: ...
Sul4ur's user avatar
  • 1
Best practices
0 votes
3 replies
71 views

I’ve searched the space of Python nested class inheritance and have read that it's not best practice. I have a NameError on the following: ...
Mushy's user avatar
  • 2,713
Best practices
0 votes
4 replies
224 views

I am creating a program with C++ language that working with strong cryptography. Does it matter if I use public or private functions where contains a secret algorithms, any sensitive structures of ...
humankind's user avatar
3 votes
1 answer
112 views

Can't seems to find why generic interface types are allowed in powershell class argument attributes, but they can't accept anything - powershell class type resolution doesn't work in this case. Is ...
Zedarc7's user avatar
  • 33
1 vote
2 answers
96 views

Let's say I have this code: class MyClass { constructor() { return {}; } } const x = new MyClass(); // how many objects are instantiated with this? ...
user3163495's user avatar
  • 4,046
0 votes
2 answers
121 views

I am trying to build a small scale deep learning framework. I defined my tensor class as follows ...
Featherball's user avatar
3 votes
2 answers
113 views

I faced a specific behavior while using verbose output in class. This works like a charm: ...
Aleksej Egorov's user avatar
Advice
1 vote
4 replies
74 views

With abstract subclasses on can use register to add other classes as a "virtual" subclass, what would be a way to do that for a single instance based on it fullfilling some criteria? The &...
Minimo's user avatar
  • 9
Advice
1 vote
3 replies
65 views

What is this? ...
Stig's user avatar
  • 1
Best practices
0 votes
5 replies
90 views

i'm in need of a data container for several data types and fail to write some omnipotent :-) converter func. Maybe my idea is crab, in this case please give me a hint what concept to use. My current ...
Synopsis's user avatar
  • 374
1 vote
2 answers
173 views

I've created a VBA Class module and written all the necessary code within it. When I go to use it, in Excel, I instantiate it in a global module as follows. ...
Dave Clark's user avatar
Advice
0 votes
4 replies
128 views

I have a class in VB.NET. The definition of this class is re-defined according to need. For example: TR as char(2), F1 as Char(10) then later TS as Char(2) F1 as float. I want to define one class and ...
Tleilax's user avatar
  • 75
2 votes
1 answer
145 views

I working on a code where it is necessary to have large integers, here is a simplified version of it (len_class.py): ...
user126306's user avatar
0 votes
2 answers
148 views

I want to create a custom method I can use for any WC_Product class, so I can use $product->get_lead_time(); anytime I have a product object available. I ...
Alexandra Chavez's user avatar
2 votes
1 answer
213 views

I'm trying to print elements of matrix (example will be below). Here is the following code written in Dev-C++: ...
Michael's user avatar
  • 11
2 votes
2 answers
130 views

I have the following code that defines an abstract class and its final subclasse. The two classes are both subclasses of the equinox.Module class, which registers ...
Ben's user avatar
  • 539
3 votes
4 answers
118 views

Let's say I have a python file test.py that looks like this: ...
Ben's user avatar
  • 539
1 vote
3 answers
153 views

In our JavaScript web app, we use a custom-made component framework. All of our components are defined as classes using the class syntax. We can make child classes ...
John Brink's user avatar
1 vote
1 answer
85 views

I have an issue with the data within an extension class does not change when I change data within the super class. This might be an XY issue or caused by the fact that I'm still not used to using <...
tacoshy's user avatar
  • 13.3k
-3 votes
1 answer
119 views

I'm not super experienced with C#, and this is a bit of a puzzle. Consider the following code: ...
suszterpatt's user avatar
  • 8,327
0 votes
1 answer
87 views

I'm not a professional programmer. I'm teaching my children and decided to create a solver to nonograms puzzles. The algorithm itself is not what concerns me, but the proper way to code it. What I ...
Mateo's user avatar
  • 138
-5 votes
1 answer
147 views

I made the next class ...
Javier Olivares's user avatar
1 vote
1 answer
160 views

A while ago I wrote a small function to easily Use-ClassAccessors in PowerShell. I would like to add a new feature: Any accessor method (in the form of ...
iRon's user avatar
  • 24.7k
-4 votes
4 answers
172 views

I'm trying to use a for loop to iterate through a set of objects, check if those objects store string data (specifically their 'Pokemon.evolution' variable) which ...
mycode.exe's user avatar
-5 votes
2 answers
106 views

I am working on an example of a class called Car. Can you help clarify the difference between the attributes after the initialization statement and those within the ...
four77's user avatar
  • 165
0 votes
1 answer
93 views

I'm writing a plugin that uses a few third-party libraries (one from a long-abandoned repo that I'm modifying). Library A uses Library B, and my code uses both. In Library A are 50-odd files with ...
Stef Dawson's user avatar
0 votes
1 answer
135 views

I want to determine the class name of existing table TD elements (using the Chrome Javascript). My case is table rows all like ...
WayneF's user avatar
  • 264
2 votes
1 answer
111 views

I'm trying to write a function TypeNameEx which will return a string which, using a call to VarType(), effectively identifies ...
SVCooper's user avatar
0 votes
1 answer
260 views

type TTestHelper = class helper for TStringList procedure Test; end; What is the actual implementation of Delphi class helpers? In the ...
qgi's user avatar
  • 187
2 votes
1 answer
151 views

The classes works when separate, now, I want to create relationships between them. However, this has caused issues when I am trying to define the relationships. For example: ...
hanna's user avatar
  • 21
0 votes
2 answers
264 views

In C++ I have variables in classes in classes. It often results in long dot operators to get to the variable. For example: ...
GLnoob's user avatar
  • 35
0 votes
2 answers
163 views

I have a variable, value, declared in a class, input. I want to use it inside main. Here is ...
Niamh Driscoll's user avatar
0 votes
1 answer
67 views

I would like that method redefenition would result in failure and script execution stop. Like any other common error. In the following example I want to see that method print cannot be redefined. <...
Sterling7135's user avatar
-7 votes
1 answer
99 views

I have a situation where I have multiple csv files that I want to transform into various objects. So I have something like: ...
James's user avatar
  • 1
0 votes
2 answers
198 views

I have a view, TimeEditView, that edits an object of an Item class I made. The class does not conform to ...
bk24z's user avatar
  • 1
0 votes
1 answer
87 views

I've done a lot of Googling and may have missed this, there's so many examples of using the new Attribute feature in PHP but none of them show if this is possible. What I would like to be able to do ...
ch1902's user avatar
  • 13
1 vote
2 answers
74 views

Solution requirements: Pre C++11 Statements: Function someFunction exists, that accepts 2D vector as vector of string vectors: ...
KamilK's user avatar
  • 11
-1 votes
1 answer
111 views

I have a SwiftData class that I get with @Query private var items: [Item] in a SwiftUI view. Then I pass it to a sub view that passes it to other sub views. What is ...
Kitten Apps-Films's user avatar
1 vote
1 answer
69 views

This code creates an error: The slot COMMON-LISP-USER::NAME is unbound in the object #<THING {1002B830F3}>. I tried sbcl and clisp, both creating same problem. I can initialize instance of ash ...
nadirkazan's user avatar
-1 votes
1 answer
113 views

I'm a bit confused about how method overriding works in Python. Let's say I have a base class with a method, and I override that method in a subclass. When I call the method from the subclass, the ...
Rishabh Chauhan's user avatar
0 votes
3 answers
127 views

I am working on an ASP.NET project that uses Vue.js and jQuery. I have a JavaScript file (fields.js) that defines several classes (e.g., Users, Fields) and initializes a Vue instance. When I use the ...
kev's user avatar
  • 139
1 vote
1 answer
189 views

I have defined a struct in another file called file1.h (example) and when I declare an array using that struct in another file called File2.h, i get the error Message: "Incomplete Type "...
Lemtay's user avatar
  • 21
3 votes
1 answer
60 views

I define an array of 4 corners ...
user1069353's user avatar
6 votes
0 answers
87 views

...
Johnson Francesca's user avatar

1
2 3 4 5
1597