All Questions
Tagged with arrays multidimensional-array
18,856
questions
1
vote
1
answer
50
views
Filter multideminsional array in PHP so that if certain values are duplicated in sub-arrays the redundant ones are unset [closed]
In an application, redundant but non-identical arrays are being returned. I'd like to remove the redundant arrays from the multidimensional array. Though the issue could possibly be solved closer to ...
1
vote
1
answer
71
views
How do I effectively compute pairwise quantities in numpy?
I want to compute pairwise quantities, e.g. distances between two points.
A simple example would be
import numpy as np
N = 9
x = np.linspace(0,1,N)
y = np.abs(x - x[:,None]) # pairwise 1d eucdlidian ...
3
votes
2
answers
61
views
Traverse over tree type structured data uing JavaScript
I have a data set having parent and nested children in it. The purpose of this data is to traverse over parent to -> child1 to-> Child1Child .....
-> child2 to -> child1 to -> child2 ...
0
votes
0
answers
38
views
How do I dynamically allocate memory for a multidimentional array in C? [duplicate]
Dynamically allocate memory for a multidimensional array (matrix) with a specified number of rows and columns.
How to allocate memory?
How to allocate memory for 2D array?
How to dynamically allocate ...
1
vote
1
answer
45
views
Resolve Multidimensional Array using Javascript
When I do.
I receive as the screenshot attached.
But I need one array having each array as a whole number.
'use strict'
const { helper, browserstackBase } = require('@core/IQAir')
const webdriver = ...
-2
votes
1
answer
36
views
How to find the index of an item in a two dimensional array with the most unique values surrounding it
Given a square two dimensional array of a fixed size, say 100x100, with integer values ranging from 1-16, how would you go about finding the index/indices of a point/points with the most amount of ...
-2
votes
0
answers
16
views
Dynamic menu building and navigation using URL parameters
<!DOCTYPE html>
<html lang="en">
<head>
<title>Web Programming using PHP - Coursework 2 - Task 1</title>
</head>
<body>
<header>
...
-1
votes
1
answer
38
views
How to return Array<Array<String>>'s descendant's same elements?
I have an array of array of strings and I need to return descendant's same elements (not index wise, self wise).
let arrayArrayStrings: [[String]] = [
["a", "b", "e", &...
1
vote
2
answers
82
views
How can I write a jq expression to convert nested array objects in JSON to a JSON schema?
I have a JSON structure like this:
{
"objectSchema": {
"fields": [
{
"name": "OBJECTID",
"type": "...
1
vote
1
answer
101
views
algorithm to detect pools of 0s in a matrix
I'm writing an algorithm that detects regions of contiguous empty cells that are completely surrounded (orthogonally) by filled cells and do not extend to the edge of the grid. Let's call such regions ...
0
votes
0
answers
24
views
move player to relevant round in loser bracket using php
I am building double elimination system when match completes in winner bracket the loser is transferred to loser bracket but I am having a problem how to figure out in which round that player needs to ...
0
votes
1
answer
86
views
why cant i access the location in char pointer array with dereference to int pointer as index
im making a project and i was getting an error out of nowhere supposedly so i went into debug mode and couldn't find the error but the error only occurred in a specific place so i copied the code and ...
0
votes
0
answers
31
views
Pine script to Find a closest value among a list of values
Request to review the below model
enter image description here
the averages were assigned in as A1, A2, A3 already
I wish to find the closest value to 0 among the array of average values and return as ...
1
vote
1
answer
36
views
Delete sames values in 2d array [duplicate]
I would like to delete same values in this 2d array :
var array = [["ok",1],["non ok",2],["ok",1],["ok",3],["non ok",2],["ok",4]];
The ...
0
votes
0
answers
18
views
What is the opposite of stride?
Suppose I have a 5-dimensional array of the following shape: (2, 3, 4, 5, 6)
For arrays with row-major layout the stride for the 3rd dimension is then equal to 5x6.
For the 4th dimension the stride is ...