Function for compare two elements
431995
function Compare(left, right, columns, order)
{
	//Compare all
	for(var i = 0; i < columns.length; i++)
	{
		//Check if que difference is numeric
		var numeric = !isNaN(+left[columns[i]] - +right[columns[i]]);

		//Get the values
		var a = (numeric === true) ? +left[columns[i]] : left[columns[i]].toLowerCase();
		var b = (numeric === true) ? +right[columns[i]] : right[columns[i]].toLowerCase();

		//Check the values
		if(a < b)
		{
			//Check the order
			return (order[i] === 'ASC') ? -1 : 1;
		}
		else if(a > b)
		{
			//Check the order
			return (order[i] === 'ASC') ? 1 : -1;
		}
	}

	//Default, return 0
	return 0;
}
899809
function compareKey(one: string, two: string): number {
  const delta = one.length - two.length;
  if (delta > 0) {
    return 1;
  }
  if (delta < 0) {
    return -1;
  }
  return one > two ? 1 : -1;
}
348444
function(a, b)
	{
		if ((a == null && b != null) || (a != null && b == null) ||
			(a != null && b != null && a.length != b.length))
		{
			return false;
		}
		else if (a != null && b != null)
		{
			for (var i = 0; i < a.length; i++)
			{
				if (a[i] == b[i] || (a[i] != null && !a[i].equals(b[i])))
				{
					return false;
				}
			}
		}
		
		return true;
	}
861798
def check_by_selector(self, selector):
    """"""
    elem = find_element_by_jquery(world.browser, selector)
    if not elem.is_selected():
        elem.click()
1217854
function checkElementHitting(box1, box2) {
                    return (box2.beginX <= box1.beginX && box1.beginX <= box2.endX || box1.beginX <= box2.beginX && box2.beginX <= box1.endX) &&
                        (box2.beginY <= box1.beginY && box1.beginY <= box2.endY || box1.beginY <= box2.beginY && box2.beginY <= box1.endY);
                }
836359
private int compare(Reference<E> e1, Reference<E> e2) {
        return comparator.compare(e1.element, e2.element);
    }
978806
def compare(ver1, ver2):
    ''''''
    if ver1 == ver2:
        return 0
    ver1 = _cut(ver1)
    ver2 = _cut(ver2)
    # magic multiplier
    m = 1
    # if the first one is shorter, replace them
    if len(ver1) < len(ver2):
        ver1, ver2 = ver2, ver1
        # and reverse magic multiplier
        m = -1
    # compare all items that both have
    for i, part in enumerate(ver2):
        if ver1[i] > ver2[i]:
            return m * 1
        if ver1[i] < ver2[i]:
            return m * -1
    # if the first "extra" item is not negative, it's bigger
    if ver1[len(ver2)] >= 0:
        return m * 1
    else:
        return m * -1
696788
function equals(a, b) {
    function checkArray(n, m) {
        var i, len;

        for(i = 0, len = n.length; i < len; i++) {
            if(!equals(n[i], m[i])) {
                return false;
            }
        }

        return true;
    }

    function checkObject(n, m) {
        var i;

        for(i in n) {
            if(n.hasOwnProperty(i)) {
                if(!m.hasOwnProperty(i)) {
                    return false;
                }
                if(!equals(n[i], m[i])) {
                    return false;
                }
            }
        }

        return true;
    }

    if(!is.defined(a) && !is.defined(b)) {
        return true;
    }
    if(!is.defined(a) || !is.defined(b)) {
        return false;
    }
    if(is.array(a) && is.array(b)) {
        return checkArray(a, b) && checkArray(b, a);
    }
    if(!is.array(a) && is.object(a) && !is.array(b) && is.object(b)) {
        return checkObject(a, b) && checkObject(b, a);
    }
    if(!is.array(a) && !is.object(a) && !is.string(a) && isNaN(a)) {
        return true;
    }

    return a === b;
}
252183
function( a, b, aParent, bParent, prop, compares, options ) {
		if(Array.isArray(a) && Array.isArray(b) ) {
			var intersection = [];
			each(makeArray(a), function(cur){
				for(var i = 0; i < b.length; i++) {
					if( compareHelpers.equal(cur, b[i], aParent, bParent, undefined, compares['*'], {"default": false}) ) {
						intersection.push(cur);
						break;
					}
				}
			});
			options.result[prop] = intersection;
			return true;
		}
	}
