Show the notification with the exact progress.

@param id    The download id.
@param sofar The downloaded bytes so far.
@param total The total bytes of this task.
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);
    }
1024938
void reportTaskFinished(TaskAttemptID taskid, boolean commitPending) {
    TaskInProgress tip;
    synchronized (this) {
      tip = tasks.get(taskid);
    }
    if (tip != null) {
      tip.reportTaskFinished(commitPending);
    } else {
      LOG.warn("Unknown child task finished: "+taskid+". Ignored.");
    }
  }
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");
        }
    }
1209534
function writeProgress(id, total, completed) {
    var percent = Math.round(10 * (100 * completed) / total) / 10;
    if(id == lastProgressId) {
        readline.cursorTo(process.stdout, 0);
        readline.clearLine(process.stdout, 0);
    } else {
        lastProgressId = id;
        process.stdout.write('\n');
    }
    var progressTitles = {
        projects: 'Indexing Projects',
        chunks: 'Indexing Chunks',
        ta: 'Indexing translationAcademy',
        resources: 'Indexing Resources',
        container: 'Downloading Containers',
        catalog: 'Indexing Catalogs',
        langnames: 'Indexing Target Languages',
        'temp-langnames': 'Indexing Temporary Target Languages',
        'approved-temp-langnames': 'Indexing Approved Temporary Target Languages',
        'new-language-questions': 'Indexing Questionnaire'
    };
    process.stdout.write((progressTitles[id] || id) + ' [' + total + '] ' + percent + '%');
}
545135
public void submitHadoopDownloadTask(String URL, String id) {
        Callable<ImageDownloadResult> call = new HadoopImageDownload(URL, id, followRedirects);
        pool.submit(call);
        numPendingTasks++;
    }
810889
protected synchronized void notifyListenersSpiderProgress(int percentageComplete, int numberCrawled,
			int numberToCrawl) {
		for (SpiderListener l : listeners) {
			l.spiderProgress(percentageComplete, numberCrawled, numberToCrawl);
		}
	}
1156444
public void notifyBlur(String id)
    {
        Util utilAll = new Util(getUsersToAffect());

        utilAll.removeClassName(id, "disabled");
        utilAll.setValue(id + "Tip", "");

        //utilAll.addScript("$('" + id + "').disabled = false;");
    }
38147
def progress(self, loaded, total, msg=''):
        

        self.fire('progress', {
            'loaded': loaded,
            'total': total,
            'msg': msg
        })
1109635
void pushDataLater(final int streamId, final BufferedSource source, final int byteCount,
      final boolean inFinished) throws IOException {
    final Buffer buffer = new Buffer();
    source.require(byteCount); // Eagerly read the frame before firing client thread.
    source.read(buffer, byteCount);
    if (buffer.size() != byteCount) throw new IOException(buffer.size() + " != " + byteCount);
    pushExecutorExecute(new NamedRunnable("OkHttp %s Push Data[%s]", connectionName, streamId) {
      @Override public void execute() {
        try {
          boolean cancel = pushObserver.onData(streamId, buffer, byteCount, inFinished);
          if (cancel) writer.rstStream(streamId, ErrorCode.CANCEL);
          if (cancel || inFinished) {
            synchronized (Http2Connection.this) {
              currentPushRequests.remove(streamId);
            }
          }
        } catch (IOException ignored) {
        }
      }
    });
  }
211754
private void updateProgress(DownloadRequest request, long bytesWritten, long totalBytes) {
    long currentTimestamp = System.currentTimeMillis();
    if (bytesWritten != totalBytes
        && currentTimestamp - lastProgressTimestamp < request.progressInterval()) {
      return;
    }

    /* save progress timestamp */
    lastProgressTimestamp = currentTimestamp;

    if (!request.isCanceled()) {
      delivery.postProgress(request, bytesWritten, totalBytes);
    }
  }
1330724
public final void increaseIdleCount(IdleStatus status, long currentTime) {
        if (status == IdleStatus.BOTH_IDLE) {
            idleCountForBoth.incrementAndGet();
            lastIdleTimeForBoth = currentTime;
        } else if (status == IdleStatus.READER_IDLE) {
            idleCountForRead.incrementAndGet();
            lastIdleTimeForRead = currentTime;
        } else if (status == IdleStatus.WRITER_IDLE) {
            idleCountForWrite.incrementAndGet();
            lastIdleTimeForWrite = currentTime;
        } else {
            throw new IllegalArgumentException("Unknown idle status: " + status);
        }
    }
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);
    }
469992
public synchronized void reportDiagnosticInfo(TaskAttemptID taskid, String info) throws IOException {
    TaskInProgress tip = tasks.get(taskid);
    if (tip != null) {
      tip.reportDiagnosticInfo(info);
    } else {
      LOG.warn("Error from unknown child task: "+taskid+". Ignored.");
    }
  }
948110
public void notifyCompletion( URL resource )
    {
        long now = System.currentTimeMillis();
        long time = now - m_start;
        int kBps = (int) ( m_expected / time );
        m_out.println( resource.toExternalForm() + " : " + kBps + " kBps.          " );
    }
330521
public synchronized boolean markSuccessful(int id) {
        boolean isSuccessful = false;

        SQLiteDatabase db = null;
        try {
            db = getWritableDatabase();

            // Set state to processed.
            ContentValues values = new ContentValues();
            values.put(ShareRequestTable.COLUMN_STATE, ShareRequest.STATE_PROCESSED);

            isSuccessful = db.update(ShareRequestTable.NAME, values, WHERE_CLAUSE_BY_ID,
                    new String[]{String.valueOf(id)}) > 0;

            sLogger.log(WingsDbHelper.class, "markSuccessful", "isSuccessful=" + isSuccessful + " id=" + id);
        } catch (SQLException e) {
            // Do nothing.
        } finally {
            db.close();
        }
        return isSuccessful;
    }
1194992
public void onClickContentView(NotificationView view, View contentView, NotificationEntry entry) {
        if (DBG) Log.v(TAG, "onClickContentView - " + entry.ID);
    }
284348
public boolean notifyProgress(int value, int maximum) {
    this.progress = (double) value / (double) maximum;
    this.value = value;
    this.maximum = maximum;
    this.printProgressBar();
    return true;
  }