-4
votes
2answers
68 views

Array index is out of range but the index is zero and array length is 300

Here is some code. It's not all but I think its the important code: public int Laenge = 10; public int Breite = 10; public Vector3[] new_Ver = new Vector3[300]; public Vector3[,] new_Ver_s = new ...
1
vote
3answers
31 views

Substituting Words in a Body of Text with User Input via Multidimensional Arrays

I have two sets of data stored in multidimensional arrays. One stores regular expressions which will be used to find whole words within a larger body of text: Array ( [red] => Array ( ...
0
votes
1answer
34 views

merge multidimensional array cakephp

i have a function in my appController ..i am not good in arrays so i want to merge these two functions First Array public $components = array( 'Session', 'Auth'=>array( ...
0
votes
4answers
71 views

PHP: Better way to create multi-dimensional arrays?

I'm pulling data from the DB in this format: Array ( [id] => 1 [exerciseid] => 127 [date] => 2013-06-12 00:00:00 [time] => 40271 [weight] => [distance] => ...
0
votes
2answers
32 views

Find a unique item based on two values in multi-dimensional array

I have an array called collection. This array contains a large number of arrays with a length of 12. Each item of the latter array has - among others - a source ID [0] and target ID [1] (pairs of ...
1
vote
1answer
28 views

Create multi dimensional array in cakephp

Now I have 3 row of data. id name date 1 data1 12-06-2013 2 data2 12-06-2013 3 data3 16-06-2013 now I want to group the 3 rows of data into a new array, something like: Array ( ...
1
vote
1answer
29 views

64 bit NASM - retrieve element of 2D array

I need to retrieve element of 2D array in NASM - array is 50x60 chars, statically allocated. r13 stores array's width, rsi contains address of the beginning, r8 and r9 are indexes (they correspond to ...
0
votes
1answer
43 views

Filter Multidimensional Array With One Dimensional Array

I have a group of checkboxes on a page that, when clicked, create an array of values (allVals) that change as boxes are checked/unchecked (string output is also an option). I also have another ...
0
votes
2answers
30 views

Search Multidimensional Array ActionScript 3

If I have two arrays like the example below, how can I search the first part of each node in the 'score' array with the values in the 'search' array and return the value that is the second part of ...
3
votes
0answers
25 views

Create a hierarchy from an array

I've an array as follows. array( 0 => array( 'parent' => 'Bigboss', 'middle' => 'Technicians', 'child' => 'Players' ), 1 => array( 'parent' ...
0
votes
2answers
40 views

PHP objects inside arrays (HOW TO: If array key is 0, return 0. Else if array key is 2, return 2. BASIC LOGIC)

What I'm trying to do: Get a list of names (if more than one) on a single string separated by a comma this way: Britney Spears, Lady Gaga, Miley Cyrus What's going on: We are inside a loop. ...
1
vote
4answers
80 views

How to auto increment the size of an array in java

How the array size is auto increment in java program my requirement is "create a 2 dimensional array sno, in the first dimension name, age in the second dimension so if i pass sds, 25 it should be ...
0
votes
1answer
52 views

Array with array of hashes breaks code in ruby

I am new ruby and working on terminal game. I have an array of my deck_of_cards deck_of_cards =[ {:card=>"2C",:value=>2}, {:card=>"3C",:value=>3}, {:card=>"4C",:value=>4}, ...
6
votes
1answer
90 views

Array.Copy always row-major?

From the MSDN documentation on the Array.Copy method: When copying between multidimensional arrays, the array behaves like a long one-dimensional array, where the rows (or columns) are ...
0
votes
1answer
28 views

php compare arrays for pairing people (with conditions)

I am writing a PHP script that is for a essentially a gift grab-bag (pulling names out of a hat). But there's a few conditions: -You cannot be paired with your spouse -You cannot have who you had last ...
0
votes
1answer
16 views

Visual Basic - Storing information from an array to a two dimensional array

I have some code where I have a "map" stored in a string and then I put this into an array. This array has seperated the string into characters for each index position. I now want to put these ...
1
vote
2answers
57 views

2D array as instance variable of class

So if I have a class with a 2D array that I want to initialize with two parameters passed into the constructor, how would I do that, I keep running into errors because it won't let me update the two-d ...
-1
votes
1answer
27 views

How to insert one array one associative array into another associative array in PHP? [closed]

I've a following associative array named $request as follows: Array ( [chapter_mcq_que_id] => 9 [chapter_id] => 103 [chapter_mcq_que] => Who is Anand? ...
0
votes
2answers
53 views

Array grouping in PHP

I have an array in PHP: array (size=xxx) 0 => array (size=9) 'cat' => string 'FIRST CAT' 'dur' => string '10' 'type' => string 'Type description 10' 'start' ...
-1
votes
1answer
33 views

error while trying to get a sum

I am trying to get the sum of my array called matrix. However when I compile it I receive this error: bad operand types for binary operator '+' first type: int; second type:int[]. I do not understand ...
-4
votes
1answer
72 views

How to create a object of unlimited dynamic 2D Array in C#

I know how to create an object of 2D "Static size" array in C# using string[,] wordDBArray = new string[5,5] .... but my problem is how to create an object of "Dynamic size" 2D array (i mean without ...
1
vote
4answers
88 views

Manipulate multidimensional array in a function

I read a lot of stuff in here and tried many but i couldn't find a way to pass a multidimensional array to a function in C,change some of the values and somehow return the new array. It's important to ...
0
votes
1answer
37 views

change value of multi-dimensional array

I want to change a value of a multi-dimensional array, but this code keeps telling me "cannot set property '5' (which is the length of the array I guess) of undefined" obj.figures = new Array( new ...
2
votes
3answers
64 views

C - Array of strings (2D array) and memory allocation gets me unwanted characters

I have a tiny problem with my assignment. The whole program is about tree data structures but I do not have problems with that. My problem is about some basic stuff: reading strings from user input ...
0
votes
2answers
36 views

Get ID of canvas element when clicked on

I want to get the ID of the canvas i click on, but with the code I wrote, I always get the ID of the last canvas. Is it somehow possible to get the value of the multidimensional-array? Should I put ...
5
votes
2answers
43 views

MATLAB: How do you call a “cross-section” of an m-dimensional array?

In MATLAB, I have a multidimensional array of floats, A, with m dimensions; that is, its entries can be referenced with A(n_1, n_2, ..., n_m). I don't know if there is a good way to describe this ...
0
votes
2answers
34 views

How to extract one-dimensional array from Two dimensional array in VB.NET

H I'm using VB.NET, and i have a two dimensional array. How do I extract a one-dimensional array from it? I.E the 3rd row. Something like MAT[0] which i would do in java to get the first row from a ...
-3
votes
0answers
9 views

convert an one dimensional array of records to a two dimensional array [closed]

how can I write a subroutine that get an one dimensional array of records and converts it to a two dimensional array. (bye the way records have only three fields) any ideas?
1
vote
2answers
34 views

PHP: Pull values foreach() nested array, run function, return a 2nd level nested array

I've got an array that looks like this: Array ( [0] => Array ( [id] => abc [name] => Charlotte [state] => NC ) [1] => Array ( ...
0
votes
3answers
129 views

An Arraylist of Arrays or os there a better way?

So thanks to the wonderful people here i've managed to get something semi workable, still have a couple bugs but maybe you guys can help me figure it out. So far none of the solution provided were a ...

1 2 3 4 5 90
15 30 50 per page