Renders the progress bar.

@param {number} runCount
@param {number} totalRuns
423379
function updateStatus(runCount, totalRuns, stream) {
  if (runCount % 10 !== 0) return;

  const percent = Math.floor((runCount / totalRuns) * 100);
  const blocks = Math.floor(percent / 2);
  const empty = 50 - blocks;
  const value =
    '|'
    + '\u2588'.repeat(blocks)
    + '\u2591'.repeat(empty)
    + '| '
    + percent.toString()
    + '% || '
    + runCount.toString()
    + ' / '
    + totalRuns.toString();

  readline.cursorTo(stream, 0, null);
  stream.write(value);

  if (percent === 100) stream.write('\n\n');
}
358462
public void showProgress(final int id, final int sofar, final int total) {
        final T notification = get(id);

        if (notification == null) {
            return;
        }

        notification.updateStatus(FileDownloadStatus.progress);
        notification.update(sofar, total);
    }
2806
function renderRunningContentFrontMatterLeftField( $args ) {
		unset( $args['label_for'], $args['class'] );
		$this->renderCustomSelect(
			[
				'id' => 'running_content_front_matter_left',
				'name' => 'running_content_front_matter_left',
				'value' => getset( $this->options, 'running_content_front_matter_left' ),
				'choices' => $args,
			]
		);
		$this->renderField(
			[
				'id' => 'running_content_front_matter_left_custom',
				'name' => 'pressbooks_theme_options_' . $this->getSlug(),
				'option' => 'running_content_front_matter_left',
				'value' => getset( $this->options, 'running_content_front_matter_left' ),
				'type' => 'text',
				'class' => 'regular-text code',
			]
		);
	}
1083697
function(container, progress, color) {
		if (typeof container === 'number') {
			color = progress;
			progress = container;
			container = 'body';
		}
		container = $(container || 'body');
		if (container.length === 0) return;
		container = container[0];
		var progressbar;
		if (container.classList.contains(CLASS_PROGRESSBAR)) {
			progressbar = container;
		} else {
			var progressbars = container.querySelectorAll(SELECTOR_PROGRESSBAR + ':not(.' + CLASS_PROGRESSBAR_OUT + ')');
			if (progressbars) {
				for (var i = 0, len = progressbars.length; i < len; i++) {
					var _progressbar = progressbars[i];
					if (_progressbar.parentNode === container) {
						progressbar = _progressbar;
						break;
					}
				}
			}
			if (!progressbar) {
				progressbar = document.createElement('span');
				progressbar.className = CLASS_PROGRESSBAR + ' ' + CLASS_PROGRESSBAR_IN + (typeof progress !== 'undefined' ? '' : (' ' + CLASS_PROGRESSBAR_INFINITE)) + (color ? (' ' + CLASS_PROGRESSBAR + '-' + color) : '');
				if (typeof progress !== 'undefined') {
					progressbar.innerHTML = '<span></span>';
				}
				container.appendChild(progressbar);
			} else {
				progressbar.classList.add(CLASS_PROGRESSBAR_IN);
			}
		}
		if (progress) setProgressbar(container, progress);
		return progressbar;
	}
589628
function NyanCat(runner) {
  Base.call(this, runner);

  var self = this
    , stats = this.stats
    , width = Base.window.width * .75 | 0
    , rainbowColors = this.rainbowColors = self.generateColors()
    , colorIndex = this.colorIndex = 0
    , numerOfLines = this.numberOfLines = 4
    , trajectories = this.trajectories = [[], [], [], []]
    , nyanCatWidth = this.nyanCatWidth = 11
    , trajectoryWidthMax = this.trajectoryWidthMax = (width - nyanCatWidth)
    , scoreboardWidth = this.scoreboardWidth = 5
    , tick = this.tick = 0
    , n = 0;

  runner.on('start', function(){
    Base.cursor.hide();
    self.draw('start');
  });

  runner.on('pending', function(test){
    self.draw('pending');
  });

  runner.on('pass', function(test){
    self.draw('pass');
  });

  runner.on('fail', function(test, err){
    self.draw('fail');
  });

  runner.on('end', function(){
    Base.cursor.show();
    for (var i = 0; i < self.numberOfLines; i++) write('\n');
    self.epilogue();
  });
}
585115
function reportTotalIssueCount ()
{
    var outputColor = gulpUtil.colors.green;
    if (totalIssues > 0)
    {
        outputColor = gulpUtil.colors.red;
    }

    gulpUtil.log(gulpUtil.colors.yellow('»»'), 'Total JS issues:', outputColor(totalIssues));

    // Reset the issue count so we don't increment it every time a file has been modified while it is being watched
    totalIssues = 0;
}
38147
def progress(self, loaded, total, msg=''):
        

        self.fire('progress', {
            'loaded': loaded,
            'total': total,
            'msg': msg
        })
