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.

12,867 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

15 30 50 per page
1
2 3 4 5
429