Skip to main content
Filter by
Sorted by
Tagged with
Best practices
0 votes
5 replies
92 views

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 ...
Powl_London's user avatar
-8 votes
0 answers
115 views

I need to create an arraylist, that contains an array of objects to act as the rows of a table, like this: ArrayList<Object[]> rows = new ArrayList<>(); each of these Object[] arrays will ...
Luna's user avatar
  • 1
2 votes
1 answer
55 views

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))...
edwardsmarkf's user avatar
  • 1,445
7 votes
5 answers
872 views

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 ...
a6e b0a's user avatar
  • 91
0 votes
0 answers
39 views

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 ...
Jiwan Rai's user avatar
1 vote
1 answer
66 views

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 ...
Ayush Mishra's user avatar
0 votes
1 answer
119 views

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 ...
user30926822's user avatar
1 vote
4 answers
123 views

I tried turn a Array of Number into an Object whose keys will be array Items and values will be true. But i got this An object whose keys are arranged in ascending order. And The repeated No.s aren't ...
Yogesh Kumar Verma's user avatar
0 votes
0 answers
94 views

I’ve been working with C# for 4 months. I’ve gained some experience, good and bad. Lately, I wanted to focus more on the concept of objects. There’s a very important point that has been bothering me. ...
Ekin King Ekin's user avatar
-2 votes
2 answers
94 views

