An array is an ordered data structure consisting of a collection of elements (values or variables), each identified by one (single dimensional array, or vector) or multiple indexes.
0
votes
0answers
9 views
C# - How To Marshal Int Arrays
I'm working with C# an I have a third party dll that needs int arrays as parameters. How do I marshal an int array between C# and C/C++ ? The functions are declared like this:
__declspec(dllimport) ...
1
vote
4answers
54 views
How to get the number of elements of a C-array like this? [duplicate]
I have a C-array like this:
double arr[] = {
0.0, 0.1, 0.2, 0.5,
0.1, 0.2, 0.3, 0.4,
0.2, 0.0, 0.1, 0.3
};
Is it safe to get the number of elements like this?
int numElements ...
1
vote
3answers
20 views
Sorting an array of dates
I have created an array from a CSV of date values and now need to be able to sort them so that I can then get the latest date from the array.
I have tried:
Array.Sort()
but this doesn't sort ...
0
votes
4answers
29 views
break string and arrays down intro separate items
I have data in a file that has two sets of values and then an unspecified series of arrays
(each with 3 sub items in them)
For example:
('January', 2, [('curly', 30), ('larry',10), ('moe',20)])
I ...
1
vote
2answers
56 views
PHP using map array?
I am new to php and trying to use map array. I would like my $arr2 to hold values of different types of fruits. But when I execute the following code, it tells me "apple" is an undefined index. Can ...
1
vote
4answers
53 views
Using a variable to set an object array in java
When I set an object array such as:
Player[] player = new Player[amountOfPlayers];
I use:
amountOfPlayers = br.read();
To get the variable amountOfPlayers. Whenever I run my program I would ...
0
votes
0answers
23 views
Passing PHP array in Javascript function as argument
I am getting error with the following code
$string.="<input class='jt-test-question-answer-choice-radio' name='q1' type='$input' value='q20a1' ...
1
vote
3answers
20 views
Bash Script Leet Text Convertor: How to get array to recognize spaces
The issue with the code below is that I can not seem to get the array to recognize when the text has spaces in it or not. I figured adding the ' ' value in the array would handle this, but I was ...
1
vote
0answers
41 views
Repa performance for planetary simulation
I have written a simulation of the outer planets of the solar system using the Euler symplectic method and implemented this a) using repa and b) using yarr.
yarr seems to perform about x30 quicker ...
1
vote
1answer
27 views
Postgres array of JSON
Issuing on Postgres 9.2 the following:
CREATE TABLE test (j JSON, ja JSON[]);
INSERT INTO test(j) VALUES('{"name":"Alex", "age":20}' ); -- Works FINE
INSERT INTO test(ja) VALUES( ...
0
votes
1answer
23 views
php array map on nested
situation
I have an array result returned from an Database call. In the example below, it fetches many Genres which can have many books. Using a join, the query pulls the books from each genre at the ...
0
votes
0answers
25 views
Arrays won't be reseted after finishing vba macro
I know my English is not good, I hope you can understand me.
In my vba macro, I have two 2D-Arrays. When I start my macro first time the macro will perfectly run withouth problems, but when I want ...
0
votes
1answer
14 views
Searching through an unsorted nonuniform pair array for closest entry
I have an array that looks something like this:
[[320, 80], [300, 70], [300, 80], [270, 75], [260, 70], [280, 70]]
That is just a snippet, the actual array is 338 big.
I am trying to find the next ...
0
votes
0answers
6 views
Interpreting Firebug output for a javascript array
I have a wizard interface, done using jWizard
Each step of the wizard contains a group of radio buttons.
At the step before last, upon selecting a radio button, I add each of the values(method) ...
1
vote
1answer
22 views
Bash, splitting string fail
Following what I found here, I tried to split the list of files of a certain pattern to an array. However, the string doesn't split (The empty line is just to ease on the reading).
bash-3.2$ ...