Add a new Progress to the tracker.

@param p Progress
506317
public synchronized void addProgress(Progress p) {
    // Don't add more than once.
    Iterator<WeakReference<Progress>> iter = progresses.iterator();
    while(iter.hasNext()) {
      WeakReference<Progress> ref = iter.next();
      // since we are at it anyway, remove old links.
      if(ref.get() == null) {
        iter.remove();
      }
      else {
        if(ref.get() == p) {
          return;
        }
      }
    }
    progresses.add(new WeakReference<>(p));
  }
646327
public void registerSource(ProgressSource pi) {

        synchronized(progressSourceList)    {
            if (progressSourceList.contains(pi))
                return;

            progressSourceList.add(pi);
        }

        // Notify only if there is at least one listener
        if (progressListenerList.size() > 0)
        {
            // Notify progress listener if there is progress change
            ArrayList<ProgressListener> listeners = new ArrayList<ProgressListener>();

            // Copy progress listeners to another list to avoid holding locks
            synchronized(progressListenerList) {
                for (Iterator<ProgressListener> iter = progressListenerList.iterator(); iter.hasNext();) {
                    listeners.add(iter.next());
                }
            }

            // Fire event on each progress listener
            for (Iterator<ProgressListener> iter = listeners.iterator(); iter.hasNext();) {
                ProgressListener pl = iter.next();
                ProgressEvent pe = new ProgressEvent(pi, pi.getURL(), pi.getMethod(), pi.getContentType(), pi.getState(), pi.getProgress(), pi.getExpected());
                pl.progressStart(pe);
            }
        }
    }
1039179
public void setInstantProgress(float progress) {
    if (isSpinning) {
      mProgress = 0.0f;
      isSpinning = false;
    }

    if (progress > 1.0f) {
      progress -= 1.0f;
    } else if (progress < 0) {
      progress = 0;
    }

    if (progress == mTargetProgress) {
      return;
    }

    mTargetProgress = Math.min(progress * 360.0f, 360.0f);
    mProgress = mTargetProgress;
    lastTimeAnimated = SystemClock.uptimeMillis();
    invalidate();
  }
917779
private void updateTaskProgress() {
        m_taskRecord.setProperty(TaskRecord.PROP_EXECUTOR, m_hostID);
        m_taskRecord.setProperty(TaskRecord.PROP_PROGRESS, m_progressMessage);
        m_taskRecord.setProperty(TaskRecord.PROP_PROGRESS_TIME, Long.toString(m_lastProgressTimestamp));
        TaskManagerService.instance().updateTaskStatus(m_tenant, m_taskRecord, false);
    }
1075068
public void setProgressAnimated(double progress) {
        Timeline timeline = new Timeline();

        KeyValue keyValue = new KeyValue(this.progressProperty(), progress);
        KeyFrame keyFrame = new KeyFrame(new Duration(400), keyValue);
        timeline.getKeyFrames().add(keyFrame);

        timeline.play();
    }
1170294
public void updateProgress(final Table table, final int currentRow) {
        final TableProgressInformationPanel tableProgressInformationPanel = getTableProgressInformationPanel(table, -1);
        final boolean greater = tableProgressInformationPanel.setProgress(currentRow);

        if (!greater) {
            // this may happen because of the multithreaded nature of the
            // execution - sometimes a notification can come in later than
            // previous notifications
            return;
        }

        ProgressCounter counter = _progressTimingCounters.get(table);
        if (counter == null) {
            counter = new ProgressCounter();
            final ProgressCounter previous = _progressTimingCounters.put(table, counter);
            if (previous != null) {
                counter = previous;
            }
        }

        final boolean log;
        final int previousCount = counter.get();
        if (currentRow - previousCount > 1000) {
            log = counter.setIfSignificantToUser(currentRow);
        } else {
            log = false;
        }
        if (log) {
            addUserLog("Progress of " + table.getName() + ": " + formatNumber(currentRow) + " rows processed");
        }
    }
