Questions tagged as 'objetos'

4
answers

How does copy objects work?

var a = {a: 1, b: 2}; var b = a; b.a = 3; In the above code, b.a becomes 3, and a.a also becomes 3. var a = {a: 1, b: 2}; function b(objeto) { objeto.a = 3; } b(a); In the above code, the value of a.a remains 1, since I am...
asked by 28.04.2016 / 19:59
3
answers

Is it possible to dynamically create an object in JS without using eval?

I have the following code: Arr = ["meu", "objeto", "dinamico"]; Val = 100; Eval = ""; obj = {}; for(i in Arr){ Eval += "['"+ Arr[i] + "']"; eval("obj"+Eval+"={}") } eval("obj"+Eval+"="+Val); As you can see, this code dynamically gen...
asked by 15.05.2015 / 14:45
2
answers

Show an object / variable with different names in R?

Considering the following routine: x <- 1:10 for (i in 1:length(x)) { ## Nome da variável: nomevar <- paste0("Var_", i) var <- x[i] + 2 assign(nomevar, var) print(nomevar) # aqui esta minha duvida }     
asked by 07.01.2016 / 17:47
2
answers

Find out if a control is a button

I have the following code to change the color of the buttons that are in a panel: private void mudaCorBotao(Button bt) { foreach(Control b in Panel_esq.Controls) { if (/*[O que devo colocar aqui?]*/) { b.Bac...
asked by 23.04.2017 / 01:43
1
answer

How to find out in what generation of garbage collector an object is allocated?

Considering my previous question or in> is it necessary to solve some kind of problem? In order for me to program correctly , do I need to know the generation in which an object is allocated?     
asked by 27.04.2017 / 20:25
4
answers

How to insert a property into a javascript object?

I have the following javascript object: data2 = { "desColigada": "Empresa fulano de tal", "codMatricula": "00555454", "dataImpressao": "23/05/2016" }; I need to know how to insert this array into the above objec...
asked by 29.03.2017 / 21:03
2
answers

Pass object list between files

How to pass a list of objects through two JavaScript files? I have a list: var elementsList = []; And this list is populated with N objects: var oElement = { elem: "", emin: 0.0000, emax: 0.0000 } I need to pass this all...
asked by 24.04.2014 / 19:52
1
answer

Object Not Defined

I'm having trouble with an object in Node.Js with Express.Js. It is reporting the following error. Error: Route.get() requires callback functions but got a [object Undefined] at C:\contatooh\node_modules\express\lib\router\route.js:162:...
asked by 29.09.2015 / 05:51
1
answer

How do I add a different object to a list every time I use the add?

I'm having trouble adding a different object to a list of objects every time I use the add of it, I know the problem but I do not know how to fix it, follow the code Class list public class Lista { NodeLista inicio; NodeLista fim;...
asked by 24.05.2014 / 21:32
1
answer

Objects in javascript

When working with objects in javascript, and with the AngularJS framework, where should we write the object code? For example, I'm going to create an object with something like this: var LogMessage = function(system, type, message, value, n...
asked by 10.05.2016 / 14:42