Warning: session_start(): open(/var/lib/php/sessions/sess_uokdk2r5juingt4affr48oq8tm, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
static int intArrayBinarySearchWithGeneralizedComparator(int[] a, IF1_IntToInt comparator) {
ret intArrayBinarySearchWithGeneralizedComparator(a, 0, a.length, comparator);
}
static int intArrayBinarySearchWithGeneralizedComparator(int[] a, int fromIndex, int toIndex, IF1_IntToInt comparator) {
int low = fromIndex;
int high = toIndex - 1;
while (low <= high) {
int mid = (low + high) >>> 1;
int midVal = a[mid];
int cmp = comparator.get(midVal);
ifdef intArrayBinarySearchWithGeneralizedComparator_debug
printVars_str(+low, +high, +mid, +midVal, +cmp);
endifdef
if (cmp < 0)
low = mid + 1;
else if (cmp > 0)
high = mid - 1;
else
ret mid; // key found
}
ret -(low + 1); // key not found.
}