/*!
Prints all results to the console.
767550
function printResults()
    {
        $results = $this->resultList();
        foreach ( $results as $result )
        {
            $this->display( $result );
        }
    }
712514
function formatResults (results) {
  return results.map(function (r) {
    return {
      fullName: r.fullName,
      hz: r.hz,
      hzDeviation: r.hzDeviation
    }
  })
}
69395
function ReportOutput()
    {
        $fp = fopen($this->filenosuffix . ".out", "wb");
        if (!$fp) {
            return;
        }
        for ($i = 0; $i < $this->nstate; $i++) {
            $stp = $this->sorted[$i];
            fprintf($fp, "State %d:\n", $stp->statenum);
            if ($this->basisflag) {
                $cfp = $stp->bp;
            } else {
                $cfp = $stp->cfp;
            }
            while ($cfp) {
                if ($cfp->dot == $cfp->rp->nrhs) {
                    $buf = sprintf('(%d)', $cfp->rp->index);
                    fprintf($fp, '    %5s ', $buf);
                } else {
                    fwrite($fp,'          ');
                }
                $cfp->ConfigPrint($fp);
                fwrite($fp, "\n");
                if (0) {
                    //SetPrint(fp,cfp->fws,$this);
                    //PlinkPrint(fp,cfp->fplp,"To  ");
                    //PlinkPrint(fp,cfp->bplp,"From");
                }
                if ($this->basisflag) {
                    $cfp = $cfp->bp;
                } else {
                    $cfp = $cfp->next;
                }
            }
            fwrite($fp, "\n");
            for ($ap = $stp->ap; $ap; $ap = $ap->next) {
                if ($ap->PrintAction($fp, 30)) {
                    fprintf($fp,"\n");
                }
            }
            fwrite($fp,"\n");
        }
        fclose($fp);
    }
468616
public function print_table($return=false) {
        ob_start();
        $this->table->print_html();
        $html = ob_get_clean();
        if ($return) {
            return $html;
        } else {
            echo $html;
        }
    }
816083
public function afterRun()
    {
        if (count($this->failures)) {
            $this->console->writeLn("\nFailures:");
        }

        foreach ($this->failures as $spec) {
            $failedText = $this->formatter->red("\n\"$spec\" FAILED");
            $this->console->writeLn($failedText);
            $this->console->writeLn($spec->getException());
        }

        if ($this->startTime) {
            $endTime = microtime(true);
            $runningTime = round($endTime - $this->startTime, 5);
            $this->console->writeLn("\nFinished in $runningTime seconds");
        }

        $failedCount = count($this->failures);
        $incompleteCount = count($this->incompleteSpecs);
        $pendingCount = count($this->pendingSpecs);
        $specs = ($this->specCount == 1) ? 'spec' : 'specs';
        $failures = ($failedCount == 1) ? 'failure' : 'failures';
        $incomplete = ($incompleteCount) ? ", $incompleteCount incomplete" : '';
        $pending = ($pendingCount) ? ", $pendingCount pending" : '';

        // Print ASCII art if enabled
        if ($this->console->options['ascii']) {
            $this->console->writeLn('');
            $this->drawAscii();
        }

        $summaryText = "\n{$this->specCount} $specs, $failedCount $failures" .
                       $incomplete . $pending;

        // Generate the summary based on whether or not it passed
        if ($failedCount) {
            $summary = $this->formatter->red($summaryText);
        } else {
            $summary = $this->formatter->green($summaryText);
        }

        $summary = $this->formatter->bold($summary);
        $this->console->writeLn($summary);
    }
156698
function handleResults(results) {
    ctrl.matches = results;
    ctrl.hidden  = shouldHide();

    // If loading is in progress, then we'll end the progress. This is needed for example,
    // when the `clear` button was clicked, because there we always show the loading process, to prevent flashing.
    if (ctrl.loading) setLoading(false);

    if ($scope.selectOnMatch) selectItemOnMatch();

    positionDropdown();
    reportMessages(true, ReportType.Count);
  }
1230495
def print_result(self, f=sys.stdout, verbose=False):
        
        var_count = len(self.betas)/2
        if verbose:
            results = [str(x) for x in [
                self.chr,
                self.pos,
                self.rsid,
                self.ph_label,
                self.non_miss,
                self.maj_allele,
                self.min_allele,
                "%.4e" % self.eff_alcount,
                "%.4e" % self.p_mvtest,
                "%.4e" % self.lmpv
            ]]

            for i in range(var_count):
                results.append("%.3e" % self.betas[i])
                results.append(self.stringify(self.beta_stderr[i]))
                results.append(self.stringify(self.beta_pvalues[i]))
                results.append(self.stringify(self.betas[i+var_count]))
                results.append(self.stringify(self.beta_stderr[i+var_count]))
                results.append(self.stringify(self.beta_pvalues[i+var_count]))
            print >> f, "\t".join([str(x) for x in results])

        else:
            print >> f, "\t".join(str(x) for x in [
                self.chr,
                self.pos,
                self.rsid,
                self.ph_label,
                self.non_miss,
                self.maj_allele,
                self.min_allele,
                "%.3e" % self.eff_alcount,
                "%.3e" % self.p_mvtest,
                "%.3e" % self.betas[1],
                self.stringify(self.beta_stderr[1]),
                "%.3e" % self.beta_pvalues[1],
                "%.3e" % self.betas[1+var_count],
                self.stringify(self.beta_stderr[1+var_count]),
                "%.3e" % self.beta_pvalues[1+var_count],
            ])
851037
def print_results(cls, stdout, stderr):
        """"""
        for line in stderr:
            print(line, file=sys.stderr)
        if stdout:
            if stderr:  # blank line to separate stdout from stderr
                print(file=sys.stderr)
            cls._print_stdout(stdout)
        else:
            print(':) No issues found.')
267146
public function render_evaluate_results($results, $logs = array()) {
        global $OUTPUT;

        $output = '';

        foreach ($results as $timesplittingid => $result) {

            if (!CLI_SCRIPT) {
                $output .= $OUTPUT->box_start('generalbox mb-3');
            }

            // Check that the array key is a string, not all results depend on time splitting methods (e.g. general errors).
            if (!is_numeric($timesplittingid)) {
                $timesplitting = \core_analytics\manager::get_time_splitting($timesplittingid);
                $langstrdata = (object)array('name' => $timesplitting->get_name(), 'id' => $timesplittingid);

                if (CLI_SCRIPT) {
                    $output .= $OUTPUT->heading(get_string('getpredictionsresultscli', 'tool_analytics', $langstrdata), 3);
                } else {
                    $output .= $OUTPUT->heading(get_string('getpredictionsresults', 'tool_analytics', $langstrdata), 3);
                }
            }

            if ($result->status == 0) {
                $output .= $OUTPUT->notification(get_string('goodmodel', 'tool_analytics'),
                    \core\output\notification::NOTIFY_SUCCESS);
            } else if ($result->status === \core_analytics\model::NO_DATASET) {
                $output .= $OUTPUT->notification(get_string('nodatatoevaluate', 'tool_analytics'),
                    \core\output\notification::NOTIFY_WARNING);
            }

            if (isset($result->score)) {
                // Score.
                $output .= $OUTPUT->heading(get_string('accuracy', 'tool_analytics') . ': ' .
                    round(floatval($result->score), 4) * 100  . '%', 4);
            }

            if (!empty($result->info)) {
                foreach ($result->info as $message) {
                    $output .= $OUTPUT->notification($message, \core\output\notification::NOTIFY_WARNING);
                }
            }

            if (!CLI_SCRIPT) {
                $output .= $OUTPUT->box_end();
            }
        }

        // Info logged during evaluation.
        if (!empty($logs) && debugging()) {
            $output .= $OUTPUT->heading(get_string('extrainfo', 'tool_analytics'), 3);
            foreach ($logs as $log) {
                $output .= $OUTPUT->notification($log, \core\output\notification::NOTIFY_WARNING);
            }
        }

        if (!CLI_SCRIPT) {
            $output .= $OUTPUT->single_button(new \moodle_url('/admin/tool/analytics/index.php'), get_string('continue'), 'get');
        }

        return $output;
    }
634032
static public function printResults(array $results, string $format = 'text') {
        if ($format == 'tsv') {
            echo "subject\tmessage\tproperty\tvalue\n";
            foreach ($results as $i) {
                echo $i . "\n";
            }
        } else {
            $len = array(9, 9, 10, 7);
            foreach ($results as $i) {
                $len[0] = max($len[0], mb_strlen($i->resUri) + 2);
                $len[1] = max($len[1], mb_strlen($i->message) + 2);
                $len[2] = max($len[2], mb_strlen($i->property) + 2);
                $len[3] = max($len[3], mb_strlen($i->value) + 2);
            }
            $format = sprintf("%% %ds%% %ds%% %ds%% %ds\n", $len[0], $len[1], $len[2], $len[3]);
            printf($format, 'subject', 'message', 'property', 'value');
            foreach ($results as $i) {
                printf($format, $i->resUri, $i->message, $i->property, $i->value);
            }
        }
    }
1180181
public function printUndefinedSteps()
    {
        $undefined = $this->registry->getUndefinedSteps();
        count($undefined) && $this->output->writeln('');

        $this->writer->printUndefinedSteps($this->printer, $undefined);
    }
240397
private function returnOutput()
    {
        $collection = new Collection($this->results);

        switch ($this->output) {
            case 'db':
                return $this->saveToDatabase($collection);
                break;
            case 'collection':
                return $collection;
                break;
            case 'json':
                return $collection->toJson();
                break;
            case 'array':
            default:
                return $collection->toArray();
        }
    }
462070
public function printResults()
    {
        echo $this->getHeader();
        echo $this->getErrors();
        echo $this->getFailures();
        echo $this->getWarnings();
        echo $this->getFooter();
    }
718703
def print_results(args):
    """"""
    min_comics, filename = args
    with codecs.open(filename, 'a', 'utf-8') as fp:
        for name, shortname in sorted(load_result(json_file).items()):
            if name in exclude_comics:
                print("Excluded " + name)
                continue
            fp.write(u"add(%r, %r)\n" % (
              str(truncate_name(name)), str(shortname))
            )
653838
function(results, job, done) {
                // Print out the statics
                console.log("Job Statistics: ");
                console.log("  Event Count: " + job.properties().eventCount);
                console.log("  Disk Usage: " + job.properties().diskUsage + " bytes");
                console.log("  Priority: " + job.properties().priority);

                // Find the index of the fields we want
                var rawIndex = results.fields.indexOf("_raw");
                var sourcetypeIndex = results.fields.indexOf("sourcetype");
                var userIndex = results.fields.indexOf("user");
                
                // Print out each result and the key-value pairs we want
                console.log("Results: ");
                for(var i = 0; i < results.rows.length; i++) {
                    console.log("  Result " + i + ": ");
                    console.log("    sourcetype: " + results.rows[i][sourcetypeIndex]);
                    console.log("    user: " + results.rows[i][userIndex]);
                    console.log("    _raw: " + results.rows[i][rawIndex]);
                }
                
                // Once we're done, cancel the job.
                job.cancel(done);
            }
1302338
function result()
    {
        if ($this->result == null || count($this->result) == 0) {
            return false;
        }
        return $this->result;
    }
1845
def print_result(result):
    """"""
    try:
        print result
    except UnicodeEncodeError:
        if sys.stdout.encoding:
            print result.encode(sys.stdout.encoding, 'replace')
        else:
            print result.encode('utf8')
    except:
        print "Unexpected error attempting to print result"