Questions tagged as 'objetos'

1
answer

Defining the constructor of an Object

Hello, I'm doing exercises on Java builders but I have a question. I have two classes Main.java public class Main { public static void main(String[] args) { Duck[] d = new Duck[5]; d[0] = new Duck(); d[1]...
asked by 27.07.2014 / 01:28
1
answer

Contraindications in IIFE's

Is there any contraindication to using IIFE's within the context of an object? For example, in the properties begin and created I make the function auto-execute to set the properties at the moment of instantiation of the variabl...
asked by 31.03.2015 / 15:56
1
answer

Doubt about JS objects with array

I'm in doubt about how to make an object that has an array inside, I do not know if that's possible, but it goes more or less what I want to do: var produtos =[ { nome: "Sei lá", cor: azul, tamanho: [ M, G, GG] // não sei...
asked by 13.02.2018 / 16:41
2
answers

PHP - Convert XML to Object

Is there a way with PHP to transpose an XML into an object and object in xml? Example: ** Classe (objeto) ** <?php class Telefone { private $codigoArea; private $numero; public function setCodigoArea($codigoArea) { $this->c...
asked by 03.08.2018 / 16:36
1
answer

Subsetting the row of the PivotTable

In the pick line function I get the line clicked and send the data to the form and store OBJ of the line and get index tbm var index = $(obj).closest('tr').find('td').eq('0').text(); Here after I changed the data I create the tr and step th...
asked by 31.10.2017 / 14:02
1
answer

Sorting object in javaScript

I need to sort the following object in descending order and after that I should delete everything that comes after "_" and even it, to see which word is formed: Here's what I've done: var str = 'string muito grande para o comentário'; var c...
asked by 05.12.2017 / 21:43
1
answer

Traverse all properties of a VueJS object

I'm using VueJS in a project and I need to go through all the properties of the object associated with v-model . I know that if it were an array I could use u for , foreach , map and many other ways to go through it....
asked by 02.10.2017 / 14:20
4
answers

How to group an array of objects in javascript (Angular)

How to read an array of objects and return only objects that contain the same value in multiple attributes? I made this object array as an example. var arrayDeObjetos = [ {"dia":1 , "desc":"Nigth","mes":1}, {"dia":1 , "Descricao":"Brilha",...
asked by 22.11.2016 / 17:35
1
answer

Problems with objects using sockets in java

I'm trying to pass the person object that was instantiated on the server to the client. But I can not. Below are the classes I've used: Server public class ServidorTCPBasico { public static void main(String[] args) { try { Se...
asked by 28.06.2016 / 16:43
1
answer

How to make an array of objects?

How to do an array of objects? I am trying but I am not succeeding, it returns me an error:    line 26 [Error] no match for 'operator []' (operand types are 'Time'   and 'int') Code: #include <iostream> #include <cstdlib>...
asked by 29.09.2015 / 03:49