Creates the progress bar element
184470
function () {
			if (this.settings.parentElement === false)
				return this.createErrorMessage("No parent element set!");
			// This is the container in
			// which the bar resides
			this.progressBar = $("<progress>").attr({
				"id": "progress-bar",
				"value": 0,
				"max": 100
			}).appendTo(this.settings.parentElement);
			this.progressLabel = $("<div>").attr({
				"class": "progress-bar-label"
			}).html("0%").appendTo(this.settings.parentElement);
			var div = $("<div>").html(this.settings.name).appendTo(this.settings.parentElement);
		}
578515
def update(self, progress=0):
        
        self.progress += (progress or 1)
        if self.visible:
            if self.progress % self._mod == 1 or\
               self.progress == self.size - 1:
                print(self.format_bar(), end="\r")
            if self.progress == (self.size):
                self.finish()
576318
public function update_progress() {
        // If finished...
        if (!$this->is_in_progress_section()) {
            if ($this->bar) {
                $this->end_html();
            }
        } else {
            if (!$this->bar) {
                $this->start_html();
            }
            // In case of indeterminate or small progress, update the wibbler
            // (up to once per second).
            if (time() != $this->lastwibble) {
                $this->lastwibble = time();
                echo \html_writer::div('', 'wibble state' . $this->currentstate);

                // Go on to next colour.
                $this->currentstate += $this->direction;
                if ($this->currentstate < 0 || $this->currentstate >= self::WIBBLE_STATES) {
                    $this->direction = -$this->direction;
                    $this->currentstate += 2 * $this->direction;
                }
                $buffersize = ini_get('output_buffering');
                if (!is_numeric($buffersize)) {
                    // The output_buffering setting can be a number, but can also be "On" or "Off".
                    // If "Off", there's no buffer, if "On", there's no limit to the size. In either case,
                    // there's no point in trying to fill the buffer.
                    $buffersize = 0;
                }
                if ($buffersize) {
                    // Force the buffer full.
                    echo str_pad('', $buffersize);
                }
            }

            // Get progress.
            list ($min, $max) = $this->get_progress_proportion_range();

            // Update progress bar.
            $message = '';
            if ($this->displaynames) {
                $message = $this->get_current_description();
            }
            $this->bar->update_full($min * 100, $message);

            // Flush output.
            flush();
        }
    }
954434
def progress_iter(progress):
    '''
    
    '''
    widgets = [progressbar.Percentage(), ' ', progressbar.Bar(), ' ', progressbar.Timer(), ' Returns: [', progressbar.Counter(), '/{0}]'.format(progress['minion_count'])]
    bar = progressbar.ProgressBar(widgets=widgets, maxval=progress['minion_count'])
    bar.start()
    return bar
558601
public static function progressBar($width = 0, $htmlOptions = array())
    {
        self::addCssClass('progress', $htmlOptions);
        $color = TbArray::popValue('color', $htmlOptions);
        if (!empty($color)) {
            self::addCssClass('progress-' . $color, $htmlOptions);
        }
        if (TbArray::popValue('striped', $htmlOptions, false)) {
            self::addCssClass('progress-striped', $htmlOptions);
        }
        if (TbArray::popValue('animated', $htmlOptions, false)) {
            self::addCssClass('active', $htmlOptions);
        }
        $barOptions = TbArray::popValue('barOptions', $htmlOptions, array());
        $content = TbArray::popValue('content', $htmlOptions);
        if (!empty($content)) {
            $barOptions['content'] = $content;
        }
        $content = self::bar($width, $barOptions);
        return self::tag('div', $htmlOptions, $content);
    }
486268
function createBar(options) {
    let helper = new helper_1.Helper(options.stream);
    let index = 0;
    return function (percentage, msg, moduleProgress, activeModules, moduleName) {
        if (percentage === 0)
            helper.begin();
        else if (percentage === 1)
            helper.end();
        helper.beginWrite();
        if (percentage != 1) {
            helper.write('\n');
            helper.write(createSpinnerStr(index) + ' ' + createBarStr(percentage));
            index++;
        }
        helper.endWrite();
    };
}
579474
def _draw_progressbar(self, columns=None, len_prefix=0, right_margin=0):
    
    if self._order == None:
      total = len(self._results)
    else:
      total = max(len(self._order), len(self._results))

    percent = int(round(len(self._results)/total*100)) if total else 0

    needs_break = lambda count: columns and count > columns \
                                and (count % (columns - right_margin))

    # together with unicode_literals `str('status')` seems the best
    # py2 and py3 compatible solution
    status = type(str('status'), (object,), dict(count=0,progressbar=[]))
    def _append(status, item, length=1, separator=''):
      # * assuming a standard item will take one column in the tty
      # * length must not be bigger than columns (=very narrow columns)
      progressbar = status.progressbar
      if needs_break(status.count + length + len(separator)):
        progressbar.append('\n')
        status.count = 0
      else:
        progressbar.append(separator)
      status.count += length + len(separator)
      progressbar.append(item)
    append=partial(_append, status)
    progressbar = status.progressbar

    append('', len_prefix)
    append('[')
    for item in self._progressbar:
      append(item)
    append(']')
    percentstring = f'{percent:3d}%'
    append(percentstring, len(percentstring), ' ')
    return ''.join(progressbar)
