Questions tagged [arrays]
An array is an ordered linear data structure consisting of a collection of elements (values, variables, or references), each identified by one or more indexes. When asking about specific variants of arrays, use these related tags instead: [vector], [arraylist], [matrix]. When using this tag, in a question that is specific to a programming language, tag the question with the programming language being used.
arrays
417,719
questions
1
vote
2
answers
39
views
How can I, having two arrays, remove elements of the second array to the first array - PostgreSQL?
Let's say I have a table t, 2 of its columns are A1 and A2. It looks something like this:
A1
A2
ID
1,3,6,9,11
3,9
1
2,3,5,7
3
2
...
I want to add a column with the result:
A3
1,6,11
2,5,7
...
...
-1
votes
1
answer
42
views
Javascript: How to compare a parent array of array with more than two similar elements of another array and return unique array of arrays
const array1 = [[1, 2, 3], [1,3,4], [1,2,5]];
let b = []
let c = [2,3]
array1.forEach(e => {
c.some(r => {
if(e.includes(r))
b.push(e)
})
})
console.log(b)
got the ...
1
vote
0
answers
31
views
Unable to insert array and map data into the databricks table programmatically in python
Trying to insert array and map (dictionary/json) data into Azure databricks table using both SQLAlchemy as well as databricks-sql-connector.
getting differenet error
from sqlalchemy import ...
0
votes
1
answer
19
views
Modifying a Complicated Map Formula to put in Header
I've got a complicated formula that I don't understand:
=map(A2:index(A:A,match(,0/(A:A<>""))),lambda(Σ,if(Σ="",,map(BZ1:CW1,lambda(Λ,let(x,index(sumifs('Ref4'!Q:Q,'Ref4'!G:G,...
-1
votes
0
answers
43
views
I need help reversing an array in C [duplicate]
Hey I'm a beginner to C so please excuse any beginner mistakes I make on this platform.
I am trying to write a program that reverses the order of the elements elements of an array and prints it. I ...
-2
votes
0
answers
19
views
How to find matching words and phrases in two strings with php [closed]
I have two strings. In the spam.php file, $bad_words list looks like this (they can be a word or phrases):
$bad_words = "
kittens
fake driver license
real passports
buy passports
buy driver ...
0
votes
2
answers
127
views
Can not create Function array in Java 8
I have a class called SFunction which extends from Function in JDK 8
@FunctionalInterface
public interface SFunction<T, R> extends Function<T, R>, Serializable {
}
Now I have several ...
0
votes
1
answer
21
views
useState returning empty array on default state, using react + supabase
I need help to understand why when I console.log(menus) on Menu.jsx it returns an array of values, but if I console.log(item) it only returns an empty array, while the default value of the item is &...
0
votes
1
answer
18
views
Transform Long Data to Table
If I have a data like this:
Column A
1
2
3
4
5
6
7
8
What formula should I use if I want it to look like this in spreadsheet?
Column A
Column B
Column C
1
2
3
4
5
6
7
8
Thank you!
I ...
0
votes
1
answer
14
views
DynamoDB Storage type for an array of objects?
I'm wanting to store an array of objects in my DynamoDB table but I'm unsure of which data type I should be specifying.
For example, I'm getting an API response with data that looks like:
{
id: 123,
...
0
votes
0
answers
8
views
How can I set an alert on a condition met in an array in Pinescript
I have an array that is being set with divergences. What I want to do is add a conditional statement for IF the array contains cwmacd and macd together and another one that checks IF the array ...
0
votes
1
answer
52
views
How to loop through an array?
How do I loop through an array?
The idea is to go to the Names worksheet, Where I have a list of users Initials and names in a list. Create 2 arrays that record the initial and name of each person. ...
0
votes
0
answers
48
views
Why is my array value not equal to a literal?
I am new to assembly and was trying to work with an array. However, I was geting caught when try to compare the array value to a constant stored in a register.
From the following code I was expecting ...
1
vote
1
answer
38
views
How to stop the second console.log from including the array of the first in its calculations?
I made a function that will find the sum of whatever array you put in. The problem is that if I have 2 of these console.log up, the second will add the sum of the first to it's result. What am I doing ...
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 ...