Questions tagged as 'classes'

1
answer

Add sub-property dynamically

class ObjetoSimples{ var $nome; var $cargo; var $turno; } class ObjetoComposto{ var $nome; var $setor; var $equipe; } How to add new nome with turno and cargo on equipe ? For example: Objet...
asked by 04.06.2016 / 09:56
1
answer

Do php autoload functions make an object available to any part of the site in the same session, even in different sub directories?

I intend to make my code cleaner and so avoid using include or include_once all top of page. I would not like to use frameworks that already do this work as laravel for example. I want to create the "from the scratch" function....
asked by 27.04.2016 / 19:47
1
answer

How to create an abstract class in C ++?

In C ++ use virtual .cpp file #ifndef TETES_H #define TETES_H class Tetes { public: Tetes(); virtual ~Tetes(); virtual void exibeDados(); protected: private: }; #e...
asked by 15.03.2016 / 15:41
1
answer

Map columns of separate tables in a single object and vice versa

   Situation 1 I have the following very simple tables: ....................... And I have the following classes: Client: @Entity public class Cliente implements Serializable { private static final long serialVersionUID = 7...
asked by 03.07.2014 / 21:50
2
answers

What does '~' mean in front of the constructor of a C #

Working on a project here in the company, I came across some commands that are now being used the most ( yield , ?? , anonymous type ) but until I understood, but one that caught my attention because I did not know the what is....
asked by 12.03.2014 / 20:56
1
answer

Error: expected class-name before

I'm developing a project where I have an online class that inherits from an X class, where this X class needs to give a new in an online class object. When I do this happens the error, due to the inheritance I believe:    expected clas...
asked by 08.10.2018 / 03:11
0
answers

Reflections with Kotlin [closed]

I need to compare a KParameter with a KClass, know if the parameter type is equivalent to my KClass. So far I have not found a saint to do this, does anyone have my solution?     
asked by 11.05.2018 / 06:10
1
answer

JAVA POO - How to call a function from a Class

Then I have the following problem, I created a 30x60 matrix in which I will generate a number in a random position, so far so good. But when I get the function that generates the number and put it in the class, I'm having trouble calling it....
asked by 16.04.2018 / 00:40
1
answer

Catching text within a PHP ul list

Hello, I'm creating a project that I need to get some texts from a list on another site, I'll show you how I need it; I'm using file_get_contents ; $url = "www.site.com"; $html = file_get_contents($url); $getTextoList = ""; preg_match...
asked by 30.03.2018 / 18:21
0
answers

Why use gets and sets in classes? [duplicate]

What is the reason and when actually using gets and sets instead of a variable published in classes? They say that it is a bad practice to use and modify a variable as public, why? Example 1: class Teste { private; std::string nome...
asked by 30.10.2017 / 22:18