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.

learn more… | top users | synonyms (2)

0
votes
0answers
6 views

Make a function return an array with objects

I've hit my head in all corners with this one but I'm missing something here. Info I'm coding a small javascript page that will take a photo ID of a Facebook photo, then return the total number of ...
0
votes
0answers
4 views

awk output to stdout is different than piping results to file

It seems impossible, but if I output the results of my awk script to stdout I get an oddly truncated version compared to when I pipe the output to a file. The script is pretty simple. It loops ...
0
votes
0answers
19 views

how to make getRowTotal function in C++ for two-dimensional array

getRowTotal. This function should accept a two - dimensional array as its first argument and an integer as its second argument. The second argument should be the subscript of a row in the array. The ...
1
vote
1answer
13 views

My Script Multiplying An Array Key Value Does't Work

H there - firs time posting here - I will spare letting you know that I'm "new to PHP and Perl", as that will become painfully obvious below. Below is a script I wrote to scrape a bank's asset ...
0
votes
3answers
17 views

Segmentation Fault - declare and init array in C

I am very new to C. coming from Python, Java and C# worlds. This might be a stupid question but I am getting segmentation fault: // struct for storing matrices typedef struct { int m; int n; ...
-2
votes
0answers
19 views

PHP str_replace and array double dimension

Simply need to replace terms that are in array : <?php $listarray = array('#TERM1#' => 'value term 1', '#TERM2' => 'value term 2'); $i=0; foreach( $listarray as $handle ){ $i++; $handle = ...
0
votes
4answers
26 views

Using foreach loop through array in an array using php

I am fairly new to PHP and have been working on looping through this array for days...sigh... http://pastebin.com/Rs6P4e4y I am trying to get the name and headshot values of the writers and ...
2
votes
3answers
25 views

What's the best way to apply a “Join” method generically similar to how String.Join(…) works?

If I have a string array, for example: var array = new[] { "the", "cat", "in", "the", "hat" }, and I want to join them with a space between each word I can simply call String.Join(" ", array). But, ...
3
votes
1answer
27 views

array slicing in numpy

today I used the numpy array for some calculation and found a strange problem, for example, assume i already imported numpy.arange in Ipython, and I run some scripts as follows: In [5]: foo = ...
0
votes
2answers
15 views

Assigning new array from existing array php only shows last value of array

I have a slight problem here. I have the following code that I create a search query, and im trying to take "$row" array and create a new array called "$item" so I can echo the values inside my div ...
0
votes
0answers
11 views

How to compare arrays of char in CUDA C++?

I need a function in cuda that recieves an array of chars and if they match, the function returns a value, but when i test this code, always return 0, like none of these conditions match. so far i ...
-1
votes
3answers
28 views

Read user input from console from arrays

Hi I'm using visual studio 2010 to learn some C#, at the moment I'm doing arrays in a console application i have created an array that gives the output I'm looking for. here is the code I'm using ...
1
vote
1answer
12 views

JavaScript toString or join on Array of long numbers (SSN)

Is there a way in javascript to ensure plain number-to-string conversion (not scientific notation) while converting a mixed set of object types to strings? I am writing javascript functions to format ...
0
votes
2answers
52 views

Issue with Merge Sort implementation in C++

I am getting two errors in implementing the algorithm from pseudocode: One of my problems is int L[n1+1]; error: needs to be a constant; cannot allocate constant size 0. The only way to run this is ...
2
votes
1answer
39 views

numpy in1d returning incorrect results?

I have a weird issue happening with numpy's in1d function. I have two arrays of integer values representing particle IDs say A & B (IDs are unique to each particle). Array A contains a list of ...

15 30 50 per page