Category "object"

Calling a native C++ method from C++/CLI

I'm developing Wordle in C++ using a .net graphic interface with visual studio. I have a file.h that contains a class "WordDatabase", and I need to use one of t

Modifying a copy of a JavaScript object is causing the original object to change

I am copying objA to objB const objA = { prop: 1 }, const objB = objA; objB.prop = 2; console.log(objA.prop); // logs 2 instead of 1 same problem for Arrays

How to check an empty object?

I have a number of objects. Some of them have string properties and some of them have bool properties. I'm using them in multi-step form. so each step is bound

Parse JSON String into a Particular Object Prototype in JavaScript

I know how to parse a JSON String and turn it into a JavaScript Object. You can use JSON.parse() in modern browsers (and IE9+). That's great, but how can I t

Is there a way to convert an Object[] array to char[] array?

class Solution { char[] make(String s){ Stack<Character> st= new Stack<Character>(); for(char c:s.toCharArray()){ if

How to loop and display array of objects and their nested arrays

I need help, I got stuck on objects with multiple nested arrays. I have a json file which consists of object, that holds array of objects, and these objects hav

Nested objects in response not logging to console

My server gets a response from another server with a document from a mongodb database with a body similar to { messageDetails: { body: "hello" }

Is there an Object spread syntax in python 2.7x like in Javascript?

How can I spread an objects/dict(?) properties and into a new object/dict? Simple Javascript: const obj = {x: '2', y: '1'} const thing = {...obj, x: '1'} // t

How to remove the first property of an object?

How do I remove the first property of an object like: var obj = { x:1, y:2, z:3 }; so that obj becomes: { y:2 , z:3 }; This approach doesn’t work

How to remove the first property of an object?

How do I remove the first property of an object like: var obj = { x:1, y:2, z:3 }; so that obj becomes: { y:2 , z:3 }; This approach doesn’t work

How to limit properties of a JSON object given array of property names using JQ?

Assuming I have the following JSON object (which is just an example): { "foo": 1, "bar": 2, "baz": 3 } And the following JSON array (another example)

How do I use a for loop to manage increments of an object property in JavaScript?

I’m doing a rockPaperScissors project. Here’s the published link: https://george-swift.github.io/rockPaperScissors/. I want to add a first to 5 feat

How do I convert a ZipFile object to an object supporting the buffer API?

I have a ZipFile object that I need to convert to an object that will work with the buffer api. Context is that I am trying to use an API that says it takes a f

Why FormData object is empty even after I use append?

I tried the following code: (This is my service file in angular posts.service.ts) updatePost(id: string, title: string, content: string, image: File | string)

Exporting Tensorflow Model - AssertionError: No checkpoint specified (save_path=None); nothing is being restored

I'm using google colab and tensorflow 2.3.0 on a Ubuntu machine, and working through the example from here: Tensorlow2 Training Custom Model This is my code: !p

What are 'objects' in C language?

In the book, Modern C by Jens Gustedt, following statements have been made by the author: In the following subsections, we will introduce the syntactical aspec

Accessing values inside Objects

I am trying to print a 2d array of a schedule that is inputted to me via object. When it prints, it is not giving me the values I want. Any idea what i doing wr

Nested if statements vs &&(or) operator

I've been trying to solve this https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/profile-lookup/ with the following code

Why does a syntax error occur after restart?

I'm running my little testsite on localhost (although currently there isn't even serverside interaction yet). Everything worked fine until I restarted my PC. O

Revoke the signed URL of the object that was created in GCP Cloud storage

Suppose I have this scenario where I created a signed URL to GCP object using the private key of the service account using the following command. $ gsutil signu