36652
protected function prepareOptionProgressBar()
    {
        if (!empty($this->progressBar) && is_string($this->progressBar)) {
            return strtr($this->progressBar, ['{LOADING}' => Yii::t($this->translateCategory, 'Loading')]);
        }
        return !empty($this->bootstrapDefaults['progressBar']) ? strtr($this->bootstrapDefaults['progressBar'], ['{LOADING}' => Yii::t($this->translateCategory, 'Loading')]) : '';
    }
901052
function (e) {
			var $progress = $('.progress:first', this.$el),
					complete;

			if (e.lengthComputable) {
				complete = e.loaded / e.total * 100;
				complete = complete ? complete : 0;
				$progress.attr('value', complete);
				$progress.html(complete);
			}
		}
1230322
def _finish_progress(self):
        

        if self._show_progressbar:
            if self._progressbar is None:
                self._initialize_progressbar()
            if self._progressbar is not None:
                self._progressbar.finish()

        if self._progress_callback is not None:
            self._progress_callback(100.0)
327174
def create_widget(self):
        
        d = self.declaration

        if self.indeterminate:
            #: Note: Style will only exist on activity indicators!
            style = ProgressBar.STYLES[d.size]
        else:
            style = ProgressBar.STYLE_HORIZONTAL
        self.widget = ProgressBar(self.get_context(), None, style)
830087
def _progress_bar(self, width, percent, left="", right="", fill="|"):
        
        text = left + (width - len(left) - len(right)) * " " + right
        cutoff = int(round(percent * width))
        text = text[:cutoff].replace(" ", fill) + text[cutoff:]
        low_cutoff = int(round(0.7 * width))
        med_cutoff = int(round(0.9 * width))
        if percent < 0.7:
            yield 2, text[:cutoff]
            yield 0, text[cutoff:]
        elif percent < 0.9:
            yield 2, text[:low_cutoff]
            yield 3, text[low_cutoff:cutoff]
            yield 0, text[cutoff:]
        else:
            yield 2, text[:low_cutoff]
            yield 3, text[low_cutoff:med_cutoff]
            yield 4, text[med_cutoff:cutoff]
            yield 0, text[cutoff:]
996633
async function progressBar(plugin, context, { skip } = { skip : false }) {
  const cols = [];
  const index = await plugin.currentSlideIndex();
  cols.push(`${skip ? 'Skipping' : 'Printing'} slide `);
  cols.push(`#${index}`.padEnd(8));
  cols.push(' (');
  cols.push(`${context.currentSlide}`.padStart(context.totalSlides ? context.totalSlides.toString().length : 3));
  cols.push('/');
  cols.push(context.totalSlides || ' ?');
  cols.push(') ...');
  // erase overflowing slide fragments
  cols.push(' '.repeat(Math.max(context.progressBarOverflow - Math.max(index.length + 1 - 8, 0), 0)));
  context.progressBarOverflow = Math.max(index.length + 1 - 8, 0);
  return cols.join('');
}
185498
function(container, progress, speed) {
		if (typeof container === 'number') {
			speed = progress;
			progress = container;
			container = false;
		}
		var progressbar = _findProgressbar(container);
		if (!progressbar || progressbar.classList.contains(CLASS_PROGRESSBAR_INFINITE)) {
			return;
		}
		if (progress) progress = Math.min(Math.max(progress, 0), 100);
		progressbar.offsetHeight;
		var span = progressbar.querySelector('span');
		if (span) {
			var style = span.style;
			style.webkitTransform = 'translate3d(' + (-100 + progress) + '%,0,0)';
			if (typeof speed !== 'undefined') {
				style.webkitTransitionDuration = speed + 'ms';
			} else {
				style.webkitTransitionDuration = '';
			}
		}
		return progressbar;
	}
984226
public function progressBarCommand(): void
    {
        $i     = 0;
        $total = 120;
        $bar   = new ProgressBar();
        $bar->start(120);

        while ($i <= $total) {
            $bar->advance();
            usleep(50000);
            $i++;
        }

        $bar->finish();
    }
434539
private void addEmptyProgressBar(){
        int whereIsEmpty = -1;
        for (int i = 0; i < getChildCount(); i++) {
            if (retrieveChild(i) != null && retrieveChild(i).equals(emptyProgressBar)) {
                whereIsEmpty = i;
            }
        }

        if (whereIsEmpty != getChildCount() - 1) {
            if (whereIsEmpty != -1) {
                //the flowing true/false is to stop empty progressbar being added more than once as removeView and addView indirectly call this method
                isEmptyBeingAdded = true;
                removeView(emptyProgressBar);
                isEmptyBeingAdded = false;
            }
            if (!isEmptyBeingAdded) {
                addView(emptyProgressBar);
            }
        }
    }
1355370
private void updateProgressButton(ProgressButton progressButton, SeekBar progressSeekBar) {
    progressButton.setProgress(progressSeekBar.getProgress());
    updatePinProgressContentDescription(progressButton);
  }