754238
protected void publishProgress(final Progress progress) {
        if (!isCanceled()) {
            sUiHandler.post(new Runnable() {
                @Override
                public void run() {
                    onProgressUpdate(progress);
                }
            });
        }
    }
1008985
public ProgressBarField<T> addProgressBarField(int viewResId,
                                                   IntegerExtractor<T> progressExtractor,
                                                   IntegerExtractor<T> maxProgressExtractor) {

        ProgressBarField<T> field =
                new ProgressBarField<T>(viewResId, progressExtractor, maxProgressExtractor);

        mProgressBarFields.add(field);

        return field;
    }
4935
protected final void broadcastProgress(final long uploadedBytes, final long totalBytes) {

        long currentTime = System.currentTimeMillis();
        if (uploadedBytes < totalBytes && currentTime < lastProgressNotificationTime + UploadService.PROGRESS_REPORT_INTERVAL) {
            return;
        }

        setLastProgressNotificationTime(currentTime);

        Logger.debug(LOG_TAG, "Broadcasting upload progress for " + params.id
                + ": " + uploadedBytes + " bytes of " + totalBytes);

        final UploadInfo uploadInfo = new UploadInfo(params.id, startTime, uploadedBytes,
                totalBytes, (attempts - 1),
                successfullyUploadedFiles,
                pathStringListFrom(params.files));

        BroadcastData data = new BroadcastData()
                .setStatus(BroadcastData.Status.IN_PROGRESS)
                .setUploadInfo(uploadInfo);

        final UploadStatusDelegate delegate = UploadService.getUploadStatusDelegate(params.id);
        if (delegate != null) {
            mainThreadHandler.post(new Runnable() {
                @Override
                public void run() {
                    delegate.onProgress(service, uploadInfo);
                }
            });
        } else {
            service.sendBroadcast(data.getIntent());
        }

        updateNotificationProgress(uploadInfo);
    }
365085
public void addProgressChangeListener(@NonNull MapboxNavigation navigation) {
    initializeWayName(mapboxMap, mapPaddingAdjustor);
    initializeFpsDelegate(mapView);
    mapRoute.addProgressChangeListener(navigation);
    mapCamera.addProgressChangeListener(navigation);
    mapWayName.addProgressChangeListener(navigation);
    mapFpsDelegate.addProgressChangeListener(navigation);
  }
1207167
private void addNewTracks() {
		tracker.spawnTracks();
		List<PointTrack> spawned = tracker.getNewTracks(null);

		// estimate 3D coordinate using stereo vision
		for (PointTrack t : spawned) {
//			System.out.println("track spawn "+t.x+" "+t.y);
			VoTrack p = t.getCookie();
			if (p == null) {
				t.cookie = p = new VoTrack();
			}

			// compute normalized image coordinate
			pixelToNorm.compute(t.x, t.y, n);

//			System.out.println("         pointing "+pointing.x+" "+pointing.y+" "+pointing.z);

			// See if the point ever intersects the ground plane or not
			if (planeProjection.normalToPlane(n.x, n.y, p.ground)) {
				// the line above computes the 2D plane position of the point
				p.onPlane = true;
			} else {
				// Handle points at infinity which are off plane.

				// rotate observation pointing vector into plane reference frame
				pointing.set(n.x, n.y, 1);
				GeometryMath_F64.mult(cameraToPlane.getR(), pointing, pointing);
				pointing.normalize();

				// save value of y-axis in pointing vector
				double normXZ = Math.sqrt(pointing.x * pointing.x + pointing.z * pointing.z);
				p.pointingY = pointing.y / normXZ;

				// save the angle as a vector
				p.ground.x = pointing.z;
				p.ground.y = -pointing.x;
				// normalize to make later calculations easier
				p.ground.x /= normXZ;
				p.ground.y /= normXZ;

				p.onPlane = false;
			}

			p.lastInlier = tick;
		}
	}
