Category "class"

Instancing objects with loop and get one dataframe from it

I have defined a class "Scraper" and the method "scraping" contained in it outputs a list with price information ("results"). My objects are several online shop

Maven Fatal error compiling: directory not found: maven-compiler-plugin

I am trying to run the official Java EE 7 Tutorial code examples and get the error. I have read about it here and most of the results say that you have to check

How can I extend a 3rd party Javascript object using typescript

I've been trying to figure out how to do this most of the after noon, and I'm either not getting something, or I'm approaching things wrong. I'm currently worki

Class template with methods already defined

I have two methods inside a class (mask_im and save_im) that I must include in several other classes in separate modules. How can I create a class with those tw

Class template with methods already defined

I have two methods inside a class (mask_im and save_im) that I must include in several other classes in separate modules. How can I create a class with those tw

I need to decrease a value of the property only from specific class objects

I have three classes and two of them inheriting from an Animal class, Carnivore class should have method to decrease health by 50 if I call the method on Herbiv

Pool within a Class in Python

I would like to use Pool within a class, but there seems to be a problem. My code is long, I created a small-demo variant to illustrated the problem. It would b

Win32 window instances behaving differently

I have created a window class using the win32 api. It creates a window, passing in this as a parameter so that I can create and grab the object instance inside

Understanding __init_subclass__

I finally upgraded my python version and I was discovering the new features added. Among other things, I was scratching my head around the new __init_subclass__

Class is public, should be declared in a file named .java

I'm having this problem which I'm not sure why it's caused. "class Account is public, should be declared in a file named Account.java" I have 5 classes in my

Classes with property referencing other classes

I'm creating a library, and one part of it requires a structured model. Let's say we have sections, and each section can have subsections (categories). All of t

Listing all class attributes swift 3

I'm trying to print all the values from an object that inherits from a class, here is my example: I create the class: class Pokemon { var name: String? va

How to update history dictionary attribute of a class instance and preserve order?

I am new to class programming. I am trying to save initial attributes (which are a dictionary) of my object in its history, and then update history with the cha

ProGuard - unexpectedly contains class

While I'm trying to obfuscate simple DataLoader.class file in ProGuard I get this error: Reading program directory [C:\Users\uzytkownik\Documents\NetBeansProje

How does an instance of "Arbitrary" looks for a tree?

In our CS-Lectures we currently learn about QuickCheck in Haskell. Now I got a task to use QuickCheck with the following tree-type: data Tree = Leaf Int | Node

Why does passing and changing a class self-variable with an external function work for manipulating iterables but not variables?

I ran into a very hard to track down bug in my program where a class self-iterable was manipulated by an external function and discovered that some self-variabl

Java "VariableDeclaratorId expected after this token"

I'm working on a little project for fun, that's essentially a little combat emulator. I'm trying to use a class similar to struct in C++, as in using it to crea

React functional components vs classical components

I'm trying to understand when to use React functional components vs. classes and reading from the docs they don't really go into detail. Can you give me some pr

Initiate single instance from a constructor and use it as static method in another class

I have a class of utilities that I use all over my app it contains a method to format numbers class Utils { static numberFormater () { return new I

How to use pyreverse on Windows

I would like to create diagram class using pyreverse. I download it, and when I use this command: pyreverse.bat -c PyreverseCommand -a1 -s1 -f ALL -o png test.