void Benchmark::on_pushButton_analyse_clicked() { QString video=ui->comboBox_video->currentText(); if(video.compare("all")==0){ for(uint i=0;i<globalVideosList.size();i++){ QString videoFile=globalVideosList[i]; processOne(videoFile); } } else{ QString videoFile=video; processOne(videoFile); } }
void E57Writer::write(const PointViewPtr view) { for (PointId id = 0; id < view->size(); ++id) { PointRef point = view->point(id); processOne(point); } }
int main() { initIndexes(); while(processOne()); return 0; }
void FerryFilter::filter(PointView& view) { PointRef point(view, 0); for (PointId id = 0; id < view.size(); ++id) { point.setPointId(id); processOne(point); } }
void TransformationFilter::filter(PointView& view) { PointRef point(view, 0); for (PointId idx = 0; idx < view.size(); ++idx) { point.setPointId(idx); processOne(point); } }
void BaseService::process(const ReadEvent &event) { LogDebug("Read event for counter: " << event.connectionID.counter); auto &info = m_connectionInfoMap[event.connectionID.counter]; info.buffer.Push(event.rawBuffer); // We can get several requests in one package. // Extract and process them all while (processOne(event.connectionID, info.buffer, info.interfaceID)); }
void AdvancedRenameProcessDialog::slotRenameImages() { if (d->newNameList.isEmpty()) { slotCancel(); return; } processOne(); }
point_count_t FauxReader::read(PointViewPtr view, point_count_t count) { for (PointId idx = 0; idx < count; ++idx) { PointRef point = view->point(idx); if (!processOne(point)) break; if (m_cb) m_cb(*view, idx); } return count; }
point_count_t TileDBReader::read(PointViewPtr view, point_count_t count) { PointRef point = view->point(0); PointId id; for (id = 0; id < count; ++id) { point.setPointId(id); if (!processOne(point)) break; } return id; }
point_count_t TextReader::read(PointViewPtr view, point_count_t numPts) { PointId idx = view->size(); point_count_t cnt = 0; PointRef point(*view, idx); while (cnt < numPts) { point.setPointId(idx); if (!processOne(point)) break; cnt++; idx++; } return cnt; }
PointViewSet RangeFilter::run(PointViewPtr inView) { PointViewSet viewSet; if (!inView->size()) return viewSet; PointViewPtr outView = inView->makeNew(); for (PointId i = 0; i < inView->size(); ++i) { PointRef point = inView->point(i); if (processOne(point)) outView->appendPoint(*inView, i); } viewSet.insert(outView); return viewSet; }
///////////////////////////////////////////////////////////////////////// /// Compile with: gcc -ggdb CS468_WK5_prog2.c processinf.c psthreads.c/// //////////////////////////////////////////////////////////////////////// int main() { char word[10]; int fd1[2]; int fd2[2]; int fd3[2]; int f1_pid; int f2_pid; int f3_pid; int f4_pid; pipe(fd1); pipe(fd2); pipe(fd3); getInput(word); f1_pid = fork(); if(f1_pid == 0){ processOne(fd1,word); } sleep(5); kill(f1_pid, SIGSTOP); f2_pid = fork(); if(f2_pid == 0){ processTwo(fd1,fd2); } sleep(5); kill(f2_pid, SIGSTOP); f3_pid = fork(); if(f3_pid == 0){ processThree(fd2,fd3); } sleep(5); kill(f3_pid, SIGSTOP); f4_pid = fork(); if(f4_pid == 0){ processFin(fd3,fd1); } sleep(10); kill(f4_pid, SIGINT); kill(f3_pid, SIGINT); kill(f2_pid, SIGINT); kill(f1_pid, SIGINT); return 0; }
point_count_t SbetReader::read(PointViewPtr view, point_count_t count) { PointId nextId = view->size(); PointId idx = m_index; point_count_t numRead = 0; seek(idx); while (numRead < count && idx < m_numPts) { PointRef point = view->point(nextId); processOne(point); if (m_cb) m_cb(*view, nextId); idx++; nextId++; numRead++; } m_index = idx; return numRead; }
void FingerPrintsGenerator::slotGotImagePreview(const LoadingDescription& desc, const DImg& img) { if (d->allPicturesPath.isEmpty()) { return; } if (d->allPicturesPath.first() != desc.filePath) { return; } if (!img.isNull()) { // compute Haar fingerprint d->haarIface.indexImage(desc.filePath, img); } QPixmap pix = DImg(img).smoothScale(128, 128, Qt::KeepAspectRatio).convertToPixmap(); addedAction(pix, desc.filePath); advance(1); if (!d->allPicturesPath.isEmpty()) { d->allPicturesPath.removeFirst(); } if (d->allPicturesPath.isEmpty()) { complete(); } else { processOne(); } }
void IPCClientPrivate::processEvent() { const json j = receiveOne(); processOne(j); }
void AdvancedRenameProcessDialog::slotRenameFinished() { if (d->cancel) { return; } advance(1); if (d->newNameList.isEmpty()) { if (!d->failedList.isEmpty()) { QPointer<QMessageBox> msgBox = new QMessageBox(QMessageBox::Warning, i18n("Renaming images"), i18np("An error occurred while renaming %1 image.\n" "Do you want to rename this image again or " "rename this image by overwriting?", "An error occurred while renaming %1 images.\n" "Do you want to rename these images again or " "rename these images by overwriting?", d->failedList.count()), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, this); msgBox->button(QMessageBox::Yes)->setText(i18n("Rename Again")); msgBox->button(QMessageBox::Yes)->setIcon(QIcon::fromTheme(QLatin1String("document-edit"))); msgBox->button(QMessageBox::No)->setText(i18n("Overwrite")); msgBox->button(QMessageBox::No)->setIcon(QIcon::fromTheme(QLatin1String("edit-copy"))); int result = msgBox->exec(); delete msgBox; if (result == QMessageBox::Cancel) { d->failedList.clear(); complete(); } else if (result == QMessageBox::No) { d->newNameList = d->failedList; d->failedList.clear(); d->overwrite = true; setValue(0); getNextThumbnail(); setLabel(d->infoLabel); setMaximum(d->newNameList.count()); QTimer::singleShot(500, this, SLOT(slotRenameImages())); } else { complete(); } } else { complete(); } } else { processOne(); } }