Skip to main content

Questions tagged [array]

An array is a systematic arrangement of similar objects, usually in rows and columns.

13 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
0 answers
2k views

Realizing pagination for merged array from multiple data sources (APIs)

I'm improving a WordPress theme with PHP. The theme contains a gallery section which loads data from the Flickr API. Now the client wants to display Flickr galleries as well as "local" galleries ...
Julian F. Weinert's user avatar
1 vote
0 answers
69 views

How should I store a frequently accessed array with an unknown number of elements in mongodb?

I have a simple "Index" object defined as follows: { "position": 4, "value": 345 } And I'm trying to figure out the best way to store this object in a mongo database, assuming that: The "...
Malfunction's user avatar
1 vote
0 answers
609 views

Given a two-dimensional array what is there a good way to identify distinct regions of elements?

I am generating a 2D "world map" in Unity which I use C# and Perlin noise for. I have a Tile object that holds the graphic of the tile and position. There are a few more attributes to this class, ...
Zimano's user avatar
  • 232
1 vote
0 answers
461 views

Why is deep plucking a bad idea?

Both underscore and lodash refuse to implement deep plucking, despite many requests from users and gists or modules that implement the feature. _([{o:{a:1}},{o:{a:43}},{o:{a:234}},{o:{a:23}}]).pluck("...
Dan Dascalescu's user avatar
1 vote
0 answers
2k views

How to loop through array bidimensional in diagonal according to a position in degrees

The title could be no self-explanatory enough but I need some conceptual help in order to implement a solution to go through an array: I'm developing a program to calculate the "most shadepath" route ...
Enot's user avatar
  • 113
1 vote
0 answers
297 views

Should I use enums or arrays for a dynamic data source?

I've inherited an iOS project that uses NS_Enum to store the number of rows and sections in a UITableView At the moment, the UITableView is static; no rows are being added to it. However, that is what ...
narner's user avatar
  • 145
0 votes
0 answers
49 views

JavaScript: My logic traversing multi-dimensional arrays

Consider the following: Let's say below is the multi-dimensional, and you are given the starting point of [2, 2]. const WORLD = [ ['P', 'P', 'P', 'C', 'P'], ['P', 'M', 'P', 'C', 'P'], ...
Antonio Pavicevac-Ortiz's user avatar
0 votes
0 answers
97 views

Best choice for a holding large number of objects in java

I have a set of array, containing a large number of objects (products), which has lately grown so large, searching in it takes about a minute, which is considered too long, since one search is ...
kry's user avatar
  • 101
0 votes
1 answer
293 views

Array structure for nested grouping (JavaScript)

I am currently struggling with how to solve nested grouping of data. The initial structure is given and my grouped structure below as well as my approach can be adjusted. My idea was to have the array ...
Dollique's user avatar
  • 101
-1 votes
1 answer
41 views

Creating block of data from a large input data

I am working on an algorithm whose specs says that it accepts 32 bit input (long type). My actual data is 14 bytes e.g 11:12:12:04:DD I have created sub arrays like subarray1[4]={'1','1',':',1} // ...
DeoChandra's user avatar
-1 votes
1 answer
1k views

What is the proper or recommended way to save String[]'s, Array's, ArrayList's and int[]'s to Android?

I've looked up this question many many times but keep seeing different answers, what is the BEST way to save array's? It seems ludicrously infantile that there is no standard or easy way to save ...
420blazeit's user avatar
-2 votes
2 answers
2k views

Fortran 90 - How to create a coordinate system

So I need to code a simple program, and I need to define 2D coordinates? Is there any coordinate system I can use in Fortran? I was told it might have to be all in arrays? And if so, can anybody ...
user122862's user avatar
-5 votes
1 answer
2k views

How to compare and replace value from two object inside array?

Here i want to replace price in data1 to price from data2, and it updated if the id is same. Is it possible to do that without nested loop? var data1 = [{ "id": "56e641d4864e5b780bb992c6", ...
Muhammad Fasalir Rahman's user avatar