Changes the value of max_tab_name_length in dconf
493397
def on_max_tab_name_length_changed(self, spin):
        
        val = int(spin.get_value())
        self.settings.general.set_int('max-tab-name-length', val)
        self.prefDlg.update_vte_subwidgets_states()
1071531
function _fnFeatureHtmlLength ( settings )
	{
		var
			classes  = settings.oClasses,
			tableId  = settings.sTableId,
			menu     = settings.aLengthMenu,
			d2       = $.isArray( menu[0] ),
			lengths  = d2 ? menu[0] : menu,
			language = d2 ? menu[1] : menu;
	
		var select = $('<select/>', {
			'name':          tableId+'_length',
			'aria-controls': tableId,
			'class':         classes.sLengthSelect
		} );
	
		for ( var i=0, ien=lengths.length ; i<ien ; i++ ) {
			select[0][ i ] = new Option( language[i], lengths[i] );
		}
	
		var div = $('<div><label/></div>').addClass( classes.sLength );
		if ( ! settings.aanFeatures.l ) {
			div[0].id = tableId+'_length';
		}
	
		// This split doesn't matter where _MENU_ is, we get three items back from it
		var a = settings.oLanguage.sLengthMenu.split(/(_MENU_)/);
		div.children()
			.append( a[0] )
			.append( select )
			.append( a[2] );
	
		select
			.val( settings._iDisplayLength )
			.bind( 'change.DT', function(e) {
				_fnLengthChange( settings, $(this).val() );
				_fnDraw( settings );
			} );
	
		// Update node value whenever anything changes the table's length
		$(settings.nTable).bind( 'length', function (e, s, len) {
			select.val( len );
		} );
	
		return div[0];
	}
441409
private int addAlgorithmName(int maxlength)
    {
        int result = 0;
        for (int i = m_algorithm_.length - 1; i >= 0; i --) {
            result = m_algorithm_[i].add(m_nameSet_, maxlength);
            if (result > maxlength) {
                maxlength = result;
            }
        }
        return maxlength;
    }
93771
def _longest_contig(self, contig_set, contig_lengths):
        ''''''
        longest_name = None
        max_length = -1
        for name in contig_set:
            if contig_lengths[name] > max_length:
                longest_name = name
                max_length = contig_lengths[name]
        assert max_length != -1
        assert longest_name is not None
        return longest_name
785654
def alt_tab(self, n=1, pre_dl=None, post_dl=None):
        
        self.delay(pre_dl)
        self.k.press_key(self.k.alt_key)
        self.k.tap_key(self.k.tab_key, n=n, interval=0.1)
        self.k.release_key(self.k.alt_key)
        self.delay(post_dl)
739638
function UINT(max_len) {
        if (typeof max_len === "undefined") { max_len = Number.MAX_VALUE; }
        return _make_alias('UINT', paka.P.UINT, CONCAT(REPEAT(DIGIT(), 1, max_len)));
    }
668227
def smart_truncate(value, max_length=0, word_boundaries=False, separator=' '):
    

    value = value.strip(separator)

    if not max_length:
        return value

    if len(value) < max_length:
        return value

    if not word_boundaries:
        return value[:max_length].strip(separator)

    if separator not in value:
        return value[:max_length]

    truncated = ''
    for word in value.split(separator):
        if word:
            next_len = len(truncated) + len(word) + len(separator)
            if next_len <= max_length:
                truncated += '{0}{1}'.format(word, separator)
    if not truncated:
        truncated = value[:max_length]
    return truncated.strip(separator)
554143
def _get_fname_len(self, bufflen=128):
        """"""
        buff = self.meta.peek(bufflen)
        strlen = buff.find('\0')
        for i, b in enumerate(buff[strlen:]):
            if b != '\0':
                return strlen+i
        return bufflen
701554
public void setMaxLength(int length) {
		maxCharacter = length;
		if (value.length() > maxCharacter) {
			value = value.substring(0, maxCharacter);
		}
	}
1196958
def _filter_max_length(example, max_length=256):
  """"""
  return tf.logical_and(tf.size(example[0]) <= max_length,
                        tf.size(example[1]) <= max_length)
285241
def com_google_fonts_check_name_description_max_length(ttFont):
  """"""
  failed = False
  for name in ttFont['name'].names:
    if (name.nameID == NameID.DESCRIPTION and
        len(name.string.decode(name.getEncoding())) > 200):
      failed = True
      break

  if failed:
    yield WARN, ("A few name table entries with ID={} (NameID.DESCRIPTION)"
                 " are longer than 200 characters."
                 " Please check whether those entries are copyright notices"
                 " mistakenly stored in the description string entries by"
                 " a bug in an old FontLab version."
                 " If that's the case, then such copyright notices must be"
                 " removed from these entries."
                 "").format(NameID.DESCRIPTION)
  else:
    yield PASS, "All description name records have reasonably small lengths."
290664
def adjustSizeConstraint(self):
        
        widget = self.currentWidget()
        if not widget:
            return
            
        offw = 4
        offh = 4
        
        #if self.tabBar().isVisible():
        #    offh += 20 # tab bar height
        
        minw = min(widget.minimumWidth() + offw,   MAX_INT)
        minh = min(widget.minimumHeight() + offh,  MAX_INT)
        maxw = min(widget.maximumWidth() + offw,   MAX_INT)
        maxh = min(widget.maximumHeight() + offh,  MAX_INT)
        
        self.setMinimumSize(minw, minh)
        self.setMaximumSize(maxw, maxh)
        self.setSizePolicy(widget.sizePolicy())
1070060
def _updateTabStopWidth(self):
        
        self.setTabStopWidth(self.fontMetrics().width(' ' * self._indenter.width))
70728
function expandTabs(content, tabWidth) {
    var idx = 0;

    // while we're not at the end of the string:
    // - is the character at the current position a tab?
    // - yes, replace with spaces and move the current position forward
    // - no, jump to the character after the next newline
    while (idx > -1 && idx < content.length) {
      while (content[idx] === '\t') {
        content = content.substring(0, idx) + repeat(' ', tabWidth) + content.substring(idx+1);
        idx += tabWidth;
      }
      idx = content.indexOf('\n', idx);

      // if there are no `\n` characters, break
      if (idx === -1) { break; }

      idx += 1;
    }

    return content;
  }
362615
def limit_value_string_length(value):
    
    if isinstance(value, string_types) and len(value) > constants.MAX_VALUE_LABEL_TEXT_LENGTH:
        value = value[:constants.MAX_VALUE_LABEL_TEXT_LENGTH] + "..."
        final_string = " " + value + " "
    elif isinstance(value, (dict, list)) and len(str(value)) > constants.MAX_VALUE_LABEL_TEXT_LENGTH:
        value_text = str(value)[:constants.MAX_VALUE_LABEL_TEXT_LENGTH] + "..."
        final_string = " " + value_text + " "
    else:
        final_string = " " + str(value) + " "

    return final_string
811675
def adjust_for_length(self, key, r, kwargs):
        
        length = len(str(kwargs))
        if length > settings.defaults["max_detail_length"]:
            self._log_length_error(key, length)
            r["max_detail_length_error"] = length
            return r
        return kwargs
1164294
def _shrink(self):
        
        cursize = self._current_size
        while cursize > self._maxsize:
            name, value = self.dynamic_entries.pop()
            cursize -= table_entry_size(name, value)
        self._current_size = cursize