aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCassio de Campos <cassiopc@gmail.com>2017-08-12 14:58:37 +0000
committerCassio de Campos <cassiopc@gmail.com>2017-08-12 14:58:37 +0000
commit4a96669616d1600604abfa21da5b410432e5b0a4 (patch)
tree88852b161f9a9bd0a54bceca38bad5af06330df6
parent7e53a3e24b103d4a272a0f54a51be51e31ba8b0d (diff)
downloadboca-4a96669616d1600604abfa21da5b410432e5b0a4.tar.gz
boca-4a96669616d1600604abfa21da5b410432e5b0a4.zip
suggest java class name, better output
-rwxr-xr-xdoc/problemexamples/problemtemplate/run/java8
-rw-r--r--src/team/run.php2
-rw-r--r--tools/control-machines.sh9
3 files changed, 15 insertions, 4 deletions
diff --git a/doc/problemexamples/problemtemplate/run/java b/doc/problemexamples/problemtemplate/run/java
index ff7a368..4cec4ee 100755
--- a/doc/problemexamples/problemtemplate/run/java
+++ b/doc/problemexamples/problemtemplate/run/java
@@ -178,7 +178,13 @@ else
ret=$?
fi
if [ $ret -gt 10 ]; then
- echo "> > > > > > > Nonzero return code - possible runtime error - I'M GUESSING IT IS RUNTIME ERROR < < < < < < < <"
+ if [ -r stderr0 ]; then
+ grep -q "not find or load main class" stderr0
+ if [ $? == 0 ]; then
+ echo "> > > Nonzero return code - possible class name mismatch - do check < < <"
+ else
+ echo "> > > Nonzero return code - possible runtime error - do check < < <"
+ fi
ret=9
fi
if [ -f stdout0 ]; then
diff --git a/src/team/run.php b/src/team/run.php
index 012030a..471e262 100644
--- a/src/team/run.php
+++ b/src/team/run.php
@@ -159,7 +159,7 @@ $pastabs=''; if(isset($_POST["pastabs"])) $pastabs=myhtmlspecialchars($_POST["pa
//@file_put_contents($fcname . ".try", $verify1 . "\n", FILE_APPEND | LOCK_EX);
$codes = @file($fcname . ".txt",FILE_IGNORE_NEW_LINES);
if(is_array($codes) && in_array($verify,$codes)) {
-@file_put_contents($fcname . ".try", $verify1 . "-ALREADY\n", FILE_APPEND | LOCK_EX);
+ @file_put_contents($fcname . ".try", $verify1 . "-ALREADY\n", FILE_APPEND | LOCK_EX);
if(isset($_POST['name']) && $_POST['name'] != '') {
echo "\nRESULT: SAME FILE ALREADY SUBMITTED FOR THIS PROB/LANG";
exit;
diff --git a/tools/control-machines.sh b/tools/control-machines.sh
index 692e47c..34620a8 100644
--- a/tools/control-machines.sh
+++ b/tools/control-machines.sh
@@ -29,10 +29,15 @@ else
else
for i in `ls runs-submitted*.txt`; do
cat $i|cut -d'-' -f1 |sort -u| while read lin; do
- q=`grep -c $lin runs-submitted*.txt | wc -l`
+ q=`grep -c $lin runs-submitted*.txt | grep -v ":0$" | wc -l`
if [ "$q" != "1" ]; then
echo "===Computer $lin used by multiple users"
- grep -c $lin runs-submitted*.txt
+ grep -c $lin runs-submitted*.txt | grep -v ":0$" | while read line1; do
+ fname=`echo $line1 | cut -d':' -f1`
+ fname=`basename $fname .txt`
+ echo $fname
+ grep $lin ${fname}.try | cut -d'-' -f4 | while read line2; do date -d "@$line2"; done
+ done
fi
done
done