Questions tagged as 'objetos'

2
answers

Why does the comparison of different objects return true?

First code: Integer i1 = 1234; Integer i2 = 1234; System.out.println(i1 == i2); //false System.out.println(i1.equals(i2)); //true Although it seems that primitive types are being used, they are actually objects, so when these objects are co...
asked by 21.02.2017 / 22:38
1
answer

Instantiating an object in the same class as the constructor is "inelegant"?

It is always seen as a good programming practice if you create a class for the object, where we have the constructor and we make the methods and another class where we instantiate several objects of the class created previously. However, I wou...
asked by 28.12.2018 / 13:21
2
answers

How do I save and export an object in the browser console?

On the Cashier website, lottery results are displayed in the console in the form of objects. link I can give a right-click on the Object line, which contains all the contest data, and then click on "Store as global variables". A varia...
asked by 28.07.2018 / 22:02
3
answers

Traversing array of objects and accessing a value

Good afternoon, I have a difficulty, where I need to access an element of an array of OBJECTS, I'm not able to access with the foreach, or for. I need your help! The array of objects: Array ( [0] => stdClass Object (...
asked by 11.10.2016 / 15:56
2
answers

Using Flash Professional, how do I import classes from an ActionScript file?

In my project I have the ListLoader class, responsible for interpreting a list and uploading files described in it.   My goal is to be able to save this and other classes in a .as extension file and be able to import it into my current project a...
asked by 25.07.2014 / 17:24
2
answers

Return data from a subobject

Here's what I've implemented so far: public class Interface { private List<Usuario> usuarios = new ArrayList(); private List<Tarefa> tarefas = new ArrayList(); Menu menu = new Menu(); public void program()...
asked by 15.11.2018 / 15:45
2
answers

Javascript prototype: possible to change reference object value?

EDIT: Normally it is in the end, but the question was poorly formulated and I decided to switch to this example, which is much better. Here is an example of a function that does nothing as an Array method: Array.prototype.nada = function () {...
asked by 14.12.2016 / 02:00
4
answers

How to return an object from a dynamic reference in JavaScript?

I need to create JavaScript code that returns an object already created with a dynamic reference by its id / id. Basically this: // Define class function Test(num) { this.msg = "Message"; this.num = num; } // Create objects va...
asked by 30.09.2016 / 21:13
1
answer

Error when using bindParam: Only variables should be passed by reference

I'm getting an error when I use the PDP bindParam , code: ConnectionPDO Class: function __construct($dsn, $username = NULL, $password = NULL, $options = NULL) { parent::__construct($dsn, $username, $password, $options); $this->Loa...
asked by 22.09.2015 / 23:48
1
answer

Generating new objects using existing objects

I'm having a hard time doing this. Assuming I have two objects of type Person , which has the name and job attributes.    P1 (name = John, job = Taxi Driver)       P2 (name = Mary, job = Programmer) So I would like to generate the po...
asked by 18.08.2015 / 03:49