Category "arrays"

How to display subdocuments on frontend i am using mongodb as the database

This is the front end. I have made some changes you can check out my repo if anyone has any answer to this it'll be great use i think there is there a way to li

C++ Union Array differs in 32/64 bits

My code: union FIELD { int n; char c; const char *s; FIELD(){} FIELD(int v){ n = v; } FIELD(char v){ c = v; } FIELD(const char* v){

How can I call out a string from an object array?

I have recently started some OOP in C++, and I was trying to make a small program in Dev-C++ to store arrays of information on employees through a friends funct

Get Array of Values from a Nested Data

guys. How to get values from an array of the nested object, which I getting from the parent component. For example: @Input() result?: FullResult; construc

Javascript - Convert object to array object

Try to convert the following object (which was getting from an API response) to an array object. const oldObj = { Georgia : { notes: "lorem ipsum",

Given a rectangular matrix of characters, add a border of asterisks(*) to it

Example For picture = ["abc", "ded"] the output should be addBorder(picture) = ["*****", "*abc*", "*ded*

How to render html from a @foreach loop in a textarea

Using Laravel 8 livewire, I need to render a list of name ($list) on per line in a textarea. I do this <div class=" border border-red-800 rounded-lg mt-8 p-4

Python Arrays sorting folder names

Hi could anyone explain to me how to sort the folder names in order of creation? list1=["New folder", "New folder 1", "New folder 10", "New folder 2"]

How to load Codeigniter 4 lang file into an array variable

Is there a way to load a file from Codeignier 4 Language directory and assign the array content to a variable. Instead of returning the translated line, I want

Index of array exists when logged to console but does not exist when accessed directly

I have a 2-dimensional array that stores "chunks" as canvases in a game. I've encountered a weird problem that seems to have manifested itself seemingly without

How to get the specific attribute "folder_name" value from XML & store it in an array in React js?

class LoadXml extends React.Component { constructor() { super(); this.state = { total_page: null, menu_array: [] }; }

creating a class object array inside another object?

I've got these three classes class Totalizavel def retorna (qnt, valor) total = qnt * valor return total end end class Venda < Tota

Finding the closest vertex below a certain height, from a start position

I have procedurally generated Islands with lakes, its basically a 3D mesh that has points above the water line and points below it, any vertex/point below the w

Find Indices of the pair of elements in the Array such that they add up to the Target value

I want to find a target sum in an array by adding integers until it's reached, then return the indexes which add up to the target by using streams. For example,

Sorting arrays in JavaScript [closed]

I received a big array of object from the backend and I used filtering to leave only these values const markets = ['IT', 'DE', 'UK', 'FR', 'NL

How do I separate items in an arraylist by character in Java?

I'm working on a game of Go Fish for a school assignment and I need to separate a group of 4 cards in order to keep score. Any help would be greatly appreciated

array of integer input from user

I have a question related to filling it in an array. In the program I have to write I am given "input from user: different number of numbers separated by space

How to modify byte strings?

Let's say I have the following ELF file in python: >>> data=open('file','rb').read() >>> data b'\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x0

Angular typescript update class if element is in array

I am doing an APP in Angular 12. In my component.ts I have an string array[] like AccessRoles["AA","BB"] And on the other side I have a class like this export c

Mean, Var, and Std

The Task is You are given a 2-D array of size X. Your task is to find: The mean along axis The var along axis The std along axis Input Format The first line con