Returns a remote pointer to the TEB.

        @rtype:  int
        @return: Remote pointer to the L{TEB} structure.
        @raise WindowsError: An exception is raised on error.
484947
def get_teb_address(self):
        
        try:
            return self._teb_ptr
        except AttributeError:
            try:
                hThread = self.get_handle(win32.THREAD_QUERY_INFORMATION)
                tbi = win32.NtQueryInformationThread( hThread,
                                                win32.ThreadBasicInformation)
                address = tbi.TebBaseAddress
            except WindowsError:
                address = self.get_linear_address('SegFs', 0)   # fs:[0]
                if not address:
                    raise
            self._teb_ptr = address
            return address
1238790
def iter_locals(self):
        '''
        
        '''
        if self.is_optimized_out():
            return

        f_localsplus = self.field('f_localsplus')
        for i in safe_range(self.co_nlocals):
            pyop_value = PyObjectPtr.from_pyobject_ptr(f_localsplus[i])
            if not pyop_value.is_null():
                pyop_name = PyObjectPtr.from_pyobject_ptr(self.co_varnames[i])
                yield (pyop_name, pyop_value)
130145
def remote(self):
        
        from ambry.exc import NotFoundError

        ds = self.dataset

        if 'remote_name' not in ds.data:
            raise NotFoundError('Could not determine remote for partition: {}'.format(self.identity.fqname))

        return self._bundle.library.remote(ds.data['remote_name'])
881970
@Override
    public RemoteWebElement getElement() {
        /*
         * Note: Rationale behind throwing ParentNotFoundException here.
         * 
         * Container's being a parent type is searched using a locator. When the locator is invalid it will be better to
         * throw ParentNotFoundException to the user so that it clearly indicates its the container.
         */
        List<WebElement> elements = null;
        try {
            if (getParent() != null) {
                elements = getParent().locateChildElements(getLocator());
            } else {
                // Its a case where there is a stand alone container and no parent
                elements = HtmlElementUtils.locateElements(getLocator());
            }
        } catch (NoSuchElementException n) {
            throw new ParentNotFoundException("Could not find any parent with the locator " + getLocator(), n);
        }
        if (index <= elements.size()) {
            return (RemoteWebElement) elements.get(index);
        }
        throw new NoSuchElementException("Cannot find Element With index :{" + index + "} in Container"
                + this.getClass().getSimpleName());
    }
357303
function (e) {
      var pointer = getPointer(e);
      return {
        x: pointer.x - this._offset.left,
        y: pointer.y - this._offset.top
      };
    }
1919
def parent(self):
        
        if TextBlockHelper.get_fold_lvl(self._trigger) > 0 and \
                self._trigger.blockNumber():
            block = self._trigger.previous()
            ref_lvl = self.trigger_level - 1
            while (block.blockNumber() and
                    (not TextBlockHelper.is_fold_trigger(block) or
                     TextBlockHelper.get_fold_lvl(block) > ref_lvl)):
                block = block.previous()
            try:
                return FoldScope(block)
            except ValueError:
                return None
        return None
44038
def remote(self) -> Optional[str]:
        
        if isinstance(self._transport_peername, (list, tuple)):
            return self._transport_peername[0]
        else:
            return self._transport_peername
1086155
def get_peb(self):
        
        self.get_handle( win32.PROCESS_VM_READ |
                         win32.PROCESS_QUERY_INFORMATION )
        return self.read_structure(self.get_peb_address(), win32.PEB)
582508
public Object getRemoteSession()
    {
        Object remoteSession = super.getRemoteSession();
        if (remoteSession == null)
            if (this.getMessageSource() instanceof Record)
        {
            Record record = (Record)this.getMessageSource();
            BaseTable table = record.getTable().getCurrentTable();
            if (DBParams.CLIENT.equals(table.getSourceType()))
                remoteSession = (RemoteSession)table.getRemoteTableType(org.jbundle.model.Remote.class);
            // Only pass the remoteSession if remoteSession is the client part of the remote session!
        }
        return remoteSession;
    }
115947
def get_window_at_mouse(self):
        
        window_ret = ctypes.c_ulong(0)
        _libxdo.xdo_get_window_at_mouse(self._xdo, ctypes.byref(window_ret))
        return window_ret.value
98707
def remote_references(self):
        
        return ReferencesDataFrame(self._engine_dataframe.getRemoteReferences(),
                                   self._session, self._implicits)
386284
def viewport(self) -> Tuple[int, int, int, int]:
        '''
            
        '''

        return self.wnd.viewport
25930
def _iterator_type(self):
        
        if isinstance(self._data, LabelArray):
            return LabelWindow
        return CONCRETE_WINDOW_TYPES[self._data.dtype]
1219067
def remote_eval(self, func, *args, **kwargs):
        
        return eval(self.remote(func, *args, **kwargs))
1226898
@Override
  public int getRemoteAddress(byte []buffer, int offset, int length)
  {
    int len = _remoteAddrLength;

    if (len <= 0) {
      len = _remoteAddrLength = InetAddressUtil.createIpAddress(_remoteAddrBuffer,
                                                                _remoteAddrCharBuffer);
    }

    char []charBuffer = _remoteAddrCharBuffer;

    for (int i = len - 1; i >= 0; i--) {
      buffer[offset + i] = (byte) charBuffer[i];
    }

    return len;
  }
112976
def windowed_iterable(self):
        
        # Seek to offset
        effective_offset = max(0,self.item_view.iterable_index)
        for i,item in enumerate(self.iterable):
            if i<effective_offset:
                continue
            elif i>=(effective_offset+self.item_view.iterable_fetch_size):
                return
            yield item
356751
def window(iterable, n=2, cast=tuple):
    
    it = iter(iterable)
    win = deque((next(it) for _ in repeat(None, n)), maxlen=n)
    if len(win) < n:
        raise ValueError('Window size was greater than iterable length')
    yield cast(win)
    append = win.append
    for e in it:
        append(e)
        yield cast(win)