64,997 questions
1
vote
1
answer
68
views
How to validate attribute relative to another when instantiating class
From this answer and similar blog posts I've used the decorator method to do data validation when creating a class. But now I need to validate one attribute relative to another. E.g.:
class Planet:
...
Advice
0
votes
3
replies
65
views
How many JSON objects can you nestle into each other?
Just started learning JSON with C# and i was wondering how many objects you could nestle into another object?
My best guess would be 255.
Also, is this a common practice in actual websites? I have not ...
-3
votes
2
answers
96
views
Issues with trying to access a property of an object created [duplicate]
I'm collecting an array of data, saving it as array of custom objects, then trying to map it to a table. I have a constructor for my object type:
function cellData(x, value, y){
this.x = x;
...
4
votes
2
answers
143
views
Get multiple indexes of an array at once, for comparison
I am working on a Tic_Tac_Toe project. I have an object (gameBoard) that contains an array, then I have another object that i want to create a player from to play on the board, then I have a function ...
Advice
0
votes
1
replies
81
views
Create an X word combination linked to a specific set of data
To start, here is an example:
When a messenger app wants you to share your contact information, they assign you a random 4-6 word combination (e.g. TIGER-TRUCK-FIRES-GHOST-TILES) that acts as a human ...
-2
votes
1
answer
143
views
Filtering array object that also returns indexes as well as the filtered result [closed]
I have the following code that contains an array of different book titles in subsequent objects. The code I have that filters the array is fine and returns the right information. However is there a ...
Best practices
0
votes
3
replies
69
views
javascript: `Object.create(null)` vs `{}`
Does const obj = Object.create(null) create less overhead than just const obj = {} ?
Maybe Object.create(null) even worse for performance?
If i don't need to have properties like hasOwnProperty from ...
Advice
0
votes
0
replies
58
views
how should I check effect of using ‘return as locator’ if its possible to track changes through column size after data insert?
Refer to object-relational-developers-guide/Nested Table Locators
‘For large child sets, the parent row and a locator to the child set
can be returned so that the child rows can be accessed on demand; ...
Advice
0
votes
3
replies
96
views
How to select ref OID without table object join when type is ref with OID?
Please see following statements and let me know is it possible to
have ref rowid same as other fields in mentioned select without adding
table object join which is t_tab_object here because ref is ...
Best practices
0
votes
5
replies
106
views
Option Array, locating and returning array with correct criteria
I have an object db that has one field containing SKU's that correspond to another object that contains different venues.
db.SKU = [1002,1005,1001,1008,1007];
I then have another object listing the ...
1
vote
1
answer
66
views
stripe php looping through metadata object issue
I am having problems getting the php 'foreach' to work with a Stripe object.
i can run the following command which gives me expected results:
error_log(gettype($event->data->object->metadata))...
7
votes
5
answers
910
views
Updating object properties with array elements
I have an object with nested properties. I want to update those nested properties by using an array of elements that reflect the nested sequence of the object. Also if a property does not exist, then ...
0
votes
0
answers
52
views
Required support for Detectron2 to ONNX conversion
Currently I am working on Object Detection model. I have trained a model, want to convert to ONNX format for real time inference and deploy in the field but I am unable to determine how to convert to ...
1
vote
1
answer
73
views
What does TCreate[keyof TCreate] mean in TypeScript?
I already know that that keyof TCreate produces literal union of its keys in the type TCreate. But I’m confused about what TCreate[keyof TCreate] represents.
Why do we write it this way?
How does it ...
1
vote
2
answers
231
views
how to change tag.data from Object(TagPigeon) to map
nfc_manager was recently updraded to 4.0.2. In the update, data types changed for NfcTag, as it previously was a Map<String,dynamic>, but is now an Object. I am now unable to obtain the ...