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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

Unused "data =" argument in compare_groups

I am quite novice at R and the packages I am using here. I am attempting to run compare_groups to identify differentially abundant microbes to use for the TransNetDemo package. I am running the ...
noahhutch's user avatar
0 votes
1 answer
10 views

How to name 2 parameters for old and new entity state in an update/creation method?

Our (Java) project deals with multiple entities stored in a relational database. For example, we deal with persons. We have service methods (on singletons) which allow creation or modification of ...
Philippe Cloutier's user avatar
-1 votes
1 answer
41 views

Js extract information from a json

I have the following json that is quite complex and detailed. I need to extrapolate information (text) from the json only if the resource-id contains the following text "com.shazam.android:id/&...
Paul's user avatar
  • 3,692
0 votes
0 answers
5 views

dict object has no attribute finished from ansible async

I have ansible code like ``` - name: "Upgrade" package: name=* state=latest register: update_cmd async: 1800 poll: 0 - name: Wait for the os patch to complete async_status: ...
mix's user avatar
  • 1
0 votes
0 answers
25 views

Building a class,instance and inheritance system in kotlin

Hello i am going through the composing programs which is originally written in python, The full code implementation of what i want to achieve can be found here https://www.composingprograms.com/pages/...
rakesh s's user avatar
0 votes
3 answers
75 views

How do I initialize a class in Java, while the class I want to initialize will vary based on a variable?

I'm trying to make a terminal program that will initialize a class based on input from the user. Is there a way that I can initialize a specific class using a String variable without cluttering up my ...
Dominic Miller's user avatar
2 votes
0 answers
29 views

It's possible to have fixed properties in object with TypeScript? [duplicate]

Using spread operators, properties are widened so bug traces become hard. Can I prevent from properties widening? type Fields = {prop1:string; prop2:number}; // Here, it's no problem. I can't add any ...
iamippei's user avatar
  • 168
0 votes
3 answers
38 views

PHP Get the value of every occurrence of a key in a multidimensional array

How would you extract every value of a key regardless of how deep or shallow it is in an array. Here is a sample JSON array. I want to grab every occurrence of "content" and concatenate them ...
Walrus's user avatar
  • 19.8k
0 votes
0 answers
6 views

How to check if a value exists in first or second table?

I have two tables and both tables have a field with the same name (mobile). I want to make sure that neither table contains the value. I want to know how many rows the phone has in either table. my ...
rcweb's user avatar
  • 65
0 votes
2 answers
56 views

How to extract subtree of the javascript object

I have large JSON object returned by my nodejs API server. I want to give users ability to query subset of fields similar to GraphQL but without schema. Object that is returned by API have set of ...
Andrei V's user avatar
  • 1,478
0 votes
1 answer
28 views

Conditionally adding to an object literal in javascript [closed]

I would like to conditionally fill a property based on the target type. I need to do this inside an event handler for a form (react). I would like an if/else statements situations that encompasses ...
Codelleschi's user avatar
0 votes
1 answer
20 views

React Native - Destructuring parameter item in renderItem FlatList attribute

I'm porting a ReactJS project over React Native, and I'm trying to learn Native's Components. I want to display a list/sequence of track cards after fetching their data from Musixmatch and Spotify. In ...
GD1's user avatar
  • 99
0 votes
0 answers
27 views

why the equals method of object class is called instead of Arrays class while working with arrays [duplicate]

int[] arr={1,2,3}; int[] arr1={1,2,3}; System.out.print(arr.equals(arr1));//false When I use arr.equals(arr1) .equals() of Object.class is called instead of Arrays.class why???? if .equals() of ...
Ajay Subramaniam's user avatar
1 vote
1 answer
22 views

No index signature with a parameter of type 'string' was found on type '{}' - TypeScript

I read key value pairs from a file, the key is string and the value is {r,g,b} numbers. colorNames.json file: { "name1": { "r": 151, "g": 23, "b": 26 }, &...
Greg's user avatar
  • 13
-2 votes
0 answers
37 views

Sum the array objects once [closed]

UPDATED Sum the amount only once for objects where 'B' OR 'R' exist in timeFrameFiltered. let data = [ { timeFrameFiltered: [0, 0, 'B', 'B', 0], amount: 4000 }, { timeFrameFiltered: [...
The Dead Man's user avatar
  • 6,256
0 votes
1 answer
75 views

Why gcc accepts initializing the static variable within the method to the field of the object?

class MyClass { public: int obj_field; MyClass(int val) : obj_field(val) {} void myMethod() { static int my_static_var = obj_field; // <--- Why is this okay? // ... ...
Audrius Meškauskas's user avatar
-3 votes
2 answers
26 views

How to iterate json object

I have the following json object and trying to iterate with jQuery each but it only returns one iteration. What am I not doing right? var data = "{ "SIEcat4": { "3001": { "test": "test"...
Kevin Lindmark's user avatar
1 vote
1 answer
44 views

Copy elision of overlapping objects

Reference: Copy Elision This can only apply when the object being initialized is known not to be a potentially-overlapping subobject: struct C { /* ... */ }; C f(); struct D; D g(); struct D : C { ...
Vinod's user avatar
  • 1,031
0 votes
1 answer
55 views

Java wait0() native implementation source [closed]

I was looking into Object.wait for Java and found out that it internally calls a wait0() method. You can find it's declaration in openJdk here: public final void wait(long timeoutMillis) throws ...
Siddhant Swami's user avatar
0 votes
0 answers
16 views

Tracking object in online streaming video

Well, i need a software or online services that can choose object in video and tracking it. Object must be highlighted cause in the video a lot of (at least 3) moving objects and a software highlight ...
PRINC4E's user avatar
0 votes
1 answer
55 views

DWScript: Property getter/setter for object

The tdwsUnit declares a property of type TObject, as well as a getter and a setter. An instantiated object shall be stored in an "object store" on the Delphi side. The goal is to transport ...
LuWey's user avatar
  • 29
1 vote
1 answer
22 views

How to create objects in foundry?

Recently started working on palantir's foundry. The documentation is poor, unable to figure out how to create objects at the first place. I was able to create an object type, however poorly configured,...
Saurabhkew's user avatar
0 votes
0 answers
8 views

"Trend log Object" in BACnet Protocol

How to read or Display the Trend log Object's properties Value by using the BAC0 library in BACnet protocol ? if anyone know better information, Share proper explanation with good example I tried with ...
BACnet's user avatar
  • 1
1 vote
3 answers
60 views

How to reduce one of the duplicate object from array of objects by id

I have an array of objects: const obj = [{ id: 1, name: 'A' }, { id: 1, name: 'A' }, { id: 1, name: 'A' }, { id: 2, name: 'A' }, { id: 2, name: 'A' }] // this method returned ...
Almaz Kabiyev's user avatar
-1 votes
1 answer
14 views

Ovh object analysis

Context: I currently have a project where several audio files (wav) are saved using OVH cloud. This objects are managed from my application using the S3 APIs. Issue: A member from my team, needs to ...
The beep's user avatar
0 votes
0 answers
36 views

Loop object get value from input and change object value

I have a multidimensional object with several variable levels. For each value corresponds an input whose name is in the form par1-par1_1-c1-type (for example). I want to iterate over the object to get ...
usualuser's user avatar
-2 votes
2 answers
66 views

For a class, how should I decide whether to pass a variable as a parameter, or set as an instance or global variable? [closed]

I'm learning OOP, and I'm very confused about how to best handle variables inside/outside classes. For instance, let's say I want to access a certain variable within a specific method of a class. ...
Danny_webb's user avatar
0 votes
2 answers
53 views

Accessing Nested Objects in JavaScript where inner objects have serial numbers as labels [duplicate]

I have a nested object where the inner objects have random serial numbers as their labels. If I have data like this: const user = { id: 101, email: 'jack@dev.com', personalInfo: { ...
Einarr's user avatar
  • 224
-1 votes
1 answer
36 views

useState has its own memoazation?

I'm encountering a warning related to React Hooks and state management that I would like to better understand. I have two code examples, and I'm curious about why one triggers a warning and the other ...
kristina malozh's user avatar
-1 votes
1 answer
30 views

How to loop on array or objects then getting a random value [closed]

If my set up is like this: const arr = [ { name: "hi", value: "hello", rarity: "50%" } { name: "hello", value: "40%"} ] How can I loop ...
Theorist's user avatar
-1 votes
1 answer
25 views

Combine objects in an array with similar labels to a string

I am trying to combine options values that have the same label value. I need to extract the label from each {} section and all the options values for that label into a string for each {} section. ...
Einarr's user avatar
  • 224
-3 votes
0 answers
24 views

Java Object Modeling: Should you have smaller and bigger version of same object? [closed]

Let's say I have a User object and that have almost 50+ attributes. What will be best practice. Is it ok to have one smaller version of User object will 10 attributes but if the user want all data, ...
plzdontkillme's user avatar
0 votes
0 answers
8 views

Labeling an object by number

I want to label values of a column (Address) that has object dtype with number. the number that is to be labeled is average of two columns(Area and price). dataset if we convert them to separate ...
عباس عباس پور's user avatar
0 votes
0 answers
23 views

i am showing this error ----> ".addEventListener is not a function " [closed]

HERE IS MY HTML CODE <body> <div class="main-order"> <div> <h1>WHAT'S ON YOUR MIND?</h1> </div> <div class=&...
sahilkundu's user avatar
0 votes
1 answer
17 views

Is there a way to pass a Object as param to router in VueJS 3 (Composition API + script setup)?

In this project, there's the user which is a js object, like this: const user = { "ID": id, "NAME": name, "EMAIL": email, ... } And here's the router on VueJS: { ...
Developer's user avatar
1 vote
2 answers
46 views

Java reference semantic and saving/loading object files

I learn that in Java, when you add object to list, you only add references so if you modify object, all lists that have the reference will change Say that I have an ArrayList<Product> ...
Ellie's user avatar
  • 11
0 votes
1 answer
29 views

Change specific object value after array is flattened with reduce, how to?

I've got an nested array of objects, which could go multiple levels deep. For other purposes I had to flatten the array of objects to 1 level (non-nested) array. How can I update 1 specific object ...
Petervw's user avatar
  • 39
0 votes
0 answers
22 views

how to access webcam from object tag - Javascript

I got error msg : DOMException: Permission denied I have my app loaded intro : <object id="gameplay" class="gameplay" data="${this.links[0]}"></object> ...
Nikola Lukic's user avatar
  • 4,031
0 votes
0 answers
7 views

Passing caller object in a method through other method in java with the help of "this" keyword

I am facing problem while passing current caller object to other method with the use of "this " keyword and I am getting error please look into my issue below are the screenshot of my ...
Shubham Raj's user avatar
-1 votes
0 answers
32 views

Python Inheritance not working as intended [closed]

I am new to Python and can't figure out what is happening to the inherited objects. This is a reproducible example of what I am trying to do... class HipHop(object): def __init__(self): ...
Nitin Rattu's user avatar
1 vote
0 answers
55 views

How to pass a python object from a robot framework test case to a keyword?

I'm kind of new in Python and robot framework. So I might miss something obvious. I have experience in .NET programming and used to work with entities/object, which we used for database filling and ...
Kuelbiroe's user avatar
0 votes
2 answers
36 views

Problems accessing var in kotlin object (singleton)

Having this object: object BarManager { private var bars = mutableMapOf<String, Bar>() } Can't access bars like this: BarManager.bars[name] It gives me this error: Cannot access 'bars': ...
NullPointerException's user avatar
-3 votes
0 answers
27 views

Why does this put out undefined [closed]

const cuong = { firstName: 'Cuong', lastName: 'Pham', birthYear: 2003, job: 'student', friends: ['Micheal', 'Jonas', 'Mike'], hasDriverLicense: true, // calcAge: function (...
Phạm Cường's user avatar
0 votes
0 answers
34 views

How to use nested object values ​and keys

How to convert a function to get a response with structure when nested objects { array[0][key]: array[0], array[1][key]: array[1], _${key}s: [array[0][key], array[1][key]] } I get the desired ...
Kamal's user avatar
  • 15
0 votes
0 answers
12 views

How to structure a cart with cart products object

I am new to DDD and I am having trouble structuring an object. I have a cart, where I can add products to it. Each product has some properties like image, title, price, etc. Whenever a product is ...
Bernardo Benini Fantin's user avatar
-1 votes
0 answers
21 views

How to fix "TypeError: Right-hand side of 'instanceof' is not callable" in Vue 3 + Typescript

I already solved my problem. Just in case someone else has the same problem. I have a vue 3 project with typescript. The problem was in the following code: <script setup lang="ts"> ...
D4lister's user avatar
0 votes
2 answers
78 views

typescript adding object to an array using push()

my data element contains: {"records":[{"id":2463534,"token":"135","name":"MNC Rental","number":"0"},{"id":...
hansvdzz's user avatar
0 votes
0 answers
9 views

Finding a layer in Visual Laser Marker

I have a problem with execution. When I try to execute I got message that there is missing a reference in VLM. The error is:969xxxxxx.vlm:Object'Group1234', ID = 123 reference missing QP-set'Layer' I ...
Miloš Simonović's user avatar
0 votes
0 answers
20 views

object ref required and no formal argument given [closed]

i can't really figure this out i been googling for about a week now and still dont understand what i do wrong. i'm about to fill a array with string values like name, social nr, city, and number of ...
Groundzero's user avatar
-2 votes
1 answer
49 views

How use Object while creating Generic class?

I want to create a generic class of Object. class Calculator<Object> { // addition function for addition of two numbers (Integer , Float) Object addition(Object first, Object ...
Onkar Dighe's user avatar

1
2 3 4 5
1299