Récupérer un nombre de tabs
@param {Number} count
354848
function getTabs(count) {
            var tabs = [];

            for (var i = 0; i < count; i++) {
                tabs.push("    ");
            }

            return tabs.join('');
        }
1070603
function countNumMatches(contents, queryExpr) {
    if (!contents) {
        return 0;
    }
    var matches = contents.match(queryExpr);
    return matches ? matches.length : 0;
}
168083
public String peek(int count)
	{
		return str.substring(cursor, cursor+Math.min(count, str.length()-cursor));
	}
1359700
public static function repeat($str, $count, $line = ',') {
		return substr(str_repeat($str.$line, $count), 0, - strlen($line));
	}
181466
function callnTimes (object, methodName, count) {
    let returnValue
    while (count--) returnValue = object[methodName]()
    return returnValue
  }
417056
function(count) {
    columnHeights = [];
    for(var i = 0; i < count; i++) {
      columnHeights.push(0);
    }
    cellsContainer.style.width = (count * (COLUMN_WIDTH + GAP_WIDTH) - GAP_WIDTH) + 'px';
  }
1290060
function( count ) {
		var test = this.test,
			popped = false,
			acceptCallCount = count;

		if ( typeof acceptCallCount === "undefined" ) {
			acceptCallCount = 1;
		}

		test.semaphore += 1;
		test.usedAsync = true;
		pauseProcessing();

		return function done() {

			if ( popped ) {
				test.pushFailure( "Too many calls to the `assert.async` callback",
					sourceFromStacktrace( 2 ) );
				return;
			}
			acceptCallCount -= 1;
			if ( acceptCallCount > 0 ) {
				return;
			}

			test.semaphore -= 1;
			popped = true;
			resumeProcessing();
		};
	}
529735
private static function getNumPages(int $limit, int $count): int
    {
        return (int) ceil($count / $limit);
    }
1172506
def _replace_tabs(s, ts=8):
    
    result = ''
    for c in s:
        if c == '\t':
            while True:
                result += ' '
                if len(result) % ts == 0:
                    break
        else:
            result += c
    return result
377296
public static String formatNumber(Number count) {
		Format numberFormatter = getNumberFormatter(DEFAULT_NUMBER_FORMAT);
		return numberFormatter.format(count);
	}
498376
def delete(self, count=1):
        
        if self.cursor_position < len(self.text):
            deleted = self.document.text_after_cursor[:count]
            self.text = self.text[:self.cursor_position] + \
                self.text[self.cursor_position + len(deleted):]
            return deleted
        else:
            return ''
163872
function handleTabCounts(str, freezeTabs) {
  var result;
  if (_.isArray(str)) {
    this._tabCtr += 1;
    if (this._tabCtr > 1) {
      result = str.length === 0 ? undefined : str;
    }
  } else {
    this._tabCtr = freezeTabs === true ? this._tabCtr + 1 : 0;
    result = str;
  }
  return result;
}
1306133
def query_field_count(limit_num, kind='1'):
        '''
        
        '''
        return TabTag.select().where(
            TabTag.kind == kind
        ).order_by(
            TabTag.count.desc()
        ).limit(limit_num)
1283920
function replaceCharacter(search, replace, subject, count) {
  var i = 0, j = 0, temp = '', repl = '', sl = 0,
    fl = 0, f = [].concat(search), r = [].concat(replace),
    s = subject, ra = Object.prototype.toString.call(r) === '[object Array]',
    sa = Object.prototype.toString.call(s) === '[object Array]', s = [].concat(s);
  
  if(typeof(search) === 'object' && typeof(replace) === 'string' ) {
    temp = replace; 
    replace = new Array();
    for (i=0; i < search.length; i+=1) { 
      replace[i] = temp; 
    }
    temp = ''; 
    r = [].concat(replace); 
    ra = Object.prototype.toString.call(r) === '[object Array]';
  }
  
  if (count) {
    this.window[count] = 0;
  }

  for (i = 0, sl = s.length; i < sl; i++) {
    if (s[i] === '') {
      continue;
    }
    for (j = 0, fl = f.length; j < fl; j++) {
      temp = s[i] + '';
      repl = ra ? (r[j] !== undefined ? r[j] : '') : r[0];
      s[i] = (temp)
        .split(f[j])
        .join(repl);
      if (count) {
        this.window[count] += ((temp.split(f[j])).length - 1);
      } 
    }
  }
  return sa ? s : s[0];
}
706459
function(tab) {
            var tabCount = this.get('tabs').length,
                index = this.getTabIndex(tab);

            if ( tab === this.get(ACTIVE_TAB) ) { 
                if (tabCount > 1) { // select another tab
                    if (index + 1 === tabCount) { // if last, activate previous
                        this.set(ACTIVE_INDEX, index - 1);
                    } else { // activate next tab
                        this.set(ACTIVE_INDEX, index + 1);
                    }
                } else { // no more tabs
                    this.set(ACTIVE_TAB, null);
                }
            }
            
            this._removeTabEvents(tab);
            this._tabParent.removeChild( tab.get(ELEMENT) );
            this._contentParent.removeChild( tab.get(CONTENT_EL) );
            this._configs.tabs.value.splice(index, 1);

            tab.fireEvent('remove', { type: 'remove', tabview: this });
        }
417526
function (domElt, count) {
            if (count == null) {
                count = 1;
            }
            while (domElt && count > 0) {
                domElt = domElt.previousSibling;
                if (domElt && domElt.nodeType == 1) {
                    count--;
                }
            }
            return domElt;
        }
1102195
function(count, includeWeekends) {
    initialize();

    count = count || 3;
    includeWeekends = includeWeekends || false;

    var self = this;
    var holidays = [];

    if (count > self.MAX_HOLIDAYS) {
      throw Error('Cannot request more than {MAX_HOLIDAYS} holidays at once.'.replace('{MAX HOLIDAYS}', self.MAX_HOLIDAYS));
    }

    /**
     * Collects holidays.
     */
    function collectHolidays() {
      if (typeof self.year.holidays[self.m] !== 'undefined' && typeof self.year.holidays[self.m] !== 'undefined') {
        self.year.holidays[self.m].forEach(function(holiday) {
          if (holidays.length < count && holiday.day >= self.d) {
            holidays.push(holiday);
          }
        });
      }
    }

    while (holidays.length < count) {
      if (!includeWeekends) {
        self.year.discardWeekends();
      }

      collectHolidays();

      if (holidays.length < count) {
        nextMonth();
      }
    }

    return holidays;
  }