See if two arrays are different.
329756
private boolean hasChanged( int[] oldValue, int[] newValue ) {
        if( oldValue.length == newValue.length ) {
            for( int i = 0; i < newValue.length; i++ ) {
                if( oldValue[i] != newValue[i] ) {
                    return true;
                }
            }
            return false;
        }
        return true;
    }
1240563
function arraysEqual(first, second){
    if(!Array.isArray(first)) throw new Error("first must be an array.");    
    if(!Array.isArray(second)) throw new Error("second must be an array.");
    if(first.length !== second.length) return false;
    for (var i = 0; i < first.length; i++) {
        if(first[i] !== second[i]) return false;
    }
    return true;
}
41643
private function hasArrayDuplicates($array)
    {
        $compare = array();
        foreach ($array as $element) {
            // duplicate element found
            if (in_array($element, $compare, true)) {
                return true;
            } else {
                // add element to temporary array to check for duplicates
                $compare [] = $element;
            }
        }

        return false;
    }
3842
function hasDuplicates(arr, fn) {
  var obj = {};
  var i, l, elem;
  for (i = 0, l = arr.length; i < l; i++) {
    elem = arr[i];
    if (fn) {
      elem = fn(elem);
    }
    if (obj[elem]) {
      return true;
    }
    obj[elem] = true;
  }
  return false;
}
444769
function _arrayContainsNone(arry1, arry2) {
  arry1 = _arrayify(arry1)
  arry2 = _arrayify(arry2)
  for (let i = 0; i < arry2.length; i++) {
    if (_contains(arry1, arry2[i])) {
      return false
    }
  }
  return true
}
370378
public static void subtract(double[] array1, double[] array2) {
        assert (array1.length == array2.length);
        for (int i=0; i<array1.length; i++) {
            array1[i] -= array2[i];
        }
    }
863623
private function arraysAreIdentical (array $array1, array $array2) : bool
    {
        return (0 === \count(\array_diff($array1, $array2)))
            && (0 === \count(\array_diff($array2, $array1)));
    }
888263
function stringOrArrayDifferent(o, o1) {
	var different = false

	// check if same
	// note: two arrays will not be same even if values are same
	if (o != o1) {
		if (Array.isArray(o) && Array.isArray(o1) &&
			o.length == o1.length) {

			// two arrays of the same length: examine elements
			// loop until true is returned
			different = o.some(function(element, index) {
				return element != o1[index]
			})
		} else different = true
	}
	return different
}
87910
def _compare_across(collections, key):
    """"""
    if len(collections) < 2:
        return True
    c0 = key(collections[0])
    return all(c0 == key(c) for c in collections[1:])
1133874
public function difference($array_one=null, $array_two=null) {
    $arrays = self::_wrapArgs(func_get_args(), 1);
    
    return self::_wrap(array_values(call_user_func_array('array_diff', $arrays)));
  }
353952
function isUnique(array) {
 var u = {}, a = [];
 var isUnique = 1;
 for(var i = 0, l = array.length; i < l; ++i){
    if(u.hasOwnProperty(array[i])) {
      isUnique = 0;
      break;
    }
    u[array[i]] = 1;
 }
 return isUnique;
}
97649
private boolean subArraysEqualWithMask(byte[] a, int aStart, byte[] b, int bStart, byte[] mask, int maskStart, int len) {
        for (int i = aStart, j = bStart, k = maskStart; len > 0; i++, j++, k++, len--) {
            if ((a[i] & mask[k]) != (b[j] & mask[k])) {
                return false;
            }
        }

        return true;
    }
1232442
static boolean arraysEqual(byte[] array1, byte[] array2) {
    if (array1.length != array2.length) {
      return false;
    }
    
    boolean isEqual = true;
    for (int i = 0; i < array1.length; i++) {
      if (array1[i] != array2[i]) {
        isEqual = false;
      }
    }
    return isEqual;
  }
97558
function arrayBufferEquals(ab1, ab2) {
    if (ab1.byteLength !== ab2.byteLength) {
        return false;
    }
    var arr1 = new Uint8Array(ab1);
    var arr2 = new Uint8Array(ab2);
    for (var i = 0, len = arr1.length; i < len; i++) {
        if (arr1[i] !== arr2[i]) {
            return false;
        }
    }
    return true;
}
381665
private boolean subArraysEqual(byte[] a, int aStart, byte[] b, int bStart, int len) {
        for (int i = aStart, j = bStart; len > 0; i++, j++, len--) {
            if (a[i] != b[j]) {
                return false;
            }
        }

        return true;
    }
231383
def is_cupy_array(arr):
    """"""
    if cupy is None:
        return False
    elif isinstance(arr, cupy.ndarray):
        return True
    else:
        return False
564008
def _avoid_duplicate_arrays(types):
    
    arrays = [t for t in types if isinstance(t, dict) and t["type"] == "array"]
    others = [t for t in types if not (isinstance(t, dict) and t["type"] == "array")]
    if arrays:
        items = set([])
        for t in arrays:
            if isinstance(t["items"], (list, tuple)):
                items |= set(t["items"])
            else:
                items.add(t["items"])
        if len(items) == 1:
            items = items.pop()
        else:
            items = sorted(list(items))
        arrays = [{"type": "array", "items": items}]
    return others + arrays