Questions tagged as 'objetos'

1
answer

Are methods objects in Ruby?

Ruby has the class Proc , which is defined in the documentation as    blocks of code that have been bound to a set of local variables. Once   bound, the code may be called in different contexts and still access   those variables....
asked by 01.12.2017 / 13:53
2
answers

How do I get the values of a date in the format "dd / MM / yyyy hh: mm" and compare with system date after setting it in this same format?

I wanted to make a comparison between the date contained in the hour1 object with the system date, how can I do it? import java.text.SimpleDateFormat; import java.util.Date; public class MainTarefas { public static void main(String[] a...
asked by 18.06.2014 / 00:37
1
answer

Object with list of objects inside JavaScript

I'm using angular to make a form that contains multiple checkboxes (using angular-material), this form sends the values to the controler, which are received as follows: Ineedtogetthisdata(allobjectscontainthesamefields)andturnitintoaJSON.Doesan...
asked by 29.09.2016 / 22:00
1
answer

Is it recommended to use prototype on native objects?

I think the idea of having my own methods imported into the javascript native objects is very good. As for example: String.prototype.hello = function(){ return this.toString() + ' hello'; } 'Say '.hello() // say hello Number.prototyp...
asked by 23.02.2015 / 16:42
1
answer

Because the expression "$ a-b-c-d-e-f-g-h-i-j = & $ null;" returns several objects inside the other, since it does not even exist?

I was doing some benchmarking tests with PHP references and I came across a curious example. $a->b->c->d->e->f->g->h->i->j =& $null; Both variables $a and Null do not exist in any scope of my scr...
asked by 11.05.2016 / 21:21
4
answers

What is the function super (); [duplicate]

I'm studying Java and I need to understand the logic of a code here. I wanted to know what this snippet does: public class UsuarioController extends HttpServlet { private DAO dao; public UsuarioController() { super();...
asked by 29.05.2015 / 13:22
5
answers

How do I get the index of a javascript object by looking for the value?

I have a JS object like this (dummy values): { aifuw : 7, hsjwo : 5, hsgqk : 137, jskwe : 9483, NNNNN... : N... } I need to get the index where the value is 137 . The forms I tried did not work.     
asked by 31.05.2014 / 01:56
2
answers

How do I put a property name in a JavaScript Object?

js = { p1: { qq: "qq_val", }, p2: [{ qq: "qq_val", }] }; json = JSON.stringify(js); console.log(json); // {"p1":{"qq":"qq_val"},"p2":[{"qq":"qq_val"}]} Well, I just want...
asked by 12.09.2015 / 17:56
2
answers

How to access an object by a variable?

I have two select s that sends to event change the value of data-id and assignment to variable tipo . I have two objects each with values in the keys 1: and 2: . Using tipoUm[1] returns me the...
asked by 12.06.2018 / 23:05
3
answers

Lists repeating last item added

I was studying about the lists in C # and I could not understand what's wrong with my code (it's probably going to be pretty basic), all items are the same as the last item added. I've simplified the code to focus on just that part of the erro...
asked by 09.10.2017 / 15:47