function enterInHallOfFame($norm, $vector, $dim, $name, $email, $algorithm, $hardware, $runtime, $notes) { printStep("Euclidean norm of submitted vector is: " . round(sqrt($norm) * 10000) / 10000 . "."); $today = date("Y-m-j"); $line = escapeStr($dim) . '|' . escapeStr($norm) . '|' . escapeStr($name) . '|' . escapeStr($vector) . '|' . escapeStr($email) . '|' . escapeStr($algorithm) . '|' . escapeStr($hardware) . '|' . escapeStr($runtime) . '|' . escapeStr($notes) . '|' . escapeStr($today) . "\n"; $fh = fopen('./textfiles/contestants.txt', 'a') or die("can't open file"); fwrite($fh, $line); fclose($fh); }
$setup->intro(); // Configuracion del sistema de sesion printStep(agt('step6'), agt('step6Des')); $setup->setupSession(); $setup->intro(); // Generación de ficheros de configuracion base printStep(agt('step7'), agt('step7Des')); // Comprobamos los ficheros if (!$setup->check('registry')) { $setup->log(agt('step7Err'), 'error'); } else { $setup->makeRegistry(); $setup->log(agt('step7Ok'), 'message'); } */ // Configuracion de la base de datos printStep(agt('step8'), agt('step8Des')); $ret = $setup->setupDDBB(); if (!$ret) { $setup->fatalError('step8Err'); } else { $setup->log(agt('step8Ok'), 'success'); } $setup->intro(); $setup->log(agt('finalMsg'), 'success'); exit(0);
/** * @param FileHandler $fileHandler FileHandler to use * @param TestInfo $testInfo Information about the test * @param TestRunResults $testRunResults The run results to be printed */ function printContent($fileHandler, $testInfo, $testRunResults) { $numSteps = $testRunResults->countSteps(); $useQuicklinks = $numSteps > 1; if ($useQuicklinks) { printQuicklinks($testRunResults); } for ($i = 1; $i <= $numSteps; $i++) { printStep($fileHandler, $testInfo, $testRunResults->getStepResult($i), $useQuicklinks); } }