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

    Jul 29, 2009 · Static Array: Fixed size array (its size should be declared at the start and can not be changed later) Dynamic Array: No size limit is considered for this. (Pure dynamic arrays do …

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

    Oct 3, 2009 · A couple of contributions suggested that arrays in python are represented by lists. This is incorrect. Python has an independent implementation of array() in the standard library …

  3. How do I empty an array in JavaScript? - Stack Overflow

    Aug 5, 2009 · To Empty a Current memory location of an array use: 'myArray.length = 0' or 'myArray.pop() UN-till its length is 0' length: You can set the length property to truncate an …

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

    I have a large array in C (not C++ if that makes a difference). I want to initialize all members of the same value. I could swear I once knew a simple way to do this. I could use memset() in my cas...

  5. How to create an array containing 1...N - Stack Overflow

    This is probably the fastest way to generate an array of numbers. Shortest. var a=[],b=N;while(b--)a[b]=b+1;

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

    Jan 16, 2012 · Note that the double quotes around "${arr[@]}" are really important. Without them, the for loop will break up the array by substrings separated by any spaces within the strings …

  7. How can I add new array elements at the beginning of an array in ...

    Actually, all unshift/push and shift/pop mutate the source array. The unshift/push add an item to the existed array from begin/end and shift/pop remove an item from the beginning/end of an …

  8. Add a new element to an array without specifying the index in Bash

    Apr 28, 2020 · Yes there is: ARRAY=() ARRAY+=('foo') ARRAY+=('bar') Bash Reference Manual:. In the context where an assignment statement is assigning a value to a shell variable …

  9. Loop through an array in JavaScript - Stack Overflow

    Jun 10, 2010 · filter returns an array of items that satisfy some condition or test. every returns true if every array member passes the test. some returns true if any pass the test. forEach runs a …

  10. javascript - Copy array items into another array - Stack Overflow

    The source array one is a large stack of papers stapled together. The source array two is also another large stack of papers. Would it be faster for you to. Go to the store, buy enough paper …

Refresh