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,887 questions with no upvoted or accepted answers
14 votes
0 answers
5k 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
704 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
6 votes
0 answers
980 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,285
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
551 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
398 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
264 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

15 30 50 per page
1
2 3 4 5
860