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.
Apparently, I have a simple task, but wasted lot of time messing with that. I have to filter array, if id prop is present in another ids array. But I'm getting Error
Uncaught SyntaxError: Unexpected ...
asked 2 mins ago
DevLoverUmar
3,21022 gold badges1717 silver badges3434 bronze badges
for (int i = 0; i <= a.GetUpperBound(0); i++)
{
for (int k = 0; k <= a.GetUpperBound(1); k++)
{
for (int b = 0; b <= a.GetUpperBound(2); b++) ...
Using Apple Clang 12.0.0 to compile this code:
int my_array[10];
int arr_size = sizeof(my_array) / sizeof(decltype(my_array[0]))
And getting this warning/error:
Expression does not compute the number ...
asked 37 mins ago
gil_mo
52222 silver badges1818 bronze badges
I'm hoping to get the name, label, and due date of the first few cards in one of the Trello lists on my board and sending it over Discord using my bot. How would I go about getting this info?
First input is number of elements.
Second input is array of integers.
Find the sum of differences between good numbers and bad numbers. Good numbers are the numbers whose index don't change when the ...
I've been a long time user of the excellent Stack Overflow but this is my first post.
A small webshop is currently undergoing convertion to asp.net Web Forms from classic ASP. The old shop ran Klarna ...
So I got a Ionic Reorder with a reorder event:
doReorder(event, r: any) {
console.log(event);
console.log(`Moving item from ${event.detail.from} to ${event.detail.to}`);
const itemMove = ...
Fbahad?r <- function(data) {
result <- 0
repeat {
i<-1
if (sum(data) == 0) {
result <- T
break
}
# Sort the counts.
minindex <- ...
We have an array
a = [[1, 2, 3],[4, 5, 6],[7, 8, 9]]
and looking for array:
b = [[1, 4, 7],[2, 5, 8],[3, 6, 9]]
Thank you!
I'm trying to convert the output of one library (Adobe Leonardo) to a structure required by Tailwind's tailwind.config.js.
The original output from Leonardo follows this structure:
[
{ background: &...
I am getting an error here for newUser this.userObj.assigned_to.push(newUser); as argument of type 'any' is not assignable to parameter of type 'never' typescript solution
How do I declare newUser to ...
asked 1 hour ago
Kunal Vijan
25511 gold badge33 silver badges1818 bronze badges
I learnt about the concept of array of pointers and ragged arrays, but i'm not able to understand why my code isn't working.
#include<stdio.h>
int main(void)
{
int* b[10] ;
for (int ...
i have 2 array like this :
let payrollname = [{"code": "a1", "name": "Loan A"}, {"code": "a2", "name": "Loan B"}, {"...
I am developing a unique group based cart system that works differently than the traditional cart system. For the cart, I get the rows that contain group_id. I want to group all orders by group_id and ...
asked 2 hours ago
Code Lover
6,4021717 gold badges6262 silver badges124124 bronze badges
I was under the impression that the method push works for arrays, not objects... But then why does the following snippet work?
this.usersByMovie = {};
profiles.forEach(profile => {
const movieID ...
asked 2 hours ago
Grateful
7,06166 gold badges3232 silver badges5555 bronze badges