I have an array of objects with a name and a value that looks like this (sorted by values): var array = [ { Name: "F", Value: 320 }, { Name: "E", Value: 321 }, { Name: ...
Viktor's user avatar
  • 63
2 votes
1 answer
110 views

I'm trying to write a function TypeNameEx which will return a string which, using a call to VarType(), effectively identifies the type of a a (variant) variable, eg VarType 2 returns integer and ...
SVCooper's user avatar
-4 votes
3 answers
103 views

I wrote the algorithm below and asked an AI to evaluate my solution. //TESTS: console.log(firstNonRepeatingCharacter('abacabaz')) //c console.log(firstNonRepeatingCharacter('aabbccdeefgghijj')) //d ...
claudiopb's user avatar
  • 1,094
1 vote
0 answers
29 views

I have a complex but well-typed constant object such that no matter what the first and second level keys are, there is always a particular known key at the third level (in the example below, moons). ...
WBT's user avatar
  • 2,562
-2 votes
1 answer
90 views

I have an array of "shift times" and "absence times", and I'm trying to to subtract the absence time from the corresponding shift time via nested loop, to return the available ...
Destramic's user avatar
1 vote
3 answers
90 views

Trying to build a very simple stack structure : (define (make-stack lst) (lambda message (case (car message) ((see) (newline) (write lst)) ((empty?) (null? lst)) ((push) (begin ...
david's user avatar
  • 1,593
1 vote
1 answer
71 views

I would like to intercept all instance creations of EventSource. I tried the following code: EventSource.prototype.constructor = function(url, config) { EventSource(url, config); console.log(&...
Rebecca's user avatar
  • 13
0 votes
0 answers
62 views

H I am trying to store my shopping cart variables using Classes/Objects for integration with Klarna. The following code works great on testing but I now need the Cart (products) to be dynamically ...
Scott's user avatar
  • 57
1 vote
2 answers
183 views

I'm trying to understand how type information is stored in memory. We often say that an 8-bit value can store 2⁸ = 256 different values. But I'm wondering — when we create an object of that type, ...
toliveira's user avatar
  • 1,857
2 votes
2 answers
48 views

I'm making a project with Xel, but I am stuck on a problem. I want to loop through the keys of an object, and here's a minimal example of what I'm trying to get: const strings = import("xel:...
Jack G.'s user avatar
  • 23
1 vote
3 answers
122 views

I'm trying to calculate the average amount each customer has spent based on an array of purchase objects. Here's the sample data: const purchases = [ { customer: "Alice", amount: 250 }, {...
user18977478's user avatar
0 votes
1 answer
98 views

I'm having this trouble: I have a minio instance on kubernetes with my minio-dev.example.io dominio, I also have my object lambda to transform some files but this one is on Knative pod: http://object-...
Emmanuel_Arreola's user avatar
-2 votes
1 answer
80 views

I have a database with text entries. I want to search for the city name, and return the country. I have an async function which returns a thenable promise. getText('New').then(alert(result)); After ...
Cymro's user avatar
  • 1,484
2 votes
2 answers
170 views

Reading the standard, I asked myself this question.Maybe I'm just being inattentive, or maybe the standard just doesn't say it directly. The paragraph of the C17 standard(3.15 #1) says: object region ...
ALICEZzz's user avatar
  • 639
0 votes
1 answer
35 views

Working with IndexedDB, I have this code: async function Get() { const dataset=await db.result.transaction('Store1','readwrite').objectStore('Store1').get(5); console.log(dataset); } I am expecting ...
Cymro's user avatar
  • 1,484
-2 votes
2 answers
109 views

I have this JSON: { "result": { "data": { "getEstelam3Response": { "return": { "birthDate": "13650412", ...
Mike's user avatar
  • 1
0 votes
0 answers
34 views

I have a main managed package org where fields from the standard DandBCompany object are included in the package. However, when I try to install this package in a new org, I receive an error stating ...
SFDC_User25's user avatar
4 votes
2 answers
191 views

I’m trying to make sure an object can’t be modified after it’s created in Java. For example, in the class below, I can change the values of model and year using setters. But I want to prevent that and ...
Hind27's user avatar
  • 41
-3 votes
3 answers
86 views

I'm trying to refactor some code where I instantiate a lot of different classes and set their properties and wondered if I might be able to use a dictionary in some way. Is it possible in python to ...
Andy Mc's user avatar
1 vote
1 answer
75 views

I’m studying TypeScript and came across this pattern: type Animal = { [key: string]: number }; let Tiger: Animal = { legs: 4, age: 5, tail: 1, eyes :2 }; From what I understand, this allows adding ...
Reema's user avatar
  • 23
0 votes
1 answer
96 views

Here is my issue - I have a locals code block like the below. I need to create a Map from these values (these values are used in multiple places) locals { object = { 1 = { name = "...
TheDemonLord's user avatar
1 vote
1 answer
233 views

*{ box-sizing: border-box; } .clear { clear: both; } section { border: 1px solid black; height: 200px; width: 50%; float: left; } <!DOCTYPE html> <html lang="en"> <...
techCARE_'s user avatar
-2 votes
2 answers
93 views

I have five classes. My Main class, a form class, two subclasses that extend the form class and a createForm class I am forced to use to create new instances of the subclass. public class FormenFabrik ...
Wannabree's user avatar
1 vote
1 answer
63 views

I'm working on a game that will take a random object, and use that same random object for a series of questions/functions. I'm having trouble getting the next piece of code to run after clicking the &...
Christina Bohn's user avatar
3 votes
0 answers
92 views

I'm trying to compare to MECM outputs from $cmAppBefore = Get-CMApplication -LocalizedDisplayName $cmAppName | Select-Object * (to an after object). The objects returned are standard objects as well ...
Bbb's user avatar
  • 721
4 votes
1 answer
74 views

I have the following Makefile for building my C++ application : SRC_DIR := ./src OBJ_DIR := ./obj INC_DIR := -I./include SRC_FILES := $(wildcard $(SRC_DIR)/*.cpp) OBJ_FILES := $(patsubst $(SRC_DIR)/%....
Engineer999's user avatar
  • 4,159
0 votes
1 answer
79 views

I have created the following view in my database, my schema CREATE VIEW [OMEGACA].[V_SYS_MANAGE_ACC] AS SELECT name, object_id, parent_class, parent_class_desc, parent_id, ...
altink's user avatar
  • 375
0 votes
0 answers
31 views

I'm relatively new to Java and object oriented programming, and I don't understand why sometimes the constructor used in declaring and object will be a subclass of the objects type instead of the ...
Bluebox's user avatar
  • 13
-3 votes
1 answer
90 views

for the game I'm working on I had my groups write multiple scripts that I would be implementing into the project. Each script would contain the dialogue for the game. It was a rushed solution and very ...
Juan Alarcon's user avatar
0 votes
1 answer
96 views

I wanted to share a set of configuration data between powershell, python and bash. JSON is convenient for powershell and python, but bash does not have built-in support for JSON. Most bash JSON ...
Charlweed's user avatar
  • 1,651
1 vote
1 answer
63 views

I'm getting response as empty by checking Object.keys(response) it returns empty array but on expanding the response it looks like what shown below. Can someone help me to understand this? This is the ...
Afrin Athar's user avatar
1 vote
1 answer
112 views

I've created a class with a couple of variables in it. I can read these variables from my functions just fine. I seem to be able to update them to new values, however when I try to get the new values ...
Josh Wert's user avatar
1 vote
1 answer
43 views

In Java in LibGDX I'm trying to make my camera follow an object created by shaperenderer. I don't want to use a sprite, but can only find tutorials for sprites. Using spritebatch and such. I just want ...
Macbethy's user avatar
0 votes
0 answers
101 views

I need help or guidance on how to achieve 'reloading page on object after a related object gets updated'. I've tried platform event with a lightning component listening on the record page but just can'...
user29961442's user avatar
1 vote
2 answers
101 views

I have a library with the following addition for Array types - Array.prototype.top = function() { return (this.length > 0) ? this[this.length-1] : null; } It seems to be applied to non-...
Chrys G's user avatar
  • 111
0 votes
4 answers
89 views

I have an array of objects as such const aaa = [ {id: 10, val: "xx"}, {id: 27, val: "tr"}, {id: 13, val: "ut"} ] Now, I know how to search for an object by a value ...
Greeso's user avatar
  • 8,429
1 vote
4 answers
218 views

When I'm trying to make instances of my class I get errors unless I add the static keyword. I'm wondering why this is, doesn't this go against the whole concept of being static. Here is my code that ...
Victor Moldoveanu's user avatar
0 votes
0 answers
81 views

I am unable to create a json object with nested objects. See the code and the current output versus the desired output. Goal Output: { "carlist" : [ { "attributes": [ { ...
CavFife's user avatar
0 votes
0 answers
57 views

I am trying to get the behaviour where childlike class instance method is triggered as a response to an instance attribute of a parent is updated. The child class can inherit from the parent if that's ...
THATS MY QUANT MY QUANTITATIVE's user avatar
1 vote
2 answers
70 views

How to point to an object inside an object and display it without knowing the name. I just want to display the values ​​of the objects inside person. using the if I only want to display the values ​​...
sourcechange's user avatar
0 votes
0 answers
32 views

Windows 10 and Excel 365 patched up to date. Using powershell to run an Excel Object Model session, I open a workbook which contains a query which fetches data from a database to update cells in a ...
Jacques's user avatar
  • 33

1
2 3 4 5
1301