683531
public void setProgress(CmsUploadProgessInfo info) {

        int currFile = info.getCurrentFile();

        int currFileIndex = 0;
        if (currFile == 0) {
            // no files read so far
        } else {
            currFileIndex = currFile - 1;
            if (currFileIndex >= m_orderedFilenamesToUpload.size()) {
                currFileIndex = m_orderedFilenamesToUpload.size() - 1;
            }
        }

        if (m_contentLength == 0) {
            m_contentLength = info.getContentLength();
        }

        String currFilename = m_orderedFilenamesToUpload.get(currFileIndex);
        String contentLength = CmsUploadButton.formatBytes(m_contentLength);
        int fileCount = m_orderedFilenamesToUpload.size();
        String readBytes = CmsUploadButton.formatBytes(getBytesRead(info.getPercent()));

        m_bar.setValue(info.getPercent());

        if (!m_started) {
            m_started = true;
            m_fileinfo.setHTML(0, 0, "<b>" + Messages.get().key(Messages.GUI_UPLOAD_PROGRESS_CURRENT_FILE_0) + "</b>");
            m_fileinfo.setHTML(1, 0, "<b>" + Messages.get().key(Messages.GUI_UPLOAD_PROGRESS_UPLOADING_0) + "</b>");
            m_fileinfo.setHTML(2, 0, "");

            m_fileinfo.setText(0, 1, "");
            m_fileinfo.setText(1, 1, "");
            m_fileinfo.setText(2, 1, "");

            m_fileinfo.getColumnFormatter().setWidth(0, "100px");
        }

        m_fileinfo.setText(0, 1, currFilename);
        m_fileinfo.setText(
            1,
            1,
            Messages.get().key(
                Messages.GUI_UPLOAD_PROGRESS_CURRENT_VALUE_3,
                new Integer(currFileIndex + 1),
                new Integer(fileCount),
                getFileText()));
        m_fileinfo.setText(
            2,
            1,
            Messages.get().key(Messages.GUI_UPLOAD_PROGRESS_UPLOADING_VALUE_2, readBytes, contentLength));
    }
969038
public void setProgress(float progress) {
        if (progress < 0)
            mProgress = 0;
        else if (mProgress > 1)
            mProgress = 1;
        else
            mProgress = progress;
        stop();
        onProgressChange(mProgress);
        invalidateSelf();
    }
849517
@SuppressLint("DefaultLocale")
    @Override
    public void setProgress(int progress) {
        if (getParent() instanceof BootstrapProgressBarGroup){
            this.userProgress = 0;
            setMaxProgress(progress);
        }else {
            if (progress < 0 || progress > maxProgress) {
                throw new IllegalArgumentException(
                        String.format("Invalid value '%d' - progress must be an integer in the range 0-%d", progress, maxProgress));
            }
        }

        this.userProgress = progress;

        if (animated) {
            startProgressUpdateAnimation();
        }
        else {
            this.drawnProgress = progress;
            invalidate();
        }

        ViewParent parent = getParent();
        if (parent != null) {
            if (parent instanceof BootstrapProgressBarGroup) {
                BootstrapProgressBarGroup parentGroup = (BootstrapProgressBarGroup) parent;
                parentGroup.onProgressChanged(this);
            }
        }
    }
280897
@SuppressWarnings("UnusedDeclaration")
  public void update(RouteProgress routeProgress) {
    if (routeProgress != null && !isRerouting) {
      SummaryModel model = new SummaryModel(getContext(), distanceFormatter, routeProgress, timeFormatType);
      arrivalTimeText.setText(model.getArrivalTime());
      timeRemainingText.setText(model.getTimeRemaining());
      distanceRemainingText.setText(model.getDistanceRemaining());
    }
  }
1374866
private void onPushLevelProgress(int steps, Object source, boolean singlesteplevel)
    {
        if (this.currentStep.isLevelFinished()) {
            // If current step is done move to next one
            this.currentStep = this.currentStep.getParent().nextStep(null, source);
        }

        // Add level
        this.currentStep = this.currentStep.addLevel(steps, source, singlesteplevel);
    }
1315096
def progress_inc(self, step=1, new_status=None):
    
    self._value += step
    self.progress(self._value, new_status=new_status)