Callback function to request our desired size.
541253
def size_request(self, widget, requisition):
        
        requisition.width, requisition.height = self.get_desired_size()
        return True
393381
def avail_sizes(call=None):
    '''
    
    '''
    if call == 'action':
        raise SaltCloudException(
            'The avail_locations function must be called with -f or --function.'
        )

    response = _query('avail', 'LinodePlans')

    ret = {}
    for item in response['DATA']:
        name = item['LABEL']
        ret[name] = item

    return ret
1081573
def get_size(self):
        """"""
        self.curses.setupterm()
        return self.curses.tigetnum('cols'), self.curses.tigetnum('lines')
1337057
def calc_log_size(request, calc_id):
    
    try:
        response_data = logs.dbcmd('get_log_size', calc_id)
    except dbapi.NotFound:
        return HttpResponseNotFound()
    return HttpResponse(content=json.dumps(response_data), content_type=JSON)
716972
def resize(self, size):
        
        result = self._client.post('{}/resize'.format(Volume.api_endpoint, model=self,
            data={ "size": size }))

        self._populate(result.json)

        return True
161109
def recv(self, maxsize=None):
        '''
        
        '''
        if maxsize is None:
            maxsize = 1024
        elif maxsize < 1:
            maxsize = 1
        return self._recv(maxsize)
554508
def log_request(self, code='-', size='-'):
        """"""
        print_size = getattr(thread_local, 'size', -1)
        if size != '-':
            size_str = ' (%s)' % size
        elif print_size >= 0:
            size_str = self.log_size_string(print_size) + ' '
        else:
            size_str = ''
        if not self.server.suppress_noise or (code != 200 and code != 304):
            self.log_message(
                '%s"%s" %s', size_str, self.requestline, str(code))
        if print_size >= 0:
            thread_local.size = -1
1206066
def fetch_size(self, v):
        

        if not isinstance(v, six.integer_types):
            raise TypeError
        if v == self._fetch_size:
            return self

        if v < 1:
            raise QueryException("fetch size less than 1 is not allowed")

        clone = copy.deepcopy(self)
        clone._fetch_size = v
        return clone
3415
def qsize(self, qname):
        """"""
        if qname in self._queues:
            return self._queues[qname].qsize()
        else:
            raise ValueError(_("queue %s is not defined"), qname)
1234448
def size(self, value):
        """"""
        if self._size != value and \
           isinstance(value, (int, float, long)):
            self._size = value
1352416
def size(self, value):
        """"""
        self._size   = value
        self._thumb  = self._link_to_img()
672679
def request(self, max_width):
        # type: (int) -> Optional[Tuple[int, Chunk]]
        """"""
        if max_width < 1:
            raise ValueError('requires positive integer max_width')

        s = self.chunk.s
        length = len(s)

        if self.internal_offset == len(s):
            return None

        width = 0
        start_offset = i = self.internal_offset
        replacement_char = u' '

        while True:
            w = wcswidth(s[i])

            # If adding a character puts us over the requested width, return what we've got so far
            if width + w > max_width:
                self.internal_offset = i  # does not include ith character
                self.internal_width += width

                # if not adding it us makes us short, this must have been a double-width character
                if width < max_width:
                    assert width + 1 == max_width, 'unicode character width of more than 2!?!'
                    assert w == 2, 'unicode character of width other than 2?'
                    return (width + 1, Chunk(s[start_offset:self.internal_offset] + replacement_char,
                                             atts=self.chunk.atts))
                return (width, Chunk(s[start_offset:self.internal_offset], atts=self.chunk.atts))
            # otherwise add this width
            width += w

            # If one more char would put us over, return whatever we've got
            if i + 1 == length:
                self.internal_offset = i + 1  # beware the fencepost, i is an index not an offset
                self.internal_width += width
                return (width, Chunk(s[start_offset:self.internal_offset], atts=self.chunk.atts))
            # otherwise attempt to add the next character
            i += 1
650477
def size(self,value):
        '''
        
        '''
        if not self.params:
            self.params = dict(size=value)
            return self
        self.params['size'] = value
        return self
582543
function(val, req, attribute) {
    if (val) {
      req = parseFloat(req);

      var size = this.getSize();

      return size === req;
    }

    return true;
  }
51406
def _enforce_size_limit(self, capacity):
        """"""
        while len(self._cache) > capacity:
            key, value = self._cache.popitem(last=False)
            if self._on_evict is not None:
                self._on_evict(key, value)
182093
function( m, opts ) {
        return function( o, cb ) {
            var r = __request.apply( this, arguments );
            m.trigger( "request", m, r, opts );
            return r;
        }
    }
445514
def size(self, size=None):
        """"""

        if size is None:
            return self._size
        else:
            if not is_numeric(size):
                raise TypeError(
                 "size must be number, not '%s'" % str(size)
                )
            self._size = size