1048498
function (x, a, b) {
            if (x < a) {
                return a;
            } else if (x > b) {
                return b;
            }
            return x;
        }
935333
function(a, b, aParent, bParent, prop, compares, options){
		if(typeof compares === "function") {
			var compareResult = compares(a, b, aParent, bParent, prop, options);
			if(typeof compareResult === "boolean") {
				return compareResult;
			} else if(compareResult && typeof compareResult === "object"){
				if( compareResult.getSubset ) {
					if(h.indexOf.call(options.getSubsets, compareResult.getSubset) === -1) {
						options.getSubsets.push(compareResult.getSubset);
					}
				}
				if(compareResult.intersection === h.ignoreType || compareResult.difference === h.ignoreType) { // as in the case of a sort props
					return true;
				}
				// A \ B subset intersects in both directions
				// but does not diff from
				if( ("intersection" in compareResult) && !("difference" in compareResult)) {
					var reverseResult =  compares(b, a,bParent, aParent, prop, options);
					return ("intersection" in reverseResult);
				}
				return false;
			}
			return compareResult;
		}
	}
802613
function compare([l, ...left], [r, ...right]) {
  if (l < r) {
    return -1;
  }
  if (l > r) {
    return 1;
  }

  if (left.length === 0) {
    return 0;
  }

  return compare(left, right);
}
919743
function vers_compare(a, b) {
  a = a.split('.');
  b = b.split('.');
  for (var i = 0; i < 3; i++) {
    var d = parseInt(a[i] || '0') - parseInt(b[i] || '0');
    if (d != 0) {
      return d;
    }
  }
  return 0; // Equal
}
1055144
def compare(self, first, second):
        
        if first.lower() == second.lower():
            return True
        else:
            return False
1145232
function bufferEqual(a, b) {
  if (!Buffer.isBuffer(b)) return false;
  return iterableEqual(a, b);
}
606459
function diff( a, b ) {
  let i, j, found = false, result = [];

  for ( i = 0; i < a.length; i++ ) {
    found = false;
    for ( j = 0; j < b.length; j++ ) {
      if ( a[ i ] === b[ j ] ) {
        found = true;
        break;
      }
    }
    if ( !found ) {
      result.push( a[ i ] );
    }
  }

  return result;
}
23644
public static final Integer compare(Object a, Object b) {
        if (a==b) return 0;
        if (a==null || b==null) return null;
        assert a!=null && b!=null;
        if (a instanceof Number && b instanceof Number) {
            Number an = (Number)a;
            Number bn = (Number)b;
            if (Double.isNaN(an.doubleValue()) || Double.isNaN(bn.doubleValue())) {
                if (Double.isNaN(an.doubleValue()) && Double.isNaN(bn.doubleValue())) return 0;
                else return null;
            } else {
                if (an.doubleValue()==bn.doubleValue()) {
                    // Long.compare(long,long) is only available since Java 1.7
                    //return Long.compare(an.longValue(),bn.longValue());
                    return Long.valueOf(an.longValue()).compareTo(Long.valueOf(bn.longValue()));
                } else {
                    return Double.compare(an.doubleValue(),bn.doubleValue());
                }
            }
        } else {
            try {
                return ((Comparable)a).compareTo(b);
            } catch (Throwable e) {
                log.debug("Could not compare elements: {} - {}",a,b);
                return null;
            }
        }
    }