Tagged Questions
1
vote
4answers
18 views
Make array unique in multidimensional array php codeigniter
$array = array(
0 => array(
"name" => "test",
"id" => 4
),
1 => array(
"name" => "test2",
"id" => 152
), ...
3
votes
2answers
48 views
Get count of true in bool[,] F#
I have a bool[,] in F# and I want to get the count of true 's present. How can i do this without descending into imperative programming?
this is my current solution, which is really just c# written ...
0
votes
0answers
11 views
Row-view for multidimensional array
In C#, there are two ways to define a multi-dimensional array:
T[,] foo;//multiple commas possible
T[][] bar;//multiple brackets possible
The advantage of the first is that you add an additional ...
-1
votes
2answers
19 views
Handling array values using specific array element
I have an array value like this. I tried array_search and it is of no use.
Just what I want is to filter only the array values that have status value.
Output
Array
(
[1] => ...
-1
votes
0answers
18 views
Sort multidimensional array using php [duplicate]
I have the following array and I would like to rearrange or sort the array elements based on quid from low to high.
Array
(
[0] => Array
(
[quid] => 29
)
...
0
votes
3answers
49 views
How can I flatten a multi dimensional array? [on hold]
I am reading raw data as a multi-dimensional array of Integers or floats or any other number. The size of the array is given to me as an array of integers. There is no limit to the size, so the given ...
0
votes
1answer
32 views
Convert json string into multidimensional array
This is currently my jSON array:
{"1": [{"11": [[1, 1],[2, 2],[3, 3]],"21": [[1, 1],[2, 2],[3, 3]],"31": [[1, 1],[2, 2],[3, 3]]}],"4": [{"12": [[1, 1],[2, 2],[3, 3]],"22": [[1, 1],[2, 2],[3, ...
0
votes
1answer
29 views
Parsing Multidimensional Array in PHP
Apologies if this is a duplication of another answer, I have spent a considerable amount of time looking through this and other forums without finding an explanation that makes sense to my very small ...
2
votes
3answers
32 views
Trimming vals in a matrix of arbitrary dimensions in a specified dimension
I'm writing a function that requires some values in a matrix of arbitrary dimansions to be dropped in a specified dimension.
For example, say I have a 3x3 matrix:
a=[1,2,3;4,5,6;7,8,9];
I might ...
1
vote
1answer
25 views
Python: Access index of moving window array that matches current position of array being looped over
I've coded up a neighbourhood smoothing filter that works on a user supplied 2D array - it works as it is but it could be far faster/less wasteful of memory as currently I am copying the entire input ...
0
votes
5answers
36 views
PHP find last occurrence from multidimensional array
I am very new to php, trying few basic php scripts. I need to find the last occurrence of (id = 100001203541047) in the following array
[0] => Array
(
[id] => ...
0
votes
2answers
60 views
Can't initialize a Two-Dimentional Array in Java
I am trying to store X axis position of mouse and Y axis position of mouse separately inside a two dimentional array and use it later but getting errors.
I am new to arrays and i am trying to ...
0
votes
3answers
43 views
Creating and using a 2 dimensional array
I need to define a 2 dimensional array variable.
I have been able to use a list variable but now the project I'm working on requires an array.
How is this done?
How can I "loop" through the 2 ...
1
vote
1answer
28 views
Rewrite a multidimensional array to match format of another multidimensional array
Let's say that I have a multidimensional array that looks like so:
{
"hello" : "world",
"foo" : {
"foo": {
"foo": "bar"
}
},
"some" : "value",
"other" ...
0
votes
1answer
47 views
How to access data from Multidimensional Array
I have an array in python which looks like:
Edit: Sorry, the data looks like follows:
1. [array([[[23, 2]]]), array([[[21, 2]],
[[21, 3]],
[[21, 4]],
...
0
votes
1answer
22 views
Memory Issue When Accessing Multidimensional Array Index
I've allocated a mutable array as:
self.allisonHall.hours = [[NSMutableArray alloc] initWithCapacity:7];
and filled it with data:
self.allisonHall.hours = @[
@[
...
0
votes
0answers
28 views
HTML input array name coming through as a string
I have an input checkbox field as follows:
<input type="checkbox" name="group_items[<?=$item_id?>][<?=$group_id?>]" value="1" />
There are several of these in a matrix grid. On ...
0
votes
2answers
45 views
Building data into a multidimensional array in JavaScript
I'm trying to rebuild data structure from an existing JSON file.
For the sake of example, I trimmed all the unnecessary code:
var entries = [
{
"band": "Weezer",
"song": "El Scorcho"
},
...
-1
votes
0answers
14 views
php sort multidemension array by interger value [duplicate]
I tried some of the methods to sort a multidimensional array .
My array output:
$myArray = Array (
[0] => Array (
[0] => http://mydomain/page/title1.html
[1] => nokia
...
0
votes
1answer
36 views
Numpy arctan2 of multidimensional array
I am trying to shape up some code that was written to take single float values, so it works fine using 1D (and eventually 2D) numpy.arrays as input.
Striped down to a minimal example the function ...
5
votes
2answers
35 views
How to get common values from 4 multidimensional arrays using array_intersect
i am stuck at this stage of my project.
i am trying to get common values from four multidimensional arrays using array_intersect. can anyone help me with this issue ?
here are all four array:
...
0
votes
1answer
25 views
PHP form submitting to db with multidimensional arrays
Hullo :)
I have a multidimensional array that looks like this:
$things = array(
array('one'=>'red', 'two'=>'$85' , 'three'=>1),
array('one'=>'green', 'two'=>'$35' , ...
0
votes
3answers
35 views
How to make small multidimensional array from big multidimensional array?
I have a large multidimensional array like this
Array
(
[/] => Array
(
[0] => d:Cover & Label:0
[1] => d:INFO TBS:0
[2] => d:VIDEO ...
-12
votes
3answers
61 views
Stuck on a java exercise [closed]
Java - how do i check if if the string i enter matches any of the characters on the left column and returns the corresponding right value. the answer has to be in double! the user enters a string for ...
0
votes
1answer
29 views
How to find Array type and its dimensions for a multidimensional Array for an Object reference
I have a Object reference which may or may not be a array.It can be a multidimensional array.I want to find the component type and length of the array dimensions.
What I have tried so far is get the ...
0
votes
0answers
47 views
Calculation on 3D array PHP
I have a 3 dimensional array
A(I,II); B(I,II); ... ;F(I,II)
A(I,II); B(I,II); ... ;F(I,II)
A(I,II); B(I,II); ... ;F(I,II)
A(I,II); B(I,II); ... ;F(I,II)
I'd like for each inner element (I or II ...
0
votes
3answers
25 views
removing duplicate from 2D array
I have an array which is 2D and I want to remove duplicates from it,
the var dump look like this 1=>abc.com. 2=>acc.com, 3=>abc.com so I want to remove the second occurence of abc.com, that ...
0
votes
2answers
31 views
Accessing/creating multi dimensional array in Java
I am fairly new to Java but am trying my best to learn. As a personal experiment I am writing a program that times the film developing process, fairly similar to the 'Massive Dev Chart' for Android ...
-2
votes
2answers
36 views
How can I add two arrays into a third?
So lets say I have a blank array:
$array = array();
And I have the following two arrays:
$array2 = array(
'blah' => '1',
'bleh' => '2',
)
$array3 = array(
'halb' => '3',
...
0
votes
1answer
18 views
Printing objects in a 2-D array using deepToString
I'm trying to write a Java application that will simulate football fixtures (in the style of the World Cup) and produce match reports and results randomly. Since I want to assign players to each team, ...
0
votes
1answer
26 views
How to combine array that has same key?
I get this array, but I want to show me KEY and all subitem of that KEY bellow, I dont want every time to repear a key, I need that key shows only one and all others entity that has same key under ...
-3
votes
2answers
30 views
how to code a for loop using a 2 dimensional array
I am just learning java and while completing an assignment i ran into a problem. I need to use the for loop but I'm unsure of the proper coding. I was able to compile my code to get the output for the ...
0
votes
0answers
21 views
Declaring arrays of different sizes within a pre-existing array in python
I have been trying to declare a three dimensional array with the following constraints using numpy in Python 2.7.3:
1.) MyArray(First, Second, Third)
2.) First has 11 elements
3.) Second has 14 ...
0
votes
1answer
35 views
Accessing Multidimensional stdClass array in Codeigniter
I think I have a special case. I think my array is formatted in such away that the conventional methods for accessing a stdClass are not going to work.
Before someone dings me for not checking the ...
-2
votes
1answer
29 views
modify json response in php?
I am newbie in php m creating web service for my colors reponse. It works great on my web application as i can fetch data from it easily now in android m stuck.
I have response like that.
{
...
0
votes
0answers
24 views
Multidimensional Array Initialization in Java [duplicate]
I know you can initialize a 2d array, and a 3d array etc. Is there a way to initialize an n-dimensional array, say in a method, such that the number of dimensions can be specified by an input? Like a ...
1
vote
3answers
40 views
Best way to sort multidimensionnal array
I have a multidimentionnal array like this example
$arr = array (
range(9,4),
range(8,0),
range(2,7),
range(-1,17)
);
after showing its content I get this
9 8 7 6 5 4
...
0
votes
1answer
30 views
how to pass and get the multidimensional array in c# webmethod
I want to send and work on multidimensional array in c# webmethod for that i have done some work.I dont want to run the ajax function in loop.
ASPX page code
var trip_id = $("#example1").val();
...
0
votes
2answers
30 views
Multidimensional array loop not displaying the result for objects
I am getting the result from the SOAP client as an response. I just have to analyze the structure of the parameter and display the results accordingly. I have the following srucutre for ...
-2
votes
0answers
48 views
Twig PHP accessing values in a multidimensional array
I'm trying to create a filter within by comparing values and outputting them back into an array which i can loop through in twig to spit out to the display.
This is the code i have at the moment:
...
0
votes
1answer
38 views
How to insert Multidimensional arrays in specific fields in MySQL database?
i have a multidimensional array that i want to store in mysql database but in different fields..
can you help me with this?
Array
(
[Headoffice] => Array
(
[101] => Array
...
1
vote
3answers
97 views
Can I use std::vector<std::vector<T>> to represent two dimensional arrays in C++?
I recently learned how to do two- and three-dimensional arrays in plain C using pointers, however being a C++ enthusiast, I'd also like to figure out how to do multi-dimensional arrays in C++.
I know ...
-1
votes
1answer
31 views
How to re order the dimensions on n-dimensional matrix in C? (Similar to permute(A,[2:n 1]) in Matlab )
I am working a n-dimensional matrix (which being stored as a single dimensional array), I wish to reorder in its dimensions such that the leading dimension is now the last dimension.
eg. if ...
0
votes
1answer
27 views
Multidimensional Array from SQL Table
Here's the my SQL table:
order_id | product_id | deal_title | currency_code | total | date_modified
My Question is how do I make an array in PHP like in the below:
Array
(
[product_id_num1] ...
0
votes
6answers
72 views
How to save two Arrays in two dimensional Array?
I am new at iOS Dev. I want to save two different arrays (array1 & array2) in 2 dimensional array. I know how to save data directly in two dimensional array but can't by save two different arrays ...
0
votes
1answer
26 views
Compare elements in multidimensional array
I have a multidimensional array where one of the elements looks like the following:
Array
(
[9-0048-1:G07] => Array
(
[wafer] => 9-0048-1
[cell] => G07
[isc] ...
1
vote
1answer
26 views
expected array error for 2-D array
I'm trying to create a two dimensional dynamic array, but keep getting the error "Expected Array" when it comes to ReDiming the bigArray. Any input on why this is happening? Also any help on creating ...
0
votes
2answers
24 views
2d array - group by value and sum up same keys' values
Hello and thanks for taking the time to look at my question.
My current problem is that, I have the following array ($topics_percentage):
Array
(
[0] => Array
(
[id] => ...
0
votes
2answers
48 views
How would I get the value inside the array?
I would like to get the value of [source] inside the cover array. What should I do? Thanks.
Array
(
[cover] => Array
(
[id] => 763132827070934
[offset_y] => 29
...
0
votes
3answers
33 views
Add the digits of each element in an multidimensional array
I have a 2 dimensional array. I'm trying to add the digits of each element in the array and find the sum.
For example :
consider my array is: a[2][2] = { {15,11}, {13,21} }.
Now for the element 15 ...