90570
public function render_progress_bar(progress_bar $bar) {
        global $PAGE;
        $data = $bar->export_for_template($this);
        return $this->render_from_template('core/progress_bar', $data);
    }
885716
function after (count, callback, context) {
  var runCount = 0
  var rests = []
  context = context || this
  return function () {
    runCount++
    if (runCount <= count) {
      rests.push(arguments[0])
    }
    if (runCount >= count) {
      callback.apply(context, [rests].concat(arraySlice(arguments)))
    }
  }
}
462529
public void tally(RunnerStatistics other) {
        rightCount += other.rightCount();
        wrongCount += other.wrongCount();
        skippedCount += other.skippedCount();
        totalCount += other.totalCount();
    }
427979
def progress(count, total, suffix=''):
    '''
    
    '''
    bar_len = 60
    filled_len = int(round(bar_len * count / float(total)))
    percents = round(100.0 * count / float(total), 1)
    bar = '=' * filled_len + '-' * (bar_len - filled_len)
    sys.stdout.write('[%s] %s%s %s\r' % (bar, percents, '%', suffix))
    sys.stdout.flush()
942107
def render(self, total=False, transpose=False, style=False):
        
        self.chart.setup()
        ln = self.chart._len
        html = HTML()
        attrs = {}

        if style:
            attrs['id'] = 'table-%s' % uuid.uuid4()

        table = []

        _ = lambda x: x if x is not None else ''

        if self.chart.x_labels:
            labels = [None] + list(self.chart.x_labels)
            if len(labels) < ln:
                labels += [None] * (ln + 1 - len(labels))
            if len(labels) > ln + 1:
                labels = labels[:ln + 1]
            table.append(labels)

        if total:
            if len(table):
                table[0].append('Total')
            else:
                table.append([None] * (ln + 1) + ['Total'])
            acc = [0] * (ln + 1)

        for i, serie in enumerate(self.chart.all_series):
            row = [serie.title]
            if total:
                sum_ = 0
            for j, value in enumerate(serie.values):
                if total:
                    v = value or 0
                    acc[j] += v
                    sum_ += v
                row.append(self.chart._format(serie, j))
            if total:
                acc[-1] += sum_
                row.append(self.chart._serie_format(serie, sum_))
            table.append(row)

        width = ln + 1
        if total:
            width += 1
            table.append(['Total'])
            for val in acc:
                table[-1].append(self.chart._serie_format(serie, val))

        # Align values
        len_ = max([len(r) for r in table] or [0])

        for i, row in enumerate(table[:]):
            len_ = len(row)
            if len_ < width:
                table[i] = row + [None] * (width - len_)

        if not transpose:
            table = list(zip(*table))

        thead = []
        tbody = []
        tfoot = []

        if not transpose or self.chart.x_labels:
            # There's always series title but not always x_labels
            thead = [table[0]]
            tbody = table[1:]
        else:
            tbody = table

        if total:
            tfoot = [tbody[-1]]
            tbody = tbody[:-1]

        parts = []
        if thead:
            parts.append(
                html.thead(
                    *[html.tr(*[html.th(_(col)) for col in r]) for r in thead]
                )
            )
        if tbody:
            parts.append(
                html.tbody(
                    *[html.tr(*[html.td(_(col)) for col in r]) for r in tbody]
                )
            )
        if tfoot:
            parts.append(
                html.tfoot(
                    *[html.tr(*[html.th(_(col)) for col in r]) for r in tfoot]
                )
            )

        table = tostring(html.table(*parts, **attrs))
        if style:
            if style is True:
                css = '''
                #{{ id }} {
                    border-collapse: collapse;
                    border-spacing: 0;
                    empty-cells: show;
                    border: 1px solid #cbcbcb;
                }
                #{{ id }} td, #{{ id }} th {
                    border-left: 1px solid #cbcbcb;
                    border-width: 0 0 0 1px;
                    margin: 0;
                    padding: 0.5em 1em;
                }
                #{{ id }} td:first-child, #{{ id }} th:first-child {
                    border-left-width: 0;
                }
                #{{ id }} thead, #{{ id }} tfoot {
                    color: #000;
                    text-align: left;
                    vertical-align: bottom;
                }
                #{{ id }} thead {
                    background: #e0e0e0;
                }
                #{{ id }} tfoot {
                    background: #ededed;
                }
                #{{ id }} tr:nth-child(2n-1) td {
                    background-color: #f2f2f2;
                }
                '''
            else:
                css = style
            table = tostring(
                html.style(template(css, **attrs), scoped='scoped')
            ) + table
        table = table.decode('utf-8')
        self.chart.teardown()
        return table
