Questions tagged [object]

An object is any entity that can be manipulated by commands in a 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.

-3
votes
0answers
15 views

How can I get my code to check if the other objects have been done before?

I have this shop I have set up that is supposed to calculate the discount and amount of product a user inputs. My problem is when choosing a function (1, 2, 3, 4 ) I am not getting the output I ...
-1
votes
0answers
41 views

Nested keys in a JavaScript object

I have a problem and I think it has something to do with the ".show('selector'," is blocking attempts to access nested keys [ ie: 'target' ]. Attempted: console.log(Object.keys(radar)); Logs: (2) [...
0
votes
0answers
5 views

How to embed a word file object into html/javascript code that generates word document?

I have code that generates a word document based on dynamic inputs from users. Basically creates an html table as a string then converts to word document. I would like to embed any attachments the ...
-2
votes
1answer
44 views

What is the difference between- Employee e = new Employee(); and Employee e;

What is the difference between- Employee e = new Employee(); and Employee e; If Employee is a class. Where would we use it in programs to satisfy our code? Thanks.
1
vote
1answer
29 views

How can I get the name of a property from inside an object to create a new property name?

I know there are a few other posts on this topic, but they don't seem to address my issue: link. I want to be able to dynamically get the name of a specific property in an object so that I can use it ...
0
votes
2answers
34 views

How to acces a nested json value when it has no key? [duplicate]

How can you access a nested json value when the value has no key? im trying to access the "2019-03-19T22:57:47.972Z" value of this json object: var json = {"metaData":[{"name":"ACTION_NAME"},{"name":...
-2
votes
0answers
19 views

react-redux “Uncaught TypeError: object is not a function”

render() { const { robots } = this.state; const { searchfield, onSearchchange } = this.props; const filteredRobots = robots.filter(robot => { return ( robot.name.toLowerCase() + ...
0
votes
3answers
56 views

Vanilla Javascript merge JSON array objects into nested array if match a common value

I was unable to find a solution that is identical with the issue I am trying to solve. If is a duplicate kindly provide a link to a solution. Using vanilla Javascript, merge array of objects that has ...
0
votes
1answer
35 views

Problem creating const object in TypeScript

I'm getting the following error when trying to compile my code on Angular 7.2.0 with TypeScript version 3.2.2: error TS1005: ',' expected.**… It is linked to the line where I try to declare a ...
-3
votes
1answer
64 views

I dont feel “object” keyword replacing java's singletone class in kotlin is usefull..please change my mind [on hold]

Kotlin object Dog{ val name="Doggy" } i dont find the above is useful because it is not a singletone class. when i decompile the code the variableis of static type.(it should be instance variable ...
0
votes
1answer
50 views

Add object to php array in symfony

I currently have 2 classes: workerListClass workerClass The workerListClass gets a list of work with ids from database. For each of these the workerClass is called foreach ($query as $value) { ...
0
votes
3answers
58 views

Understanding generation of 52 card ojects

I have managed to output 52 different "cards" to the console however the checks I performed to see if I was generating individual objects seem to indicate I have gone wrong somewhere. Such as my num ...
-1
votes
2answers
43 views

C# Json.Net - How to deserialize an array of objects containing an array of other objects

The Json data received from the http server is like this: [ { "token":"NlhYnzF0xqG" }, [ { "ts":"2019-03-21 14:06:22.123", "id":"CC_RTC_Second", "val":"...
2
votes
6answers
55 views

Remove object in nested structure by key

I have an array with objects, that can have children, the children have the same structure as the parent, it's just object nesting basically. I'm wondering how I can delete one of the objects by key. ...
-1
votes
1answer
63 views

How to bubble sort objects in array? [duplicate]

I have a bit a of a problem. I'm trying to sort an array with objects in it. The objects are bottles with names, prices and types. The user makes a choice, which bottle he/she want's to add to the ...
0
votes
0answers
8 views

3D Object Localization using PCL

i am trying to localize objects using the PCL library. I am using the code described in the tutorial http://www.pointclouds.org/documentation/tutorials/correspondence_grouping.php#correspondence-...
1
vote
1answer
22 views

Event emitter with conditions

I've created an event emitter class. It works properly. Let me tell you how: This is the class: class EventEmitter{ constructor() { this.events = {}; } on(eventName,callback) { ...
0
votes
2answers
21 views

React Native AsyncStorage not overwriting data

I am trying to make an app and I have a few objects in an array which I use AsyncStorage for. I need to change one element of an object but if I try changing it, it doesn't keep those changes. My ...
0
votes
0answers
32 views

Get and Set System.Object value using Unity SerializedProperties

I want to be able to specify the type with an enum and assign the value to the object variable, but I keep getting 'NullReferenceException ..' error message. I have this simple class: [System....
1
vote
1answer
20 views

How do I rprint an array holding data that corresponds to user inputted data?

I am trying to display the array corresponding to the user's request *in this case it would be to display all car arrays that have the corresponding make and have it printed. (there are 11 car arrays, ...
0
votes
0answers
14 views

How to modify a composition of objects from within the objects

If you have a class that is composed of other sub-classes, how do you make it so that if you modify a property of the sub-class, that change is reflected in the composition class? (Sorry of this is a ...
1
vote
1answer
29 views

How can I update a state inside an array of object with Redux?

My app has 2 tabs and I need to modify the content according the click in tab I have this state: const example = { tabs: [ { id: 111, title: 'Python', icon: 'Python@2x.svg', ...
1
vote
1answer
28 views

Can't make javascript object property value update

Not sure why I can't seem to update a value. I'm using a file uploader and I need to append an invoice number to the file name, so we don't get duplicate files. Here is the code: console.log(data....
0
votes
3answers
29 views

guaranteed indexed object to array in order

extension of this question So I was playing around with a project and I found myself needing to create a string where I didn't know the exact order of the lettering right away, but I did know their ...
0
votes
2answers
19 views

Posting object using ajax to PHP

I'm trying to post to php using ajax. I can't seem to figure why the data isn't been posted. The console.log shows 'success'. var obj shown is for check only. the code: var obj = {'age':'32'}; ...
0
votes
0answers
28 views

Java - How to Pass a User Object Between controllers [duplicate]

I am creating a JavaFX application and I have a User class instance which has 2 variables; username and password. On loginController class, the User object is created and is validated and the next ...
0
votes
1answer
18 views

Java 3D object management design

L.S. For a small project I am creating a mincraft like 3D environment with a little more details. But one thing I noticed is that dynamic object creation has a heavy impact on the performance. So I ...
0
votes
0answers
30 views

React setState insorting array of object

i'm having an issue when trying to sort an array of object by key in react, the thing going on is that i sort my array then call this.setState() and my array is no more sorted.. here's my method: ...
-3
votes
0answers
33 views

I can't access to my object in Array (Symfony)

I have a probleme in my controller, I can not access this data shown in the image below: When I do $comments[0]->getIdPost() I have this error that appears: Call to a member function getIdPost ()...
-2
votes
0answers
33 views

what does this error mean and how do i fix it

I was building this player object and I got this error on this line of code Player player1 = new Player(); the error is constructor Player in class Player cannot be applied to given types; ...
0
votes
3answers
31 views

Add two more keys and values to a requested array of objects with the same values?

I'm using Node.js to make a Axios request to the Vimeo API. I'm kind of a Noob with Json but I'd like to understand. I made a call to Vimeo with a filter of name, so I get an "array of objects" (I ...
0
votes
2answers
39 views

get value from an array of objects based on value of attribute

I have an array of objects as follows: Identifiers: [ { Identifier: { Source: "TEST", Symbol: "123456", } }, { Identifier: { Source: "TEST2", ...
1
vote
1answer
19 views

Deleting Object from Object navigator in Oracle reports 11g

I have an object called B_19 which I am not able to find in "paper layout". The object is a "Text_Field" and I would like to delete the object. Is there a way to find, where it is located or Is there ...
2
votes
3answers
42 views

remove object inside array inside an object based on id in javascript

as the title say i'm trying to remove an object inside an array inside an object based on an id. Please see my object below: {"satisfied":[], "support": [ {"id":187,"question":"supot1"} ], "agree"...
2
votes
2answers
33 views

Objects inside Array, how to solve this problem?

My question is, how can i access each object inside an Array? or perhaps, how am I supposed to solve this problem? Like I know in head, i have to compare categories and then push into new const ...
0
votes
2answers
30 views

Change object key value

I have this following map over an object with an array of objects Object.values(props.roleRateOptions).map(el => { el.push(shift.roleRate); return el; }) It will return into an array of ...
0
votes
0answers
11 views

Simple tracking of (almost) motionless, appearing/disappearing points on a 2d grid

Given x,y coordinates on different frames, i am trying to track the given points over time. The points do not move by a lot appear (often) disappear (sometimes) My approach so far included ...
0
votes
1answer
52 views

create new object using the database

I want to use my database in order to do the addmodule function but it has to be in a loop and not just 1 module, i want it tot add all data from database to create the addModule function. My database ...
-2
votes
0answers
14 views

How to nested object dynamically? [on hold]

https://i.stack.imgur.com/seVBF.png I Want to create nested object dynamically, using input. obj = { 'id': '', 'children': [] }; if input=2 then o/p should be (I need to insert whole ...
0
votes
0answers
13 views

Upload and display 3d Obj file in html

Im trying to display 3D obj files in HTML. But this displays just numeric values instead of interactive 3D Image. <iframe src=“eternalspring/Eternal spring - retopo.obj” width=“800" height=“800”&...
-2
votes
1answer
29 views

Grouping a multilevel array of objects

I am trying to learn javascript reduce and map an I came across some difficulties. I have an array with the following format. The id of the parent is same as the location_id of the child. I need to ...
0
votes
2answers
28 views

Javascript build a tree from a string with object.create()

I'd like to create a tree of services from a string which are properties of people. I manage to do it, but the code is quite ugly, and it's a king of practice for me for the trick is i'd like to make ...
-3
votes
0answers
37 views

Find object and its associated in an array [on hold]

I've got an array with objects [ { "id": "521018", "name": "object1", "timestamp": "1552593686", "state": "1", "type": "soft" }, { "id": "521087", "name": "object2", ...
0
votes
3answers
33 views

Checking if an element is inside an array contained within an object using JavaScript

I have an object which contains an array of objects like { 0: [ { value:1} { value:2} { value:3} ] } I am trying to check if an element is inside the array,...
2
votes
1answer
24 views

Select from object in pandas

I have a dataframe with an object in the column1. This object contains multiple values per row. I need to iterate over all values in the object, however I can only select the whole row. How can I ...
1
vote
4answers
46 views

StackOverflowError whilst creating object

So this is just a part of my code where I'm trying to make an object. All I added was the body of the constructor. It could be something else wrong in my code but I just wanted to check if this is how ...
2
votes
3answers
85 views

count all values on object array - javascript

I need to count each value on the object array , the desired output should be like below [{ "question": "question1", "USA": 2 }, { "question": "question1", "AUS": 1 }, { ...
0
votes
1answer
25 views

How to (Python Iterate from a json array of objects)

What is the best way to iterate from an array of objects and use that data to update selected rows in a database table ? I wanted to update data from the database where id = tasklist, id from the ...
0
votes
3answers
49 views

How to insert/add an object to object array?

I thought the below is logically sound in adding or inserting object into an object array but the result I am getting is funky. Can someone please tell me what I am doing wrong here?? Why is below ...
1
vote
6answers
35 views

Convert single object into array of objects

I have an object that looks like: var data = {first: '12/1/2019', second: '12/15/2019'} I am trying to get into an array of objects using its keys and values like so: var array = [ {phase: '...

http://mssss.yulina-kosm.ru