Most voted "objects" questions
An object is any entity that can be manipulated by commands in the programming language. An object can be a value, a variable, a function, or a complex data structure. In object-oriented programming, an object refers to an instance of a class.
Learn more…360 questions
Sort by count of
-
0
votes2
answers85
viewserror: use of Deleted Function Fight::Fight()'
Good afternoon, I am experiencing several problems when compiling the code below in the code::Blocks with g++ and I would like to get help, thanks in advance. Content of main.cpp: #include…
-
0
votes1
answer26
viewsHow do I transfer data from the inherited array(Objects) to the array(reserves)?
package pkg2017ppfp09; import ObjectManagement.ContainerOfObjects; /** * * @author pf */ public class GestorDeReservas extends ContainerOfObjects{ private final int MAX_RESERVAS = 10; private final…
-
0
votes2
answers42
viewsUsing object property when declaring it in javascript
Personal I am starting in javascript and I have many questions related to objects. One of them is the following: Let’s assume that I create an object. Here I have a list and I want to keep it inside…
-
0
votes1
answer2192
viewsJava Web Service SOAP with objects
Hello, I am learning to use web-services and I stopped with a problem, maybe it is something silly, but I did not find solution, I am hosting my application in Heroku and I will leave here the…
-
0
votes3
answers597
viewsHow does the equals() method work in Java?
At the time I will use the method equals() I place an object of the type Person and it works, because? How it works being that the object I passed is not the type Object? I know all this has to do…
-
0
votes1
answer916
viewsHow to go through an object and filter this object?
I’m trying to go through an object and after that, filter the same. I’m using this code, but it’s not working. Someone could help me and if possible explain the code ? const objeto = { idade: 20,…
-
0
votes1
answer63
viewsHow to work with javascript object
Well I’m having a hard time understanding how to work with an object that comes from my javascript controller, I’ve already done some tests to make sure that this information has gone up correctly…
-
0
votes1
answer98
viewsStrange values when generating array in a dynamic object in PHP
Follow this example code: class Object{ private $keys = []; private $values = []; public function criarArray(){ $obj=get_object_vars($this); foreach($obj as $key => $value): $this->keys[] =…
-
0
votes0
answers177
viewshow to pass HTML objects as parameters
wanted to know how I can pass a variable VARIAVEL of the kind "[object HTMLTableRowElement]" as a parameter to send to a JSP that will make a $(VARIAVEL).remove() using javascript. This variable has…
-
0
votes1
answer1314
viewsHow to know if there is content in a class object?
I need to know if I have content in a class or if it’s empty, how do I get that information? Classe usuario = new Classe(); I wish I could consult if there’s content in this class of mine usuario.…
-
0
votes3
answers784
viewsHow to return an object using the object name as a function parameter?
good night! Can anyone tell me how to return the object using a type invocation: book (booklet 1); function book(bookName) { var obj = { livro1: { quantidadePaginas: 300, autor: "Jorge", editora:…
-
0
votes2
answers386
viewsHow to check if an object has a string?
I have the following problem, I need to check if an object has a certain string, this object comes from the google Places API autocomplete. This is a return json, for example: {…
-
0
votes1
answer727
viewsList of attributes with differences between objects - Java
I need to compare two objects in JAVA so I can get a MAP with key and value of the attributes that present difference. I need this logic for a generic object, capable of receiving any type. Ex:…
-
0
votes1
answer432
viewsHow to change an attribute in a list of objects and write that list in a file
I have a list of objectsconList I want to change an attribute of an object and then write that list in a file, where each line of the file is an attribute of each object in the list. How do I do it…
-
0
votes1
answer635
viewsJavascript: Add object within an object array
I have: var options = { title: 'Titulo', width: largura, height: altura, vAxis: { title:"Porcentagem % em vendas", format: 'decimal' }, hAxis: { title: "Seleção de clientes - Comutativa", } }…
-
0
votes1
answer38
viewsArray of objects in php, objects being overwritten, why?
I created a helper to organize the menus returned from the database in a way that is similar to a return of a native method of the framework I am using. The code snippet containing the error is…
-
0
votes1
answer278
viewsAJAX request with different domain
my request url="http://algumip:algumaporta/dowPDFNF?cChave="+chave $.ajax({ url: url, dataType: 'jsonp', success: function (data) { console.log(JSON.stringify(data)); }, type: 'POST' }); error that…
-
0
votes1
answer79
viewsJavascript array showing duplicate values
I’m making a very basic registration code in Javascript. However, after I register my data and save inside the vector and show them, the data comes out duplicated. If I type Code: 1 Name: 1 and…
-
0
votes2
answers66
viewsHow to assign all the characteristics of one object to another, except one in particular?
I am Creating a card game that runs in the browser and I need that in some situations, there may be the same cards in different hands ("Computer" or Player). However, I don’t want to have to create…
-
0
votes1
answer53
viewsSort array by first coming the object
I have an object that returns array and object at the same time Example: I was able to retrieve the object by calling straight var obj = { name: obj.name, month: obj.month, year: obj.year } You can…
-
0
votes1
answer1321
viewsAngular 5 , Mapping an array of Objects within another array of Objects
Well I’m trying to encapsulate my objects. The first Object it maps the first JSON array. export interface PraticarObject { id_assunto: number; nome_assunto: string; qt_exercicios_concluidos:…
-
0
votes2
answers907
viewsHow to save and export an object in the browser console?
on the Box website, the results of the lotteries are displayed on the console in the form of objects. http://loterias.caixa.gov.br/wps/portal/loterias/landing/megasena/ I can right-click on the…
-
0
votes1
answer197
viewsHow to take a specific value of an object?
I receive this object in PHP (I could see the values with print_r): stdClass Object ( [id] => 1 ) 1 Wanted to echo only id value (1), how to do?
-
0
votes0
answers19
viewsHow to duplicate Objects in Javascript
One of the most frequently requested features by new Javascript developers is how to duplicate an object. It seems as if there should be a native method copy(), right? Turns out it’s a little more…
-
0
votes0
answers59
viewsHow to store an Object in Firebase and use in Ionic 3
I want to store the following data in Firebase and use it in Ionic 3 but have not found any clear documentation that can help me. Someone can give me a way ? Follow the code showing the Object…
-
0
votes1
answer53
viewsHow to create a list of objects?
Good afternoon, I’m developing a project. NET Core Razor Pages and in it I will need to create and add items in a list... these items are strings and are extracted from an XML. I’ll leave a part of…
-
0
votes1
answer1135
viewsC#, what are methods, classes, and objects?
What are the differences between the three? Do they have any other differences? I’m new to development, and I want to learn more.
-
0
votes1
answer345
viewshow to manipulate an object inside an array in typescript
I use the last version of the angular, and I’m having a hard time passing a value to the field, follow details below I am pulling data from an api and sending in list to a select <option…
-
0
votes1
answer714
viewsMenu in the Tkinter Python module
Hello, I have a screen that was made in Tkinter and I have a menu with cascade submenus, what I need to do is show the different information of the submenus without having to create several other…
-
0
votes0
answers155
viewsErrorexception (E_ERROR) Trying to get Property of non-object
I tried to turn the page using backup to solve the problem but I can’t. I go up the page and she keeps on making the same mistake, I don’t know how to fix it. If there is some easier way for the…
-
0
votes1
answer44
viewsHow to look for a value within an arrangement
I need to write a function that gives me a list of the name skills in the console input.log ms can’t understand this for-of. I’m a beginner in javascript and since yesterday I’m jumping from article…
-
0
votes1
answer468
viewsConvert Json to a Csharp Object
public IActionResult MoedaTurismo() { try { RestClient restClient = new RestClient(); RestRequest restRequest = new RestRequest(); restRequest.AddHeader("cache-control", "no-cache");…
-
0
votes2
answers143
viewsRun function after object created by click
Below is what I managed to do: When I click on a button with the class .btn-comprar-na-pagina, it fires function below. $(function () { var itens = []; $(document).on("click",…
-
0
votes1
answer610
viewsHow to collect snippets of a text with the Pageobject object from the Pypdf2 library?
Going remove a section of text of a PDF with the library PyPDF2 in Python. Precise find the word "Lc" inside the PDF and extract it: the word "Lc", which means leasing, comes accompanied by a number…
-
0
votes1
answer24
viewsDoubt when executing the function
const contatos = [ { nome: 'Alex Júnior', numero: '1234-5678' }, { nome: 'Carolina Moya', numero: '1234-6789' }, { nome: 'Fernando Jorge', numero: '12345-5567' } ]; const [Alex , Carol] = contatos;…
-
0
votes1
answer35
viewsReturn all values of a given property in a Javascript object array
I have a certain array var people = [ { name: 'Leandro', age: 36 }, { name: 'Joaquim', age: 29 }, { name: 'Maria', age: 25 } ] If I want to return the name property at the first position I do the…
-
0
votes1
answer166
viewsIs it possible to disrupt an object inside another object?
I know it’s possible to do this with arrays, type one array thus const array = [[['teste']]] const [[[variavel]]] = array variavel // => 'teste' there is some way to do something similar to…
javascript objects variable-declarationasked 4 years, 2 months ago Christopher William Buscoski S 13 -
0
votes1
answer475
viewsGroup javascript object by category
I have an object in JS with information of places (Cinema, Museum, etc.) that I will use to popular in my system. Example: var places = { "type": "ABC", "features": [ { "type": "AB", "properties": {…
-
0
votes1
answer601
viewsNullreferenceexception: Object Reference not set to an instance of an Object (Unity)
I saved my project, I closed the Unity and after I reopened the project, to my surprise, an error was presented on the console: Nullreferenceexception: Object Reference not set to an instance of an…
-
0
votes1
answer402
viewsDoes splice remove an object from the array?
I have a question in Javascript. When I splice an array, it removes what? For example, I have an array with several objects inside, as in the example below: lixo: [ {"nome": "garrafa pet", "tipo":…
-
0
votes0
answers43
viewsI have a simple class and it doesn’t answer when I call the methods
Can someone help me? class sorvete(): def __init__(self,sabor, recipiente): self.sabor= sabor self.recipiente= recipiente self.ml= 0 def sabor(self): print("O sabor que pediu é: ", (self.sabor)) def…
-
0
votes2
answers45
viewsCreate a person object as an array within another object
Speak Dev’s! All quiet? Look, I’m sorry if there’s already this topic...... The help is a bit Noob, but will be of great value <3 This is the code: /*BASE DE DADOS*/ var pessoas = { pessoa: {…
-
0
votes1
answer52
viewsJavascript - function that retouches an object
I’m trying to pass a challenge and I’m having a hard time getting through the following topics: Write a function called createCars which will receive three arguments: name, stars and brand. This…
-
0
votes1
answer34
viewsUse variables to define an object or not?
Recently watching some tutorials, I see programmers omitting the variables in code block. I don’t know what this practice is called, but I wonder if it is recommended, what are the advantages and…
-
0
votes1
answer985
viewsConvert Javascript array to a Javascript object?
The array Javascript below is the result of a query Mysql: json-database.json [ { "id": 1, "node_name": "SP2 - Virtual Private Serve Product", "children_name": "Virtual Private Server CPU",…
-
0
votes1
answer271
viewsObject and Like Array search in Javascript to return the Index find
I recently asked this question Object and Like Array Search in Javascript and it was answered to me in the best possible way, I am studying the documentation but with some difficulties where I came…
-
0
votes0
answers19
viewsQuotes on property name (Javascript)
There is difference between the properties "Gift" and Gift?…
-
0
votes0
answers31
viewsFunction equivalent to $() in a Javascript Object
My idea is this, as I have many repeated tasks, I created a Javascript object and access the functions related to it through the ., for example: Objeto.funcao(params) But I need something like…
-
0
votes2
answers171
viewsI can’t get content (number) of some tags read
The idea is to take a sequence of values arranged in li’s that share the same class, convert to integer, add to then perform a conditional test. I’m using…
-
0
votes4
answers830
viewsHow to search for value in Array/object in PHP?
Personal I have the following array: stdClass Object ( [Chats] => Array ( [0] => stdClass Object ( [Chat] => stdClass Object ( [ChatId] => 13383 [UserId] => a2784a6dcf [SystemId]…