Skip to main content

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.

object
12,877 questions with no upvoted or accepted answers
14 votes
0 answers
6k views

Can phpunit compare two different objects asserting that their properties are identical?

This following test passes because true == 1, but I would like to write a test that fails since true !== 1. $stdClass1 = new stdClass(); $stdClass1->foo = true; $stdClass2 = new stdClass(); $...
Leo Galleguillos's user avatar
8 votes
0 answers
706 views

Modify a JSON file while preserving object key order

What is a good way to parse a JSON file in NodeJS, make minor modifications to it, then write it back to disk, without changing the order of any of the keys of any of the objects within it? To ...
Steve Bennett's user avatar
7 votes
0 answers
3k views

Prettier settings to format object-destructuring until end of the line, instead of new line for every property

instead of this do this It could take only 2 lines not making my file longer than needed.
Rastislav Uhrin's user avatar
7 votes
0 answers
988 views

JS: Object.defineProperty() and Proxy

What's the difference between Object.defineProperty() and Proxy? On my view they do really the same in essence being useful only for implementation of reactivity, validation and defaults. So it just ...
SerG's user avatar
  • 1,313
6 votes
0 answers
638 views

Why won't Google Tag Manager's Macro pass object content of a variable

So I have a custom javascript variable in GTM: function(){ var products = {{dlv ecommerce products}}; var prodinfo = []; for(var i = 0; i < products.length; i++){ prodinfo.push({ ...
user68703's user avatar
6 votes
2 answers
270 views

multiple single object trackers does it give multiple object tracker

Can multiple single object trackers be used to get a multiple object tracker? if it is feasible, would it give a better performance than existing Multiple object trackers.
Chetan Kota's user avatar
6 votes
1 answer
2k views

Is there a proper way to create a scriptproperty in a Powershell 5 class

In Powershell versions prior to 5, objects could be created "on the go" with New-Object, and could be extended with Add-Member. Powershell 5 introduced classes, but it seems they only allow basic ...
Xavier Plantefève's user avatar
6 votes
0 answers
552 views

PHP & Geometry - how to elegantly compute common object orientation (length/width/height)?

I am trying to get PHP to adjust some array values so that in all instances of objects being passed through the functionality, it will compare length width and height of those array values, and align ...
DRT's user avatar
  • 69
6 votes
1 answer
2k views

mapping complex class with NPOCO

Is it possible to map a complex class with both a nested class and a collection class with NPoco? I've had a look at the documentation but it's not 100% clear whether i can map to this class with one ...
sin cara's user avatar
  • 123
6 votes
1 answer
3k views

Facebook: How to get Object id from url

I am trying to Implement Facebook comments api(See this question if you got time), I need to get an Object id, all what I have is Object URL. If I will use Facebook debug, they are giving me some ...
Ilya Gazman's user avatar
  • 31.9k
6 votes
1 answer
2k views

Android Passing BluetoothSocket to the next Activity

After connecting to the bluetooth, I need the child to send data out through that socket. But how do I get the socket over to the childActivity?
GJianHui's user avatar
5 votes
1 answer
1k views

Is there a tutorial for using tensorflow object detection API for training object and key point detection?

This link provides a Google Colab notebook for inference of CenterNet HourGlass104 Keypoints 512x512 for object detection and pose key point detection. Is there a similar notebook or tutorial to ...
user3317287's user avatar
5 votes
0 answers
399 views

JavaScript - proxy object to behave like primitive

I'm trying to build a system that "caches" calls to a library before that library has loaded. This is similar to what the Google Analytics "setup" code is doing with the _gaq variable - it's ...
Tibi Neagu's user avatar
5 votes
0 answers
266 views

CarrierWave object update with existing file url

I'm using CarrierWave for file upload in my project. At the beginning of the implementation process, we've made a mistake and eventually a bunch of objects been uploaded to s3 with minor file naming ...
Helen_M's user avatar
  • 103
5 votes
1 answer
70 views

Why a global object properties aren't updating after function?

I'm trying to create a game, and the first step of it is the character selection through html-select. When the user chooses an option, through function (including a "switch"), a previously ...
zarex97's user avatar
  • 51
5 votes
0 answers
2k views

VueJS v-model for object prop through nested components doesn't make update them as expected

I'm developing an application form. The components tree of it: Application Form Fieldset Field The Application component has configuration props for the Form component called ...
shpindler's user avatar
  • 377
5 votes
0 answers
5k views

Axios 'get' request returns string instead of object

I'm having an issue with using axios. The axios get request returns String instead of Object. If I use Ajax request, It returns object. I did console.log the response.data using axios Using the Ajax ...
MachoBoy's user avatar
  • 171
5 votes
0 answers
1k views

Pointer Events: None Not working in IOs

JSFiddle Link When SVG image is clicked, alert function does not trigger in IPhone. (It works in android). How can I make this workin IPhone without using z-index and overlay div? HTML <div ...
HOY's user avatar
  • 987
5 votes
4 answers
228 views

java referencing objects that are not in scope

one question that always pops up when my java project gets bigger is if there is an easy way of making references to a specific object thats cannot be referenced by super or getParent(). The following ...
gimba's user avatar
  • 511
5 votes
0 answers
951 views

Get more detail about a view in View Hierarchy object inspector

I'm trying to debug an app where some cells in a table view are getting highlighted depending on the state of one of their member variables. The highlighting is done in the setSelected function, ...
Skwiggs's user avatar
  • 1,436
5 votes
1 answer
258 views

Can I make one object have the same order as another object?

I know that the title of this question already doesn't make sense because objects are unordered by their nature. BUT, I think if you take a look at this screen shot that's linked here, it'll make more ...
amacdonald's user avatar
5 votes
0 answers
154 views

How are Storage Objects created from a file on Object Storage Cloud?

I am defining Objects broken down from a file to be stored in Object Storage Cloud, as Storage Objects. What I know: I have read documents and papers about object storage cloud. Most of the time, ...
Zwon's user avatar
  • 51
5 votes
1 answer
456 views

InvalidOperationException when Serializing an object with a IXmlSerializable object

I've come across some interesting behavior with the XmlSerializer. If I try to serialize a class that has a property of Type object and that object implements IXmlSerializable, the serializer will ...
Kyle Uithoven's user avatar
5 votes
3 answers
6k views

SVG Image File Shows XML Code Instead Of Image

I have been searching the web for the past few days to solve my problem and exported my file different ways from Illustrator and it all ends up the same. I have edited my .htaccess file to include "...
flight3's user avatar
  • 51
5 votes
0 answers
924 views

Inheriting from 'object' breaks __getstate__ & __setstate__?

Setting up a base class to handle keeping track of class instances while still allowing garbage collection. The second answer from this post is close, but I also need to add to the instances list when ...
daedalus12's user avatar
5 votes
1 answer
5k views

How do I Serialize a jQuery Object Array for JSON Post?

I'm going bananas trying to figure out how to serialize this (in MVC 3): // 1. I load the products array in the View: var products = []; if (quantity > 0) { products.push({ ...
Radu's user avatar
  • 51
4 votes
1 answer
109 views

Store a constant reference in an S4 object - R

I'm programming a neuroscientific software with R. I principally operate with two S4 classes, eeg and analysis. Every instance of the second is the result of calling a certain function in an instance ...
lafinur's user avatar
  • 326
4 votes
1 answer
937 views

how to collapse objects in storybook controls

I searched through storybook's documentation for react and I can't seem to find how to make the object control for my argument appear collapsed by default instead of having to collapse it manually. ...
DeathSh0t's user avatar
4 votes
0 answers
294 views

Can't reach inner document in object tag in React

I'm trying to make a preview of a pdf document using only the object or iframe tag. My goal is to remove the toolbar and the scrollbar and correctly move the file to have a good looking image of my ...
hugo.heer's user avatar
4 votes
0 answers
2k views

Sending nested json object with file using Postman

I figured out how to send a file next to other params using form-data. Now I need to send a file inside a nested object, specificially the file key is inside a key and then in an array. Like this: &...
poolitzer's user avatar
4 votes
0 answers
268 views

Error loading a TF lite format model in ios device for custom object detection

I have trained a custom object detection, using transfer learning based on MobileNetV2. I converted the model to tflite format so that I can run it on my IOS device. However, when I run the model in ...
Taral 's user avatar
  • 51
4 votes
3 answers
452 views

JS: Delete Object Key if all nested Values equal null

From a given data structure (json file) I basically need to render a table. Empty rows and/or columns should not render. I'm fairly new to JavaScript and tried different approaches (converting to ...
chef_digital's user avatar
4 votes
1 answer
2k views

JavaScript Arrays vs Objects performance

I am witnessing some magic over here. First of all, this is a pretty common question and believe me I've done my research, so please before you mark this as duplicate, first hear me out. The ...
Awa Melvine's user avatar
  • 4,017
4 votes
1 answer
80 views

What are the Array "property lists" called and how are they different from simple objects?

I was playing around in Node and accidentally mistyped the curly brackets ({}) and put square brackets ([]) instead, and started using the variable as a simple object. No error has been thrown, and ...
toraritte's user avatar
  • 7,615
4 votes
0 answers
243 views

Javascript memory heap issue on permutating two big array in node js

var array1=[{ product_code:"test1", series:"11w" }, { product_code:"test2", series:"12w" }, ...
Karthik's user avatar
  • 295
4 votes
2 answers
126 views

Map relationships between Array Objects

Given the JSON of various Pokemon Battles: [ { "battleID": "1", "trainers": [ { "LastName": "Ketchum", "ForeName": "Ash" }, ...
SaintPepsi's user avatar
4 votes
1 answer
4k views

When to deep clone objects in React

I recently learned the hard and long way about shallow and deep cloning of objects and the relationship that exists between shallow cloned objects after doing something like this: this.state = { ...
Donovan Hiland's user avatar
4 votes
0 answers
2k views

jquery Add file object to FileList object

I'm trying to create simple image uploader for my website, but I have one problem. When I want to add my new image to previous selected image can't hold old selected images (because new FileList ...
FarbodKain's user avatar
4 votes
0 answers
1k views

Java Arabic string date parse to date object

Can you please let me know how we can parse arabic date in String format as shown below to date object: DateTimeFormatter.ofpattern("yyyy dd MMMM",locale).format(islamicDate)); Now got arabic date ...
sajidbigler's user avatar
4 votes
2 answers
10k views

How do I initialize a multidimensional array of Objects in TypeScript?

I'm working on a project where I need to procedurally generate a number of tiles which define a game board. My plan is to hold these 'Tile' objects in a multi-dimensional array property of a 'Land' ...
calebjmatthews's user avatar
4 votes
0 answers
611 views

How can I pass an argument to the __init__() of an rpyc.SlaveService object?

This is my working code: class RPyCService(rpyc.SlaveService): def __init__(self, conn): super(RPyCService, self).__init__(conn) ... from rpyc.utils.server import ThreadedServer ...
langlauf.io's user avatar
  • 3,111
4 votes
2 answers
218 views

Javascript Search Nested Object with Regex

I have this: var foo = { "Category1": [ {"Company1": {"URL": ["DomainName1", "DomainName2"]}}, ... ], ... } Normally, I would access ...
user5013538's user avatar
4 votes
0 answers
1k views

HTML/CSS-Removing the gray edges around a pdf object

I am trying to put a pdf object on my web page. The pdf loads fine, but it creates a gray area around the document. I know that the gray area is part of the pdf document and it is just part of the ...
Alexander McCoy's user avatar
4 votes
1 answer
100 views

How to avoid duplicate objects?

I'm making a quiz. A user first chooses how many questions he/she wants to answer and then gets to answer them. After they've answered the questions there is a "Back to start"-button that takes them ...
Filip's user avatar
  • 41
4 votes
0 answers
284 views

What is faster to search in hashmap/object or array in mongodb?

We have 3 entities. Article Note Comment Article can have 0 or many Notes and Note can have 0 or many Comments Our actions 1. We want to fetch from db single Note by Note id 2. We want to add new ...
Matej Polák's user avatar
4 votes
1 answer
2k views

Defining setter for Ember Object property

I have an Ember.Object Foo with property message: Foo = Ember.Object.extend({ message: null When this.set('message', value) is executed, I want to modify the value variable before it is set on ...
dylanmensaert's user avatar
4 votes
0 answers
625 views

Workaround to allow reserved words to be used as property names on IE8?

Summary I want to use class as a property name of an object, and access it using dot notation. Preamble I already know that, according to ECMA-262 5.1 Edition / June 2011 (page number 19, page 31), ...
Oriol's user avatar
  • 284k
4 votes
0 answers
899 views

Is it possible to embed a mysql.dll in a Excel file by adding it to the .xlsm.zip file?

The client machine running the Excel workbook may or may not have the object library for MySQL installed. I do not want the client to have to install anything to run the workbook. I know it is ...
user3032510's user avatar
4 votes
0 answers
5k views

Android/Java: Class not loaded

I have been bugging some code and noticed that for some reason now I am getting this object error com.result.mobile.ui.R.drawable.outwards = Class not loaded : com.result.mobile.ui.R Sometimes ...
Sambuxc's user avatar
  • 470
4 votes
0 answers
298 views

How to enable object type button?

My python function returns an action url after which my button disables. OpenERP adds an attribute disable="disable" to my button . I don't want to disable button. My code is <button name="...
Anuradha Nair's user avatar

15 30 50 per page
1
2 3 4 5
258