Returns the real offset for the given relative offset.
170153
private long findAfter(long offset) {
    if (size == 0) {
      return -1;
    }

    int low  = 0;
    int high = size-1;

    while (low <= high) {
      int mid = low + ((high - low) / 2);

      long i = buffer.readLong(mid * ENTRY_SIZE);
      if (i < offset) {
        low = mid + 1;
      } else if (i > offset) {
        high = mid - 1;
      } else {
        return mid;
      }
    }

    return (low < high) ? low + 1 : high + 1;
  }
1215286
def horz_offset(self):
        
        x, xMode = self.x, self.xMode
        if x is None or xMode is None or xMode.val != ST_LayoutMode.FACTOR:
            return 0.0
        return x.val
134490
function calculateOffsetTop(obj) {
	var curtop = 0;
	if (obj.offsetParent) {
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) 
			curtop += obj.offsetTop
	} else if (obj.y)
		curtop += obj.y;
	return curtop;
}
128809
def _offset(self, x, y):
        """"""
        x, y = force_int(x, y)
        return y * self.width * 4 + x * 4
1345025
def set_offset( self, offset ):
        """"""
        assert offset in range( len( self.buffer ) )
        self.pos = offset
        self._fill_buffer()
10719
@Trivial
    public static double relativeSeconds(long relativePointA, long relativePointB) {
        long diff = relativePointB - relativePointA;
        double seconds = toSeconds(diff);
        return seconds;
    }
301029
def read_to_offset(self, offset):
    
    assert offset >= self._offset
    result = self._buffer[self._offset: offset]
    self._offset += len(result)
    return result
16498
function getPositionFromOffset(el, of) {
  var offsetParent = getOffsetParent(el);
  var parentOf = getOffset(offsetParent);
  return {
    x: of.x - parentOf.x,
    y: of.y - parentOf.y
  };
}
882832
def offset(self, dx, dy):
        
        return Location(self.x+dx, self.y+dy)
404560
def offset(self):
        """"""
        if not self._pages:
            return None

        pos = 0
        for page in self._pages:
            if page is None:
                return None
            if not page.is_final:
                return None
            if not pos:
                pos = page.is_contiguous[0] + page.is_contiguous[1]
                continue
            if pos != page.is_contiguous[0]:
                return None
            pos += page.is_contiguous[1]

        page = self._pages[0]
        offset = page.is_contiguous[0]
        if (page.is_imagej or page.is_shaped) and len(self._pages) == 1:
            # truncated files
            return offset
        if pos == offset + product(self.shape) * self.dtype.itemsize:
            return offset
        return None
71855
private static int getPreviousPageOffset(final int offset, final int limit) {
        return hasFullPreviousPage(offset, limit) ? getPreviousFullPageOffset(offset, limit) : getFirstPageOffset();
    }
922243
public int convertPointToAbsolutePosition(int relativePosition) {
        if (relativePosition < 0 || relativePosition >= length())
            throw new IllegalArgumentException("Relative position outside this range (" + relativePosition + ").");

        if (reversed)
            return upper - 1 - relativePosition;
        else
            return relativePosition + lower;
    }
1085226
def utcoffset(self):
        """"""
        if self._tzinfo is None:
            return None
        offset = self._tzinfo.utcoffset(None)
        _check_utc_offset("utcoffset", offset)
        return offset
374458
@Default
	public int getOffset() {
		String value = getValue();
		String superstring = getSuperstring();
		return value != null && superstring != null ? superstring.indexOf(value) : -1;
	}
1192874
public double[] get(double[] dest, int offset) {
        dest[offset+0]  = m00;
        dest[offset+1]  = m01;
        dest[offset+2]  = m02;
        dest[offset+3]  = m03;
        dest[offset+4]  = m10;
        dest[offset+5]  = m11;
        dest[offset+6]  = m12;
        dest[offset+7]  = m13;
        dest[offset+8]  = m20;
        dest[offset+9]  = m21;
        dest[offset+10] = m22;
        dest[offset+11] = m23;
        dest[offset+12] = m30;
        dest[offset+13] = m31;
        dest[offset+14] = m32;
        dest[offset+15] = m33;
        return dest;
    }
662194
def get_offset(self, request):
        """"""
        try:
            return _positive_int(
                get_query_param(request, self.offset_query_param),
            )
        except (KeyError, ValueError):
            return 0
844134
def milliseconds_offset(cls, timestamp, now=None):
        
        if isinstance(timestamp, (int, float)):
            base = timestamp
        else:
            base = cls.to_unix(timestamp)
            base += (timestamp.microsecond / 1000000)
        if now is None:
            now = time.time()
        return (now - base) * 1000