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

    Jul 29, 2009 · An array can contain primitives data types as well as objects of a class depending on the definition of the array. In case of primitives data types, the actual values are stored in …

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

    Why go through the trouble of Array.apply(null, {length: N}) instead of just Array(N)? After all, both expressions would result an an N -element array of undefined elements. The difference is that …

  3. Python list vs. array – when to use? - Stack Overflow

    Aug 17, 2022 · The array.array type, on the other hand, is just a thin wrapper on C arrays. It can hold only homogeneous data (that is to say, all of the same type) and so it uses only …

  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. Remove duplicate values from a JavaScript array - Stack Overflow

    If you want to remove objects from an array that have exactly the same properties and values as other objects in the array, you would need to write a custom equality checking function to …

  6. Initialising an array of fixed size in Python - Stack Overflow

    For most C use cass of an array, a normal (non-fixed) list is the idiomatic python equivalent. This is an answer to the question, as it probably helps the the OP (who is transitting from C to …

  7. Check if a value is in an array or not with Excel VBA

    It returns a single dimension variant array with just two values, the two indices of the array used as an input (assuming the value is found). If the value is not found, it returns an array of (-1, -1).

  8. How can you sort an array without mutating the original array?

    25 ES2023 Array Method toSorted (): The toSorted() method of Array instances is the copying version of the sort() method. It returns a new array with the elements sorted in ascending order.

  9. c++ - Return array in a function - Stack Overflow

    Aug 13, 2010 · Passing an array by reference is: void foo( int (&array)[5] ); (array of 5 ints by reference). When you pass by reference what you get inside the function is a reference to the …

  10. How to add a string to a string [] array? There's no .Add function

    Array.Resize is the proper way to resize an array. If you add a comment before the code snippet saying it's rarely the best way to handle situations where the array represents a resizable …