About 14,100,000 results
Open links in new tab
  1. How do I declare and initialize an array in Java? - Stack Overflow

    Jul 29, 2009 · The third way of initializing is useful when you declare an array first and then initialize it, pass an array as a function argument, or return an array. The explicit type is required.

  2. How do I declare an array in Python? - Stack Overflow

    Aug 23, 2022 · The array structure has stricter rules than a list or np.array, and this can reduce errors and make debugging easier, especially when working with numerical data.

  3. How to create an array containing 1...N

    We'll use that fact later. Array.apply(null, [undefined, undefined, undefined]) is equivalent to Array(undefined, undefined, undefined), which produces a three-element array and assigns …

  4. How can I initialize all members of an array to the same value?

    How would you use memset to initialize a int array to some value larger than 255? memset only works if the array is byte sized.

  5. A confusion about ${array[*]} versus ${array[@]} in the context of a ...

    The difference between [@] and [*] -expanded arrays in double-quotes is that "${myarray[@]}" leads to each element of the array being treated as a separate shell-word, while …

  6. Most efficient way to reverse a numpy array - Stack Overflow

    Jul 21, 2011 · Here is some code that demonstrates constructing a 1d array, transforming it into a 2d array, flipping it, then converting back into a 1d array. time.clock() will be used to keep time, …

  7. Loop through an array of strings in Bash? - Stack Overflow

    Jan 16, 2012 · Without them, the for loop will break up the array by substrings separated by any spaces within the strings instead of by whole string elements within the array. ie: if you had …

  8. How to convert object array to string array in Java

    Jun 19, 2009 · This is a work of beauty and satisfies the requirement of being able to aesthetically convert a non-String object array to an array of their toString equivalents. The currently …

  9. Check if an array contains any element of another array in JavaScript

    May 1, 2013 · Array .filter() with a nested call to .find() will return all elements in the first array that are members of the second array. Check the length of the returned array to determine if any of …

  10. java - Create ArrayList from array - Stack Overflow

    Oct 1, 2008 · The Collections one create a pointer at the beginning of the array. My loop create many pointers : one for each array member. So if the original array changes, my poiners are …