Questions tagged as 'classes'

2
answers

Displaying information for a class

I want to show the values of a class but I do not know how to access it. The result of print_r($this->order); shows WC_Order Object ( [status_transition:protected] => [data:protected] => Array ( [...
asked by 04.07.2018 / 04:48
0
answers

What is the difference between self and __CLASS__? [duplicate]

Studying the Singleton design pattern, I was testing: class Test { public static $var = "XYZ"; static function class() { return __CLASS__; } static function self() { return self::$var; } static functio...
asked by 03.09.2018 / 22:10
0
answers

Why does the method gain another object?

Follow the script. var indice = 0; class Numeros { constructor() { this.indice = 0; this.exibir(); } exibir() { var quadro = document.getElementsByClassName("quadro"); document.write(this);...
asked by 10.06.2018 / 18:11
1
answer

How to reuse class values?

I have three classes, the third one depends on the values of the other two (depends on E of class Material and A , Ix , Iu and Iz of class Geometria . I know I need to fix the 3rd class, but I do not...
asked by 10.05.2018 / 03:01
0
answers

Retrieve variable values inside a class in a Python function (partial_fit)

I'm creating a new algorithm to run along with the algorithms provided by the sklearn package in python, however the dataset used is extremely large and I'm using the partial_fit function (Example: Naive Bayes link ) so you can get blocks fro...
asked by 23.04.2018 / 06:17
1
answer

subclass does not incorporate super class method

This is the first time I've had this error. I have the% class Loja that extends into several subclasses. problem is that subclasses do not "request" the super method Shop: public abstract class Loja { /** * Corresponde ao valor da area...
asked by 19.04.2018 / 22:52
0
answers

How to use a friend function inside a class

My program is structured as follows: Classe.cpp // Implementing class methods Classe.hpp // Class prototypes Main.cpp // Main file In my file Classe.hpp I have the prototype a friend function:...
asked by 21.04.2018 / 20:53
0
answers

"Undefined reference" error in g ++

When compiling the algorithm with g ++, I got the following problem:    CMakeFiles / libTest.dir / source / mainDaMalha.cpp.o: in function    CriteriosDeParada::test_method()': mainDaMalha.cpp:(.text+0x1840f): referência indefinida para...
asked by 05.04.2018 / 16:24
1
answer

Django View Class retains values

A curiosity that has been with me for a long time in Django and I never managed to heal: Next. Let's say I have something like: from django.shortcuts import render from django.views import View from pagina.models import Config class Basi...
asked by 28.03.2018 / 12:29
0
answers

C ++ - How to pass a string to a class

I have a problem when I try to pass a string to a class. In short, in the main program I'm going to read this string and move on to the class: cout << "----- Vamos as opcoes! -----" << endl; cout << "(1) - Adicionar um funcio...
asked by 27.03.2018 / 03:16