Questions tagged as 'objetos'

2
answers

Object Comparison

The code below generates a false , but the objects have the same attribute values, is there any method that compares the objects, but their attributes, not the object itself? Produto P5 = new Produto(1, 0, 10,1000.0,"Samsung","smartphone...
asked by 08.02.2014 / 19:10
1
answer

How to know the "size" (quantity of properties / attributes) of an object in JavaScript?

Assume an object as follows: vendas = { obs1:{ Venda1:{Regiao:"Norte", Valor: 200}, Venda2:{Regiao:"Sul", Valor:100} }, obs2:{ Venda1:{Regiao:"Norte", Valor: 50}, Venda2:{Regiao:"Sul", Valor:20}...
asked by 07.05.2014 / 16:56
3
answers

JS - Array of objects for array array

How do I convert an array of objects to an array of arrays in javascript? I did this, but it returns an array of objects var items1 = new Array(); $.map(objResposta, function(value,index) { teste = new Array(); items1.push(val...
asked by 19.12.2016 / 13:45
1
answer

Is everything object in Python?

I am very confused about what is object and what can behave as an object, see the example I created to illustrate the situation: def subtrai(x,y): return (x - y) class OpeMatematica(object): def __init__(self, x, y): self.x =...
asked by 19.01.2016 / 15:16
1
answer

When should I use __init__ in functions within classes?

From the book I'm studying, at times the author uses __init__ as being a first function of a class. This function (and others) always have self as one of the variables (something that I still do not understand why). When should (an...
asked by 19.01.2016 / 03:04
1
answer

What maximum number of items can I put inside a ListT in C #?

I have several performance doubts in my application. What is the maximum number of items that I can get within my List<T> and what is "acceptable" within good practices.     
asked by 01.08.2017 / 17:04
1
answer

Concept of class, entity and objects

I'm reading about classes in C #, and an excerpt left me a bit confused. I know that classes are C # objects, and can be used in many ways. My question is in the following sentence: "A class can have both the attributes and methods of a...
asked by 08.05.2017 / 20:20
2
answers

Why can not I use $ this inside a static class?

In the example below, I wanted to know why I can not use $this inside a static class ? <?php class A{ public static function hello(){ echo 'hello'; } } class B extends A{ public function ok(){ echo...
asked by 16.12.2015 / 04:24
3
answers

Similar types but with different objects. What is the best way to use it?

I had to create a new object but totally equal to that existing in the C # system. Since the objects are the same I tried to do: ObjetoOriginal.Propriedades = ObjetoClone.Propriedades; Unfortunately it does not work, does it? I tried the...
asked by 13.01.2017 / 00:17
2
answers

What is the maximum size of an object in 32 and 64 bits?

Specifically the array can have up to 4 billion elements, I think, and the most common element size sizes should be 4, 8, or 16 bytes. I ask, what is the maximum size that the object can occupy in memory? Would it be 4 GB in 32 bits? Is it u...
asked by 24.04.2017 / 16:45