Warning: session_start(): open(/var/lib/php/sessions/sess_0n8mo810898tg6pbeu73bqve17, 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 indexOfIntPairInContentsIndexedList(IContentsIndexedList2 l, Int pa, Int pb, int idx) {
SortedSet setA = l.indicesOf_treeSetOfHasIndex(pa);
if (setA == null) ret -1;
SortedSet setB = l.indicesOf_treeSetOfHasIndex(pb);
if (setB == null) ret -1;
if (idx > 0) {
setA = setA.tailSet(HasIndex(idx));
if (empty(setA)) ret -1;
}
setB = setB.tailSet(HasIndex(idx+1));
if (empty(setB)) ret -1;
int n = l.size();
if (l(setA) <= l(setB)) {
for (int i : setA)
if (i+1 < n && eq(l.get(i+1), pb))
ret i;
} else {
for (int i : setB)
if (i > 0 && eq(l.get(i-1), pa))
ret i;
}
ret -1;
}