array('a' => array('b','c'), 'd' => 'e')
555924
public static function parseParameters($input)
    {
        if (!isset($input) || !$input) {
            return array();
        }

        $pairs = explode('&', $input);

        $parsedParameters = array();
        foreach ($pairs as $pair) {
            $split = explode('=', $pair, 2);
            $parameter = self::urldecodeRfc3986($split[0]);
            $value = isset($split[1]) ? self::urldecodeRfc3986($split[1]) : '';

            if (isset($parsedParameters[$parameter])) {
                // We have already recieved parameter(s) with this name, so add to the list
                // of parameters with this name

                if (is_scalar($parsedParameters[$parameter])) {
                    // This is the first duplicate, so transform scalar (string) into an array
                    // so we can add the duplicates
                    $parsedParameters[$parameter] = array($parsedParameters[$parameter]);
                }

                $parsedParameters[$parameter][] = $value;
            } else {
                $parsedParameters[$parameter] = $value;
            }
        }
        return $parsedParameters;
    }
734053
function collate(a, b) {

  if (a === b) {
    return 0;
  }

  a = normalizeKey(a);
  b = normalizeKey(b);

  var ai = collationIndex(a);
  var bi = collationIndex(b);
  if ((ai - bi) !== 0) {
    return ai - bi;
  }
  switch (typeof a) {
    case 'number':
      return a - b;
    case 'boolean':
      return a < b ? -1 : 1;
    case 'string':
      return stringCollate(a, b);
  }
  return Array.isArray(a) ? arrayCollate(a, b) : objectCollate(a, b);
}
594635
function shallowEqualArrays(a, b) {
    if (a.length !== b.length)
        return false;
    for (var /** @type {?} */ i = 0; i < a.length; ++i) {
        if (!shallowEqual(a[i], b[i]))
            return false;
    }
    return true;
}
1108109
function(olcAccesses) {
      var bie, i, isArray, j, l, len, len1, olcAccess, ref, value;
      isArray = Array.isArray(olcAccesses);
      if (!isArray) {
        olcAccesses = [olcAccesses];
      }
      for (i = j = 0, len = olcAccesses.length; j < len; i = ++j) {
        olcAccess = olcAccesses[i];
        value = `{${olcAccess.index}}to ${olcAccess.to}`;
        ref = olcAccess.by;
        for (l = 0, len1 = ref.length; l < len1; l++) {
          bie = ref[l];
          value += ` by ${bie}`;
        }
        olcAccesses[i] = value;
      }
      if (isArray) {
        return olcAccesses;
      } else {
        return olcAccesses[0];
      }
    }
1090695
function copyOntoArray(a1, a2) {
  for (let i = 0; i < a2.length; i++) {
    a1[i] = a2[i];
  }
  a1.length = a2.length;
  return a1;
}
261800
function some(array, member) {
        if(isUndefined(member)) {
          return false;
        }
        return array.some(function(el) {
          return equals(el, member);
        });
      }
1082984
function arrayFrom(arrayLike, delimiter=',') {
	if(typeof arrayLike === 'string')
		return arrayLike.split(delimiter)
	return Array.from(arrayLike)
}
1035415
function(o, delimit1, delimit2) {
      if (o.join) return o.join(delimit1);  // If it's an array
      var pairs = [];
      for (var k in o) pairs.push(k + delimit1 + o[k]);
      return pairs.join(delimit2);
    }
164596
function arrayEquals(arrayA, arrayB) {
	"use strict";

	// if the other array is a falsy value, return
	if (!arrayB || !arrayA) {
		return false;
	}

	// compare lengths - can save a lot of time
	if (arrayA.length !== arrayB.length) {
		return false;
	}

	for (var i = 0; i < arrayA.length; i++) {
		// Check if we have nested arrays
		if (arrayA[i] instanceof Array && arrayB[i] instanceof Array) {
			// recurse into the nested arrays
			if (!arrayEquals(arrayA[i], arrayB[i])) {
				return false;
			}
		}
		else if (arrayA[i] !== arrayB[i]) {
			// Warning - two different object instances will never be equal: {x:20} != {x:20}
			return false;
		}
	}
	return true;
}
52925
def C_array2dict(C):
    """"""
    d = OrderedDict()
    i=0
    for k in C_keys:
        s = C_keys_shape[k]
        if s == 1:
            j = i+1
            d[k] = C[i]
        else:
            j = i \
      + reduce(operator.mul, s, 1)
            d[k] = C[i:j].reshape(s)
        i = j
    return d
716247
function (b) {
            b = b.val;
            var a = this.val,
                a0 = a[0],
                a1 = a[1],
                a3 = a[3],
                a4 = a[4],
                b0 = b[0],
                b1 = b[1],
                b3 = b[3],
                b4 = b[4],
                b6 = b[6],
                b7 = b[7];

            a[0] = a0 * b0 + a3 * b1;
            a[1] = a1 * b0 + a4 * b1;
            a[3] = a0 * b3 + a3 * b4;
            a[4] = a1 * b3 + a4 * b4;
            a[6] += a0 * b6 + a3 * b7;
            a[7] += a1 * b6 + a4 * b7;

            return this;
        }
1070030
function(array1, array2) {
            // make sure these are actually arrays
            if(!(array1 instanceof Array) || !(array2 instanceof Array)) {
                return false;
            }
            if(array1 === array2) {
                // true if they are the same object
                return true;
            }
            if(array1.length !== array2.length) {
                // false if they are different lengths
                return false;
            }
            // false if any of their elements don't match
            for(var i = 0; i < array1.length; i++) {
                if(array1[i] !== array2[i]) {
                    return false;
                }
            }
            return true;
        }
1234857
static public function arrayTransfer(array $a, array $b)
	{
		if (ArrayUtils::isList($b, ArrayUtils::isList($a)))
		{
			$a = $b;
		}
		else
		{
			foreach ($b as $key => $value)
			{
				if (array_key_exists($key, $a) && is_array($value) && is_array($a[$key]))
				{
					$a[$key] = self::arrayTransfer($a[$key], $value);
				}
				else
				{
					$a[$key] = $value;
				}
			}
		}
		return $a;
	}
124076
function transpose(array &$var) {
		$out=[];
		foreach ($var as $keyx=>$cols)
			foreach ($cols as $keyy=>$valy)
				$out[$keyy][$keyx]=$valy;
		$var=$out;
	}
360104
function(args){
			var arr = [];
			each(args, function(i, str){arr[i] = str});
			return arr;
		}
648878
function equalType (a, b) {
  if (Array.isArray(a) && Array.isArray(b)) {
    if (0 === a.length || 0 === b.length) {
      return true;
    }

    return equalType(a[0], b[0]);
  }

  if ('null' == a || 'null' == b) {
    return true;
  }

  return a == b;
}
816528
function(arrayA, arrayB) {

    var returnArray =[];
    var i = 0;
    arrayA.forEach(function(doc){
        if (common.isUseless(theIDCheck(arrayB, doc) )) { i += 1; }
        else {
            i += 1;
            returnArray.push([doc, theIDCheck(arrayB, doc)]); ////push a pair of matching docs
        };
    });

    if ( (i == arrayA.length) && ( common.isUseless(returnArray[0]) ) ) {    return null;    }
    else if ( (i == arrayA.length) && (common.isUseless(returnArray[0]) == false ) ) {    return returnArray;    };
}