diff --git a/README.md b/README.md index f80503c..0667761 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ ## Current Todo With priorities - [x] Deploy for once. -- [ ] Add some CSS, and make the design at least look like mediocre. -- [ ] Add some CSS, and make website responsive. -- [ ] Add TLE and MLE detection mechanism. +- [x] Add some CSS, and make the design at least look like mediocre. +- [x] Add some CSS, and make website responsive. +- [x] Add TLE and MLE detection mechanism. - [ ] Deploy Again - [ ] Add more test cases and test problems. @@ -57,6 +57,7 @@ ### Implementation issues - get_next_sub_dir() in core.py not implemented, just returns "data1" for now. +- Python version used is 3.7 (in windows_1 environment), but Python Language is visible with name Python 3.10 ### Design Issues - Problem Model does not contain memory_limit diff --git a/data/submissions/temp_out_data/gen_out_1.txt b/data/submissions/temp_out_data/gen_out_1.txt index e69de29..874bdea 100644 --- a/data/submissions/temp_out_data/gen_out_1.txt +++ b/data/submissions/temp_out_data/gen_out_1.txt @@ -0,0 +1,2 @@ +1 +0 1 diff --git a/data/submissions/temp_out_data/gen_out_2.txt b/data/submissions/temp_out_data/gen_out_2.txt index a45fd52..1e8b314 100644 --- a/data/submissions/temp_out_data/gen_out_2.txt +++ b/data/submissions/temp_out_data/gen_out_2.txt @@ -1 +1 @@ -24 +6 diff --git a/db_scripts/how_to_update_values.txt b/db_scripts/how_to_update_values.txt index 7900fe0..86f89c8 100644 --- a/db_scripts/how_to_update_values.txt +++ b/db_scripts/how_to_update_values.txt @@ -3,14 +3,21 @@ see problems/backend/init_data_insert.py $ python manage.py shell ->>> -from problems.models import Problem +# Updata a problem object ->>> +from problems.models import Problem p1 = Problem.objects.get(pk = 1) - ->>> p1.time_limit = 5 +p1.save() + +# delelte all submission data + +from problems.models import UserInfo, UserProblemRelation, Submission + +Submission.objects.all().delete() +UserProblemRelation.objects.all().delete() ->>> -p1.save() \ No newline at end of file +for userinfo in UserInfo.objects.all(): + userinfo.num_problems_solved = 0 + userinfo.score = 0 + userinfo.save() diff --git a/oj_django_project/db.sqlite3 b/oj_django_project/db.sqlite3 index 1d14ebc..e56abf8 100644 Binary files a/oj_django_project/db.sqlite3 and b/oj_django_project/db.sqlite3 differ diff --git a/oj_django_project/problems/backend/code_processor.py b/oj_django_project/problems/backend/code_processor.py index 64e6df5..76139f0 100644 --- a/oj_django_project/problems/backend/code_processor.py +++ b/oj_django_project/problems/backend/code_processor.py @@ -176,7 +176,7 @@ def __init__(self): @overrides def get_compiler_exec_args(self, code_file_path: str, executable_file_full_path: str) -> list: - return [ self.compiler_full_path, code_file_path, "-o", executable_file_full_path] + return [ self.compiler_full_path, code_file_path, "-DONLINE_JUDGE", "-o",executable_file_full_path] @overrides def get_executable_path(self, executable_dir_path: str, code_file_name_without_extension: str) -> str: diff --git a/oj_django_project/problems/backend/configs.py b/oj_django_project/problems/backend/configs.py index 2667702..b0a2e92 100644 --- a/oj_django_project/problems/backend/configs.py +++ b/oj_django_project/problems/backend/configs.py @@ -24,7 +24,7 @@ LINE_LENGTH_LIMIT = 100_000_000_000_000_000 -COMPILATION_TIME_LIMIT = 5 # seconds +COMPILATION_TIME_LIMIT = 15 # seconds DEFAULT_MEMORY_LIMIT = 256 * 1024 * 1024 # Bytes COMMAND_LENGTH_LIMIT = 8191 diff --git a/oj_django_project/problems/static/problems/styles/common.css b/oj_django_project/problems/static/problems/styles/common.css index 59511a4..8576e9c 100644 --- a/oj_django_project/problems/static/problems/styles/common.css +++ b/oj_django_project/problems/static/problems/styles/common.css @@ -145,6 +145,10 @@ a:link, a:visited{ } +#notice-board p{ + margin-left: 2vw; +} + .button-link{ background-color: var(--button_colour); border-radius: 3px; diff --git a/oj_django_project/problems/templates/problems/index.html b/oj_django_project/problems/templates/problems/index.html index e8a4da5..c27822c 100644 --- a/oj_django_project/problems/templates/problems/index.html +++ b/oj_django_project/problems/templates/problems/index.html @@ -39,6 +39,13 @@
Now you can use ONLINE_JUDGE macro in your c++ code.
+Now server can detect TLE and MLE verdict.
+Memory Limit is by default 256MB for now.
+