65,132 questions
-1
votes
0
answers
9
views
Issue Uploading File to Stratus Bucket Using Node.js SDK
I am trying to upload my file to the Stratus bucket using the Node.js SDK method, but despite multiple attempts, the file is not uploading properly.
If someone can provide a working example of how to ...
0
votes
0
answers
32
views
Python OO pattern, involving both 2D and 3D representation classes via a transform
I working with Octahedral Faces both in 2D and 3D. There's a matrix which rotates one to the other, but both of them have methods and properties which are unique to either representation.
I was ...
1
vote
4
answers
116
views
Why do I need to make a static class to make instances of that class?
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 ...
0
votes
0
answers
64
views
Created nested json object in vb.net
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": [
{
...
0
votes
0
answers
7
views
Unable to Access Authenticated Bucket Object via Browser
I have created a Bucket in Catalyst with authentication enabled. After successfully inserting an object into the bucket, I tried accessing the object's URL in the browser, but I encountered the ...
0
votes
0
answers
31
views
Call Method Using DOM From Custom Object [closed]
I'm trying to advance my understanding of JavaScript. I am using a plugin that includes a custom object that exposes a method that I can use to complete a task.
I noticed that it is using "dom&...
0
votes
0
answers
47
views
How to have a "childlike" class instance method trigger when a "parentlike" instance attribute is updated?
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 ...
1
vote
2
answers
54
views
How to point to an object inside an object and display it without knowing the name
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 ...
-4
votes
1
answer
69
views
How to deal with problem caused by persistent memory in SPA? [closed]
I have a select element with two options on a web page. When I select option 1, then select option 2, both work as expected. But if I then select Collection 1 again, it fails. The code below ...
0
votes
0
answers
25
views
Win 10 Excel Object Model job fails in Job Scheduler
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 ...
0
votes
1
answer
47
views
fs.writeFile adds extra brackets to json of key=>values object in node.js
I'm trying to update one JSON file in a for loop called asynchronously. Each time I update the whole file, with 1 object.
This is my very complex code after half a day of research. (I know it's too ...
0
votes
0
answers
14
views
Issues extracting complete list of objects and character lengths
I'm a newbie. I discovered Copilot and used it to get the code below. I want to track the number of characters in all objects to keep watch of excessive code, etc. The code lists the Module Name in ...
0
votes
2
answers
40
views
Jsonata how to avoid auto change in order javascript
I have array of objects as sample below.
After JSONata evaluation, the order of array of object changes. string with numeric id appears before i.e id 5 appears before id 4a.
How to avoid this change ...
0
votes
1
answer
44
views
Is my understanding of the `callback` keyword correct here?
The following code snippet is part of an exercise in which I need to guess the output of the code:
let length = 4;
function callback(){
console.log(this.length);
}
const object = {
length: 5,
...
0
votes
0
answers
21
views
RocketPy: Can't access Flight.x, Flight.y, Flight.z values
The bug I'm experiencing is I am trying to access the values of Flight.x, Flight.y and Flight.z. I checked the documentation and Flight.x and Flight.z are indexed differently to Flight.y. I want to be ...
0
votes
1
answer
33
views
Error: Download error: Error: 'Ytube' object has no attribute 'get_video_url'
if format == 'mp3':
download_url = yt_video.get_audio_url()
elif format == 'mp4':
download_url = yt_video.get_video_url()
here is the code, when I run it I get this error: Download error: ...
1
vote
1
answer
21
views
Render Nested objects value in html using Angular ngFor directive
I have an Object with nested object. I am trying to display in html using ngFor directive of Angular. But I got the result as multiple time.
Below my object
productlists = [
{
productname: '...
0
votes
1
answer
75
views
STATUS_STACK_OVERFLOW when converting my code to Object Oriented php [closed]
SOLVED: Well, after two days of trying every possible fix, it turns out that when the code was copied, there was in fact a missing closing div tag in the object method. ::: face palm ::: Normally, it ...
-6
votes
1
answer
79
views
Creating a hierarchical array of objects with many sub-levels
I have an array of objects (possible thousands) that may or not be nested (possible tens of nests). A subset of the data looks like this:
let data = [
{"id":"m1", "name&...
1
vote
0
answers
53
views
Why is unity "randomly" making my objects null / stating that they are destroyed?
Sometimes I can play my game the whole way through with no issues, pressing all the same buttons and running all the same code as other times (as far as I'm aware). However, sometimes I get an error ...
-3
votes
0
answers
60
views
code does not compile when i create an object from another class
so I have an small project of two classes, CCuenta.java and Test.java(main) and it gives me an error when I create CCuenta obj.
so I put some images with my code hoping you can tell me why it does not ...
0
votes
1
answer
91
views
Can I write a function whose purpose is to save the contents of a generic object on a file?
Can I write functions whose purpose is to save and load the contents of a generic object to/from a file?
Something like:
int Save(void* pObj, size_t objSize, std::string filePath);
int Load(void* pObj,...
1
vote
2
answers
68
views
How to ensure that each object is instantiated an even number of times?
I have been using the following code to instantiate 9 gameObjects.
It works beautifully, but I want to be able to ensure that each object is instantiated an even number of times. Does anyone know how ...
3
votes
2
answers
88
views
Is there an algorithm for shuffling objects in an array randomly WITHOUT utilizing Lists and Collections
I want to shuffle an array of Objects in a card game simulation.
I scrolled through many posts on here and almost all of them mention transforming the array into a list, then shuffling it using an ...
0
votes
1
answer
78
views
How to prevent data loss when updating nested objects in Node.js?
I have an object called productionSheet which contains details of a plastic bag. Dimensions and other information are stored inside productionSheet.bagDetails.
When my app's backend receives the ...
0
votes
0
answers
15
views
Unable to use nested objects in Livewire v.2
I am using Laravel 10, Livewire 2. I am using a Livewire component to create a DistributionGroup. Each of the DistributionGroup's will have 1 or more DistributionGroupGroup's, and each of those, in ...
0
votes
0
answers
52
views
Why my object equals null, when i want to share it between two activities
My task is to click on the button "add" in 1_activity, which sends me to 2_activity where i need to key my data into fields and click on the button "save", which saves the data and ...
0
votes
1
answer
30
views
The most optimized way to bind variables in Angular when dealing with objects
I read the manual of binding object properties in Angular, however I struggle to find the perfect most optimized solution.
Let's say i have a model User
export class User {
public _id: number;
...
0
votes
2
answers
47
views
How to check whether a s3 object is in ASCII text
When we want to check whether a file is ASCII text file, we can use this command
~$ file some_file_content_unknown
some_file_content_unknown: ASCII text
Is it possible to use file command to ...
0
votes
0
answers
39
views
google gson JsonObject incorrect data type
I am trying to create a json for export. I am using com.google.gson.JsonObject to do so.
I have an issue where when i add a integer value into the jsonObject, it became a number.
JsonObject jsonObject ...
0
votes
1
answer
56
views
telegram chatbot for crypto transaction (solana) using python: Unexpected Error: argument 'signature': 'str' object cannot be converted to 'Signature'
Python: How to check a Solana transaction and sanitize the transaction ID
I have written a script to fetch transaction details from the Solana blockchain using the solana-py library. It includes ...
2
votes
2
answers
72
views
How to convert CSV or Object-Array to an object but with the first column as properties
I want to store various outputs from Invoke-SSHCommands as objects.
Let's say I get the result formatted as CSV and I want to convert it to PSObject but the difficulty for me is that:
Not the header ...
1
vote
1
answer
100
views
Can liveliness analysis cause a c++ object to be destructed before leaving scope?
I was thinking of a situation e.g. like this:
void example() {
vector<unique_ptr<int>> v;
v.emplace_back(make_unique<int>(1));
int *a = v.back().get();
{
// rest of code, ...
1
vote
1
answer
42
views
Value from a spread object does not correctly assign the type when the type is a union [duplicate]
This is kind of a strange edge case that it took me several hours to figure out, but I don't know what typescript rule is causing it, so I'm curious if this is something I'm not aware of, or if it's a ...
0
votes
0
answers
18
views
When can using Reflect in a Proxy trap cause an infinite loop?
Following the documentation on Proxies on MDN, under the example bellow, there is this disclaimer:
If you use Reflect methods within a proxy trap, and the Reflect method
call gets intercepted by the ...
-3
votes
2
answers
77
views
How can I push to an array inside an object that is returned by a function? [closed]
I am trying to access and alter an array that is within an object that is being returned by a function. I built two mock arrays within objects (The first on its own, the second inside a function.) The ...
-1
votes
1
answer
56
views
Is there a way to get all non-null nested attributes of an object?
If I've got 2 classes as follows:
class Car{
String carName;
String serial;
Wheel wheel;
}
class Wheel{
String wheelName;
Integer someInt1;
Integer someInt2;
Set<...
1
vote
1
answer
35
views
VBA concatenate multiple textboxes into one based on combobox selection
I have a userform and want to move repeating code into standard modules and call the code when needed. The following code I pieced together. I have a combobox with the following values: System, System ...
0
votes
0
answers
57
views
Why are two objects from the same prefab, with the same scripts acting differently?
I'm developing a game like solitaire and all my cards are made from the same prefab. All cards in the tableau follow the exact same script but for some reason, the first card in the first tableau can ...
1
vote
2
answers
189
views
Why is the destructor called twice here?
Consider the below code:
#include <iostream>
struct Person {
Person() { std::cout << "A"; } // Constructor
Person(const Person& other) { std::cout <&...
1
vote
1
answer
40
views
Moving a label using mouse in firemonkey
I have to move FMX objects with mouse and here, for simplicity, I am using
TLabel (Label1) that belongs to a TRectangle (Rectangle1), belonging to TPaintBox
TLabel (Label2) that belongs to PaintBox1.
...
0
votes
1
answer
64
views
Powershell array objects type being changed to string after using .Replace(), unable to compare to another array, which also claims to contain strings
I am currently working with Exchange Online and Graph to update my company's distribution groups.
The issue I'm encountering is when dealing with external users in my environment. When I am initially ...
1
vote
0
answers
16
views
How do I reduce the number of ticks in a so.Plot with a categorical axis?
I am trying to adjust the axis of a so.Dots plot with a categorical x axis. That does not work with the Continues function.
I expected I would something like the following would be possible:
penguins =...
0
votes
2
answers
42
views
How to associate DOM elements with original array of objects
I want to update my html table by removing some rows using "Remove" button. Whenever the user clicks on the remove button, the corresponding row gets removed. I want to remove objects from &...
0
votes
0
answers
110
views
Power Automate Desktop: Nested array of objects in datatable for JSON
In Power Automate Desktop I have a flow that converts a datatable "CourseList" into a JSON object, resulting in something like:
{
"Courses": [
{
"ID&...
0
votes
4
answers
63
views
How to iterate through nested json objects with unique names in Apps Script
Given a json file with nested objects (not arrays) like:
{
"data": {
"UniqueName1": {
"name": "Bob",
"title": &...
0
votes
2
answers
70
views
Why does my chartData output [Object], [Object] instead of { label: 'Lukáš', value: 8 } in JavaScript?
I'm working on a JavaScript project where I generate a list of employees and their respective work hours. I want to create a chart data object with the names and values of employees, but when I log ...
0
votes
1
answer
46
views
why is sqllachemy returning a class instead of a string
So as part of learning sql alchemy I am querying the chinook database, following documentation and my lesson structure I believe I have setup the correct format for querying my tables.
### --- USING ...
0
votes
2
answers
73
views
filter out object in array if object key value is null
I need to filter out objects in array if specific key value is null.(trying to learn)
const getPlayerData = async () => {
const allPlayers = await fetchData("https://api.sleeper.app/v1/...
0
votes
0
answers
25
views
comparing toString() in JS with an object gives true [duplicate]
let m = {name : "mastan"};
let n = {name : "mastan"};
m == n
// this gives false because m and n are 2 different objects
JSON.stringify(m) == JSON.stringify(n)
// this gives true ...