231984
function createCountUp() {
    establishOptionsFromInputs();
    demo = new CountUp('myTargetElement', endVal, options);
    if (!demo.error) {
      errorSection.style.display = 'none';
      if (input('useOnComplete').checked) {
        demo.start(methodToCallOnComplete);
      }
      else {
        demo.start();
      }
      updateCodeVisualizer();
    }
    else {
      errorSection.style.display = 'block';
      document.getElementById('error').innerHTML = demo.error;
      console.error(demo.error);
    }
  }
744282
def render_total_entries
      if self.show_total_entries
        total_entries = @collection.total_entries rescue @collection.size
        header_total_cells = @header_line ? @header_line.total_cells : 0
        max_cells = (@lines.first.total_cells > header_total_cells) ? @lines.first.total_cells : header_total_cells
        return Tools::html_safe(content_tag(:tr, content_tag(:td, I18n.t(:total_entries, :value => total_entries), {:colspan => max_cells}), { :class => 'total-entries' }))
      end
      ''
    end
1075837
private void displayResultCount(int displayed, int total) {

        String message = Messages.get().key(
            Messages.GUI_LABEL_NUM_RESULTS_2,
            new Integer(displayed),
            new Integer(total));
        m_infoLabel.setText(message);
    }
1193945
def notify_progress(self):
        '''  '''
        _total = 0
        for _session in self._sessions.values():
            _total += _session.bytes_transferred

        if AsperaSession.PROGRESS_MSGS_SEND_ALL:
            self._run_progress_callbacks(_total)
        else:
            # dont call progress callback unless total has changed
            if self._total_bytes_transferred != _total:
                self._total_bytes_transferred = _total
                self._run_progress_callbacks(_total)
1079734
private void renderTotalsRow() {
        docBuilder.append("12+^|*"+ i18n.getMessage("summary.total")+"*", newLine()).
            append(tableCol(), scenarioTotalizationsCache.getTotalPassedScenarios(), tableCol(), scenarioTotalizationsCache.getTotalFailedScenarios()).
                append(tableCol(), scenarioTotalizationsCache.getTotalScenarios()).
                append(tableCol(), scenarioTotalizationsCache.getTotalPassedSteps(), tableCol(), scenarioTotalizationsCache.getTotalFailedSteps()).
                append(tableCol(), scenarioTotalizationsCache.getTotalSkippedSteps(), tableCol(), scenarioTotalizationsCache.getTotalPendingSteps()).
                append(tableCol(), scenarioTotalizationsCache.getTotalUndefinedSteps(), tableCol(), scenarioTotalizationsCache.getTotalMissingSteps()).
            append(tableCol(), scenarioTotalizationsCache.getTotalSteps(), " 2+", tableCol(), Formatter.formatTime(scenarioTotalizationsCache.getTotalDuration()));
        docBuilder.newLine();
    }