当前位置: 首页>>代码示例>>PHP>>正文


PHP progress_bar::set_text方法代码示例

本文整理汇总了PHP中progress_bar::set_text方法的典型用法代码示例。如果您正苦于以下问题:PHP progress_bar::set_text方法的具体用法?PHP progress_bar::set_text怎么用?PHP progress_bar::set_text使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在progress_bar的用法示例。


在下文中一共展示了progress_bar::set_text方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: diarize

 /**
  * Segmente le document numérique et stocke le résultat en base de données
  */
 public function diarize()
 {
     // On commence par supprimer
     $query = "delete from explnum_segments where explnum_segment_explnum_num = " . $this->explnum->explnum_id;
     mysql_query($query);
     $query = "delete from explnum_speakers where explnum_speaker_explnum_num = " . $this->explnum->explnum_id;
     mysql_query($query);
     // Gestion de la progress_bar
     $progress_bar = new progress_bar("upload to server");
     $progress_bar->set_percent(0);
     $this->speechFile = $this->diarization->sendFile($this->getFile());
     // 		$this->speechFile = $this->diarization->getFile(67);
     $status = $this->speechFile->getStatus();
     while ($status != "diarization_phase7") {
         if ($status == "uploaded") {
             $progress_bar->set_percent(round(1 / 8 * 100));
         } else {
             $nb = str_replace("diarization_phase", "", $status);
             $progress_bar->set_percent(round(($nb + 1) / 8 * 100));
         }
         $progress_bar->set_text($status);
         $status = $this->speechFile->getStatus();
         sleep(0.5);
     }
     sleep(10);
     $progress_bar->hide();
     $speakers = $this->speechFile->getSpeakers();
     $speakers_ids = array();
     // Tableau associant l'identifiant du speaker avec son identifiant dans la table
     foreach ($speakers as $speaker) {
         $query = "insert into explnum_speakers (explnum_speaker_explnum_num, explnum_speaker_speaker_num, explnum_speaker_gender) values (" . $this->explnum->explnum_id . ", '" . $speaker->getID() . "', '" . $speaker->getGender() . "')";
         mysql_query($query);
         $speakers_ids[$speaker->getID()] = mysql_insert_id();
     }
     $segments = $this->speechFile->getSegments();
     foreach ($segments as $segment) {
         $query = "insert into explnum_segments (explnum_segment_explnum_num, explnum_segment_speaker_num, explnum_segment_start, explnum_segment_duration, explnum_segment_end) values (" . $this->explnum->explnum_id . ", '" . $speakers_ids[$segment->getSpeaker()->getID()] . "', " . $segment->getStart() . ", " . $segment->getDuration() . ", " . $segment->getEnd() . ")";
         mysql_query($query);
     }
 }
开发者ID:bouchra012,项目名称:PMB,代码行数:43,代码来源:diarization_docnum.class.php

示例2: caddie

     $cad = new caddie($idcaddienot);
     $liencad = "&nbsp;<a href=\"./catalog.php?categ=caddie&sub=gestion&quoi=panier&action=&object_type=NOTI&idcaddie={$idcaddienot}\">" . $cad->name . "</a>";
 } else {
     $liencad = "";
 }
 echo "<div class='row'><hr /></div><div class='row'><label class='etiquette' >" . $msg['chklnk_verifnoti'] . "</label>" . $liencad . "</div>\n\t\t\t<div class='row'>";
 $q = implode($req_notice, " union ");
 $r = pmb_mysql_query($q);
 if ($r) {
     $rc = pmb_mysql_num_rows($r);
 } else {
     $rc = 0;
 }
 $pb->count = $rc;
 $pb->nb_progress_call = 0;
 $pb->set_text($msg['chklnk_verif_notice']);
 flush();
 if ($r) {
     while ($o = pmb_mysql_fetch_object($r)) {
         $response = $curl->get($o->lien);
         if (!$response) {
             echo "<div class='row'><a href=\"./catalog.php?categ=isbd&id=" . $o->notice_id . "\">" . $o->tit1 . "</a>&nbsp;<a href=\"" . $o->lien . "\">" . $o->lien . "</a> <span class='erreur'>" . $curl->error . "</span></div>";
             if ($ajtnoti) {
                 $cad->add_item($o->notice_id, 'NOTI');
             }
         } elseif ($response->headers['Status-Code'] != '200') {
             if ($response->headers['Status-Code']) {
                 $tmp = $curl->reponsecurl[$response->headers['Status-Code']];
             } else {
                 $tmp = $msg["curl_no_status_code"];
             }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:chklnk.inc.php


注:本文中的progress_bar::set_text方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。