Questions tagged as 'poo'

1
answer

Fatal error: Can not unset $ this PHP 7.1

I get the following error in PHP: Fatal error: Can not unset $ this that refers to this snippet of code: public function __destruct(){ unset($this); } That line I use to destroy an object, in previous versions of PHP it worked without...
asked by 07.11.2017 / 23:09
2
answers

DO NOT enter the method of an internal class c #

I am trying to understand why it does not execute a method from a non-static public class ( public class DatosHandler ), even a static method: public class DatosHandler { public static DataTable ConsultaFacturasAll() {...
asked by 09.10.2018 / 16:42
2
answers

Obtain properties of an object which belongs to another object

Greetings. I've been trying to know how to get the properties of an object that is at the same time inside another object. This comes as a result of a programming book. The code is as follows. 1st we have the object: function Co...
asked by 22.02.2017 / 17:06
2
answers

When to reference and when to instantiate

I have a question, what is the difference between these 2 ways of storing an object? In this first form I create an object and assign it to another one that is the result of a search in the database: User user = new User(); user = userService....
asked by 23.02.2018 / 16:40
4
answers

Is it possible to validate before creating an object in PHP?

I have the following question: is it possible to validate the form of an array before creating an object? I have the following scenario. I am creating an apiRest and the programmer who consumes my API sends me a post with the following JSON:...
asked by 03.04.2018 / 16:42
1
answer

Problem that I have with inheritance in Java

public class GestionRepartoLocal { // CÓDIGO DE APOYO private ArrayList<Moto> motosDisponibles; private ArrayList<Furgoneta> furgonetasDisponibles; private ArrayList<Pedido> pedidosEsperandoMoto; private A...
asked by 01.05.2018 / 20:40
1
answer

Access, read and write c ++ files [closed]

I was working java and I used Scanner to access the content of text files, and also Printstream to write in new files, what would be the analogous way to perform these actions in c ++? for example, in java: public Class(Scanner sc) { w...
asked by 01.06.2018 / 03:12
1
answer

Doubt about "= new Image"

I am learning to program, the question I have is the following, What happens when you write the code in this way? (background.image = new Image ();) - Why "new Image"? -What happens with the original "Image"? Greetings!     
asked by 20.09.2018 / 15:26
2
answers

Accessibility inconsistency c #

I have the following class that marks me error in the second word Address of the virtual method: public class Profesor { public Profesor() { } public Profesor(int id, string nombre, string ape1, string ape2) {...
asked by 18.11.2016 / 01:09
1
answer

Sort a List of Objects in Java

I have a list of my own Java objects, which need to be sorted by the property code of the object itself. List<Calle> listaDeCalles; Calle calle1 = new Calle(); calle1.setCodigo("A4"); ... listaDeCalles.add(calle1); l...
asked by 14.10.2016 / 13:24