About 10,400,000 results
Open links in new tab
  1. 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 …

  2. 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.

  3. javascript - Array.size () vs Array.length - Stack Overflow

    May 25, 2017 · The OP was asking 'Array.size () vs Array.length'. From the previous discussions, it was make clear, that the 'size' Function is not part of standard JavaScript but implemented …

  4. How to loop through array in jQuery? - Stack Overflow

    Oct 15, 2010 · If you're dealing with sparse arrays (e.g., the array has 15 elements in total but their indexes are strewn across the range 0 to 150,000 for some reason, and so the length is …

  5. 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 …

  6. python - array.array versus numpy.array - Stack Overflow

    Sep 21, 2008 · For storage purposes, both numpy array and array.array are comparable. Here is the code for benchmark for both comparing storage size of unsigned integer of 4 bytes.

  7. 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 …

  8. syntax - C++ array initialization - Stack Overflow

    Dec 17, 2009 · This will default-initialize an array of any type (assuming the elements allow default initialization), which means that for basic (scalar) types the entire array will be properly …

  9. Difference between array [i] [:] and array [i,:] - Stack Overflow

    May 17, 2017 · 4 x[:] makes a shallow copy of a list, but is virtually useless when x is an array. It makes a new view - same data and shape, but different array object. If that's confusing you …

  10. 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).