Skip to main content
Filter by
Sorted by
Tagged with
Advice
1 vote
3 replies
62 views

What is this? (function (Skd, $, undefined) { title = "SkdInternal"; // internal? #title = "SkdPrivate"; // private? Skd.title = "Skd"; // public? Skd....
Stig's user avatar
  • 1
Best practices
0 votes
4 replies
77 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
  • 354
Advice
0 votes
4 replies
110 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
-3 votes
1 answer
241 views

I've been tasked to write a code which implements a matrix class with a typical set of matrix operations, for example multiplying matrices with entries taken mod 1000 (EDIT: the dimensions are bounded ...
inductive_demon's user avatar
0 votes
1 answer
74 views

<span class="SpellingError SCXO166867203 BCX8" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:left bottom;">bv</span><span class="...
Retroshift's user avatar
2 votes
2 answers
102 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 class attributes as the leaves of a ...
Ben's user avatar
  • 539
1 vote
3 answers
113 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 that inherit the parents, and they ...
John Brink's user avatar
-3 votes
1 answer
99 views

I'm not super experienced with C#, and this is a bit of a puzzle. Consider the following code: #nullable enable using System.Collections.Generic; // Biology.dll public abstract class Animal { ...
suszterpatt's user avatar
  • 8,317
-5 votes
1 answer
136 views

I made the next class obj = MyClass() fds=['a','b','c'] for i in fds: attribute_name = f"{i}" setattr(obj, attribute_name, [f"{i}"]) print(obj.i) I know that obj.i is ...
Javier Olivares's user avatar
-4 votes
4 answers
168 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 is the same as a the name of one of ...
mycode.exe's user avatar
0 votes
1 answer
90 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
2 votes
1 answer
100 views

I'm trying to write a function TypeNameEx which will return a string which, using a call to VarType(), effectively identifies the type of a a (variant) variable, eg VarType 2 returns integer and ...
SVCooper's user avatar
2 votes
1 answer
145 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: sqlalchemy.exc....
hanna's user avatar
  • 21
0 votes
2 answers
160 views

I have a variable, value, declared in a class, input. I want to use it inside main. Here is my code. #include <iostream> #include <fstream> #include <chrono> #include <thread> #...
Niamh Driscoll's user avatar
-7 votes
1 answer
97 views

I have a situation where I have multiple csv files that I want to transform into various objects. So I have something like: #What works car = [] with open("car.csv") as csv_file: data = ...
James's user avatar
  • 1
0 votes
1 answer
82 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 votes
1 answer
103 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 the best way to pass the class ...
Kitten Apps-Films's user avatar
-1 votes
1 answer
106 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
2 votes
1 answer
180 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
  • 23
6 votes
0 answers
84 views

import sys class Vector: def __init__(self, x, y): self.x = x self.y = y v1 = Vector(1, 2) v2 = Vector(1, 2) print(f"v1 __dict__ : {sys.getsizeof(v1.__dict__)} bytes") ...
Johnson Francesca's user avatar
0 votes
0 answers
62 views

H I am trying to store my shopping cart variables using Classes/Objects for integration with Klarna. The following code works great on testing but I now need the Cart (products) to be dynamically ...
Scott's user avatar
  • 57
0 votes
1 answer
68 views

I'm currently studying Java in general and inheritance in particular. When I run the code below in an online editor it throws an error related to the main method, however, when I modify it as ...
Robk29's user avatar
  • 23
-1 votes
1 answer
105 views

Why doesn't javac generate a new .class file after renaming the class? My file name is Test.java. Case #1: class example { public static void main() {} } When I compiled this using javac Test....
Kunal_121's user avatar
0 votes
0 answers
14 views

I'm trying to add an extra class at my header to change the logo on scroll. I used the tutorial mentioned in the code as a guide and that works in MAMP (local) but not online. Local it does add the ...
Hanneke's user avatar
1 vote
1 answer
113 views

#include <array> template<std::size_t tc_n> requires (tc_n > 0) struct StringLiteral final { std::array<char, tc_n> value{}; consteval StringLiteral(char const (&sl)[...
xmllmx's user avatar
  • 44.6k

1
2 3 4 5
1598