Tagged Questions
Multidimensional-arrays can be described as multi-dimensional tables. Each index used in order to find a given element is called a dimension.
0
votes
0answers
7 views
How do you find out in which sub-grid a 2D array element is located
C++ beginner here. I'm currently trying to make a sudoku solving program, so I have to check whether a value exists in the 9x9 box it's located in.
This is my code for checking if the element follows ...
0
votes
0answers
7 views
retrieving data from two tables into multidimensional array api json response
I am learning Api development where i want to retrieve data from two tables
First table (stories) contains:
id, feed_id, title, author, content
Second table (feeds):
feed_id,title,url
I want ...
0
votes
0answers
10 views
create a multidimensional random matrix in spark
With the python API of Spark I am able to quickly create an RDD vector with random normal number and perform a calculation with the following code:
from pyspark.mllib.random import RandomRDDs
...
0
votes
0answers
8 views
GET data modify AND/OR Update into array then saving it back to DB
Hey guys Im trying tyo build an kind of booking application and i came to a part where i got stuck.
So let me explain...
I have a house, and a calendar where calendar holds data relatid to the ...
-2
votes
3answers
44 views
search through a array and create a new array with the result
I need to search through an array and want to return the result like the example provided below.
I know I could just loop through the array, but I want to see if there is a better way to do this, as ...
0
votes
3answers
25 views
Zend Framework2 Form Errors Array To JSON
I'm receiving this array from zend form
Array
(
[user] => Array
(
[firstName] => Array
(
[isEmpty] => Please enter First Name
...
1
vote
1answer
13 views
create a multidimensional array for pdo select
while ($v = $stmt - > fetch(PDO::FETCH_ASSOC)) {
$basicinfo[] = array('sysid' => $v['sysid'], 'thesis' => $v['thesis']);
}
$input = array_map("unserialize", ...
0
votes
4answers
25 views
Searching for value in nested php arrays
I have an array like this, that could have any number of "domain" arrays. I've removed unnecessary keys in this example.
Array
(
[result] => success
[clientid] => 7
[numreturned] ...
1
vote
2answers
50 views
Turning a text file into a 2d array in Java
I am doing an assignment for class where I have to open a text file and convert that said file into a 2d array so I can later access it depending on what the user requests.
So far, my code is this:
...
0
votes
2answers
20 views
Read datas from JSON array on HTML using JAVASCRIPT
I have a JSON return by a PHP request. The result is:
{"serials":
{"4":
[{"serial":"15990"},{"serial":"16536"}],
"16":
[{"serial":"13841"}]
}
}
Could you ...
-2
votes
1answer
34 views
Java, How to split array multidimensional by row and column
i have problem how to split my array to make zone
my array is :
1, 2, 3, 4, 5, 6
7, 8, 9, 10, 11, 12
13, 14, 15, 16, 17, 18
19, 20, 21, 22, ...
0
votes
0answers
5 views
Array, SQL, Aray to SQL
I got problem, when i try to insert $nor[$i][$j] to indikator table :
$x= $_POST['x'];
$c= $_POST['c'];
$no= $_POST['no'];
$kabupaten= $_POST['kabupaten'];
$nor= $_POST['nor'];
for ($j=1; $j <= ...
-4
votes
0answers
21 views
Read multidimensional array (made out of numbers) from file, c++ [on hold]
First of all, i'm new to programming.
I've been assigned a task to write a simple program which would read data from file.
Let's say i have a array1.txt which contains:
1 2 3 4 5
1 0 1 0 1
...
0
votes
5answers
72 views
Is it possible to access two dimensional array with negative indexing?
I am trying to access a two dimensional array in a program and also I am trying to use negative indexes (it helps me in mental steps). I wanted to use the neatest possible syntax for access array ...
0
votes
1answer
25 views
Creating and Displaying a Multidimensional Array with external files C#
I'm new to C# and programming as a whole and I've been unable to come up with a solution to what I want to do. I want to be able to create a multidimensional array containing elements from three ...
0
votes
1answer
32 views
How many GB is allocated for a 3D array of size 10,000 x 10,000 x 10,000?
I asked How do I make a large 3D array without running out of memory?, and I received many answers. All of the answers basically said the same thing, but with one minor difference. Each answer ...
0
votes
3answers
47 views
How do I make a large 3D array without running out of memory?
I have the following method:
public static void createGiantArray(int size) {
int[][][] giantArray = new int[size][size][size];
}
When I call it with a size of 10,000 like so:
...
0
votes
0answers
19 views
Longitudinal Multi-group latent growth curve model with time-variant and time-invariant predictors (lavaan)
First of all, I am relatively new in using R and haven't used lavaan (or growth models) before so please excuse my ignorance.
I am doing my thesis and analyzing the U.S. financial industry during the ...
1
vote
1answer
25 views
php - Can print multidimensional array, but not echo single value
After posting an array, I am able to print_r to display the entire array, but I cannot echo a single value. I need to get those single values so that I can put them in the value tag of a text item. ...
2
votes
2answers
52 views
Memory exhausted using an array in a nested loop
This is the error I'm getting.
Fatal Error: Allowed memory size exhausted.
I'm fetching arrays containing a date from and a date till. I'm trying to get all the dates in between and add them to ...
-2
votes
0answers
19 views
Summing the values inside blob, inside multidimensional array
I have a multidimensional array.
Array
(
[0] => Array
(
[v_name] => USR-11
[c_num] => Array
( ...
0
votes
1answer
32 views
Returning values from a multidimensional array php
I'm hoping there is a better way of returning the values from each of cy_GB['value] and en_GB['value] from the array below:
MultilingualSelectAttributeTypeOptionList Object (
...
2
votes
0answers
42 views
Java storing objects in a multidimensional array
I'm attempting to store objects in a multidimensional array in an attempt to save each position in a game boards 'state', however after the loop which is supposed to set each instance to it's own ...
0
votes
1answer
37 views
Passing two dimensional array of strings to function?
I am trying to send this array to the function sortByLength.
The function prototype is
sortByLength(char *words[],int * lengths, const int size);
Here is the rest of my code up to where I try to ...
0
votes
1answer
25 views
Multidimensional Array Validation and Insertion
I have been searching and banging my head since 2 days to achieve what I want to achieve, but since google and other source could not solve my issues, am posting it here. I have a form where I submit ...
2
votes
1answer
11 views
Infinite Multidimensional Array where one value is overwritten
I'm experimenting with arrays for an explanation and I came across this weirdness. I did this in the console:
var x = ['Paul Irish', 'Alex Sexton', 'Nicholas Zakas'],
y = x,
z = y;
y[1] ...
0
votes
1answer
11 views
PHP extract elements from an array which have a common name
I'd like to extract only up to a certain part of the name and test if it's set (isset)?
Specifically for largeImage_1, largeImage_2, etc..
This is what I've tried, but it doesn't seem to return or ...
0
votes
1answer
32 views
Two-Dimensional Array with JSON data - Data is downloaded, but I can't access it (?)
So, I am creating a little trivia game for learning purposes, but I ran into a problem.
First, I had a specific Android Fragment obtaining the data from JSON, and I will simply use that data on the ...
-1
votes
1answer
21 views
Counting into an array and writing to text file xcode
Hi I am trying to count in note data from keyboard and write the data to a text file which will subsequently be read out of and played back as notes.
I seem to only be able to write one line of ...
1
vote
5answers
53 views
How to join into a comma-separated string from array of arrays (multidimensional-array)?
Ok, I know that to get a comma-seperated string from a string array in PHP you could do
$stringA = array("cat","dog","mouse");
$commaSeperatedS = join(',', $stringA);
But what if I have an array ...
0
votes
0answers
15 views
Accessing different elements of multidimensional array in parallel using python
I have a 3 dimensional array in python. I would like to access different portions of this array in parallel (not all elements). I tried to use the parallel for loop available in joblib. But I am a ...
1
vote
1answer
22 views
Issue in multi dimentional array unique PHP
Helle. I am using
$manual['pages'] = array_map("unserialize", array_unique(array_map("serialize", $manual['pages'])));
and it's giving me output after making unique is
{
"items": [
{
...
0
votes
2answers
36 views
declare dynamic array based on dynamic variables in jquery
This an array
ARRAY = ["A","B","C","D","E"];
var mlength = ARRAY.length;
Depending on mlength the length of DATES must be declared. Here the length is 5. Hence the array DATES must be var DATES ...
1
vote
0answers
28 views
How to get the intersection between two bi-dimensional Arrays?
I want to get the intersection between two bi-dimensional arrays and return it as a bi-dimensional array as the Function declared here:
Private Function GetIntersection(ByVal Array2D1 As String(,), ...
0
votes
3answers
23 views
2D arrays working in Angular JS 1.2.x and not in 1.3.x
I wanted to write a simple loop in Angular for 2D array as follows:
<!DOCTYPE html>
<html ng-app="">
<head>
<meta charset="ISO-8859-1">
<title>Angular 2D ...
0
votes
2answers
25 views
PHP : In multidimensional array how to merge child array with same key-value?
I have array multidimensional array,
Array(
Array
(
[UTTL_M_FT] => 2616.00
[TUG] => 5310
[univercity] => 1
[year] => 2010
)
Array
(
...
0
votes
1answer
17 views
Need to store a millions of multi-dimensional associative array [on hold]
I need to store a millions of multi-dimensional associative array of data which is the result of calculations.
I might use it occasionally.
I have 100 years of data and size is 12 GB.
what could be ...
0
votes
1answer
16 views
Sort X & Y by size [duplicate]
I'm trying to figure out how to sort an array, that has sub arrays which each have an X & Y coordinate. I need to sort the largest size first to the smallest, example:
$sizes = array(
'a' ...
-1
votes
1answer
17 views
Double free error deallocating a 2d array
I'm working on a program that uses a structure with 2d array as fields.
But for some reason evrytime I try to use the free_planet function I receive a double free error. Using programs as valgrind it ...
-1
votes
2answers
14 views
Unset elements from a multidimensional array
I am trying to unset/remove some elements from a multidimeansional usign the below code but i cant figure it out how.
My array looks like (only two elements from my multidimensional array)
[3] => ...
-2
votes
0answers
50 views
My program stops in the middle of its operation because it is unable to assign an element of a 2 dimensional array?
I was trying to make a tic tac toe program that allows two users to play tic tac toe. The program allows the users to decide, if they want to play, what symbols to represent themselves by, and which ...
2
votes
1answer
36 views
Initialize the Columns of an Array in Java
I have three arrays of equal lengths that I combine (as I will sort them on column c later):
double abc[][] = {
Arrays.copyOf(a, a.length),
Arrays.copyOf(b, a.length),
Arrays.copyOf(c, ...
0
votes
1answer
25 views
Array to row on 2D List/ArrayList Java
I'm wanting to create a 2D array with a set amount columns (5) but an indefinite amount of rows. It was suggested to use a list with an arraylist like so List<List<String>> _upload = new ...
3
votes
2answers
24 views
Codeigniter multidimensional array insert into database
Hello im trying to insert a multidimensional array into mysql using codeigniter. Im having some trouble getting the values to enter correctly.
Here is how the multidimensional array looks
Array ( [2] ...
-1
votes
0answers
12 views
error in getting user input , 2-dimensional array
in below code I'm trying to fill two 2-dimensional arrays from user input, for low amount of N ,for example 10 or less it does work fine ,but if N would be like 20 ,i will get a out of bound exception ...
0
votes
1answer
21 views
Swift multidimensional array of textures
I am trying to load a bunch of animated textures from a texture atlas into an array but I get an error when trying to append a frame to the array.
Basically I want to have a multidimensional array of ...
0
votes
1answer
32 views
Passing a multidimensional array to a function in python
I was just trying an maze-mouse game, to retain the position of the mouse in array,
I created a multidimensional array in python
maze = [[0 for x in range(8)] for x in range(8)]
and I called a ...
-3
votes
1answer
35 views
Arrays, Functions, File I/O in C [on hold]
Trying to write a program that reads in 50 number votes from 1 - 20 in a multidimensional array. One part of the program asks to scan in each number individually and say its frequency.
I've defined ...
0
votes
0answers
33 views
Php multidimensional array - table for each column which have same values
I couldn't find a solution for this problem. I may solve this with noobish if else function for every specific data but, It would be very noobish.
So here is my array example;
//I get data from ...
0
votes
1answer
5 views
PHP Combine fields in multidimentional array
Forgive my explanation of this as I am not a developer.
I have a query from php that produces the last five results from a teams matches. I would like to display the outcome of those matches within ...