Category "arrays"

How do I check which rows of one small array exists in another larger one?

How do I check which rows of one small array exists in another larger one? Given the following setup: final_batch = np.emtpy((batch_size,2)) batch_size = 4 a =

How can I skip loop for first and last element of array and set them to constant value?

I would like the loop to start from the second element and to end before the last one. So that I can set the first and last one to constant value. for (int i =

How to create a matrix with key and value in java

I have this table with these values I have this code in java import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map;

How to get an Array value inside an object in an array Php [duplicate]

I have this array below at the last code part. To get ["db"] and ["size"] object in array through a loop I use <?php foreach ($result->

Looping arraylist object from class value into array java

So I'm trying to insert the value from ArrayList specifically for object Days into one array of integer here is the value I iterate into the table I I've try i

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