Giter Site home page Giter Site logo

lqdjudge / online-judge Goto Github PK

View Code? Open in Web Editor NEW
71.0 7.0 26.0 17.14 MB

LQD Online Judge

Home Page: https://lqdoj.edu.vn

License: GNU Affero General Public License v3.0

HTML 18.20% Python 36.71% CSS 10.27% JavaScript 32.60% Shell 0.01% SCSS 2.21%
online-judge competitive-programming contest-management-system

online-judge's Introduction

LQDOJ: Le Quy Don Online Judge

Python OS License

Overview

Homepage: https://lqdoj.edu.vn

Based on DMOJ.

Supported languages:

  • Assembly (x64)
  • AWK
  • C
  • C++03 / C++11 / C++14 / C++17 / C++20
  • Java 11
  • Pascal
  • Perl
  • Python 2 / Python 3
  • PyPy 2 / PyPy 3

Support plagiarism detection via Stanford MOSS.

Installation

Most of the setup are the same as DMOJ installations. You can view the installation guide of DMOJ here: https://docs.dmoj.ca/#/site/installation. There is one minor change: Instead of git clone https://github.com/DMOJ/site.git, you clone this repo git clone https://github.com/LQDJudge/online-judge.git.

  • Bước 1: cài các thư viện cần thiết
    • $ ở đây nghĩa là sudo. Ví dụ dòng đầu nghĩa là chạy lệnh sudo apt update
$ apt update
$ apt install git gcc g++ make python3-dev python3-pip libxml2-dev libxslt1-dev zlib1g-dev gettext curl redis-server
$ curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
$ apt install nodejs
$ npm install -g sass postcss-cli postcss autoprefixer
  • Bước 2: tạo DB
    • Server đang dùng MariaDB ≥ 10.5, các bạn cũng có thể dùng Mysql nếu bị conflict
    • Nếu các bạn chạy lệnh dưới này xong mà version mariadb bị cũ (< 10.5) thì có thể tra google cách cài MariaDB mới nhất (10.5 hoặc 10.6).
    • Các bạn có thể thấy version MariaDB bằng cách gõ lệnh sudo mysql (Ctrl + C để quit)
$ apt update
$ apt install mariadb-server libmysqlclient-dev
  • Bước 3: tạo table trong DB
    • Các bạn có thể thay tên table và password
$ sudo mysql
mariadb> CREATE DATABASE dmoj DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci;
mariadb> GRANT ALL PRIVILEGES ON dmoj.* TO 'dmoj'@'localhost' IDENTIFIED BY '<password>';
mariadb> exit
  • Bước 4: Cài đặt môi trường ảo (virtual env) và pull code
    • Nếu pip3 install mysqlclient bị lỗi thì thử chạy pip3 install mysqlclient==2.1.1
$ python3 -m venv dmojsite
$ . dmojsite/bin/activate

(dmojsite) $ git clone https://github.com/LQDJudge/online-judge.git
(dmojsite) $ cd online-judge
(dmojsite) $ git submodule init
(dmojsite) $ git submodule update
(dmojsite) $ pip3 install -r requirements.txt
(dmojsite) $ pip3 install mysqlclient
(dmojsite) $ pre-commit install
  • Bước 5: tạo local_settings.py. Đây là file để custom setting cho Django. Các bạn tạo file vào online-judge/dmoj/local_settings.py
  • Bước 6: Compile CSS và translation
    • Giải thích:
      • Lệnh 1 và 2 gọi sau mỗi lần thay đổi 1 file css hoặc file js (file html thì không cần)
      • Lệnh 3 và 4 gọi sau mỗi lần thay đổi file dịch
    • Note: Sau khi chạy lệnh này, folder tương ứng với STATIC_ROOT trong local_settings phải được tạo. Nếu chưa được tạo thì mình cần tạo folder đó trước khi chạy 2 lệnh đầu.
(dmojsite) $ ./make_style.sh
(dmojsite) $ python3 manage.py collectstatic
(dmojsite) $ python3 manage.py compilemessages
(dmojsite) $ python3 manage.py compilejsi18n
  • Bước 7: Thêm dữ liệu vào DB
(dmojsite) $ python3 manage.py migrate
(dmojsite) $ python3 manage.py loaddata navbar
(dmojsite) $ python3 manage.py loaddata language_small
(dmojsite) $ python3 manage.py loaddata demo
  • Bước 8: Chạy site. Đến đây thì cơ bản đã hoàn thành (chưa có judge, websocket, celery). Các bạn có thể truy cập tại localhost:8000
python3 manage.py runserver 0.0.0.0:8000

Một số lưu ý:

  1. (WSL) có thể tải ứng dụng Terminal trong Windows Store
  2. (WSL) mỗi lần mở ubuntu, các bạn cần chạy lệnh sau để mariadb khởi động: sudo service mysql restart (tương tự cho một số service khác như memcached, celery)
  3. Sau khi cài đặt, các bạn chỉ cần activate virtual env và chạy lệnh runserver là ok
. dmojsite/bin/activate
python3 manage.py runserver
  1. Đối với nginx, sau khi config xong theo guide của DMOJ, bạn cần thêm location như sau để sử dụng được tính năng profile image, thay thế path/to/oj thành đường dẫn nơi bạn đã clone source code.
location /profile_images/ {
    root /path/to/oj;
}
  1. Quy trình dev:
    1. Sau khi thay đổi code thì django tự build lại, các bạn chỉ cần F5
    2. Một số style nằm trong các file .scss. Các bạn cần recompile css thì mới thấy được thay đổi.

Optional:

Alias: Các bạn có thể lưu các alias này để sau này dùng cho nhanh

  • mtrans: để generate translation khi các bạn add một string trong code
  • trans: compile translation (sau khi bạn đã dịch tiếng Việt)
  • cr: chuyển tới folder OJ
  • pr: chạy server
  • sm: restart service (chủ yếu dùng cho WSL)
  • sd: activate virtual env
  • css: compile các file css
alias mtrans='python3 manage.py makemessages -l vi && python3 manage.py makedmojmessages -l vi'
alias pr='python3 manage.py runserver'
alias sd='source ~/LQDOJ/dmojsite/bin/activate'
alias sm='sudo service mysql restart && sudo service redis-server start && sudo service memcached start'
alias trans='python3 manage.py compilemessages -l vi && python3 manage.py compilejsi18n -l vi'
alias cr='cd ~/LQDOJ/online-judge'
alias css='./make_style.sh && python3 manage.py collectstatic --noinput'

Memcached: dùng cho in-memory cache

$ sudo apt install memcached

Websocket: dùng để live update (như chat)

  • Tạo file online-judge/websocket/config.js
module.exports = {
    get_host: '127.0.0.1',
    get_port: 15100,
    post_host: '127.0.0.1',
    post_port: 15101,
    http_host: '127.0.0.1',
    http_port: 15102,
    long_poll_timeout: 29000,
};
  • Cài các thư viện
(dmojsite) $ npm install qu ws simplesets
(dmojsite) $ pip3 install websocket-client
  • Khởi động (trong 1 tab riêng)
(dmojsite) $ node websocket/daemon.js

Celery: (dùng cho một số task như batch rejudge_

celery -A dmoj_celery worker

Judge:

  • Cài đặt ở 1 folder riêng bên ngoài site:
$ apt install python3-dev python3-pip build-essential libseccomp-dev
$ git clone https://github.com/LQDJudge/judge-server.git
$ cd judge-server
$ sudo pip3 install -e .
  • Tạo một file judge.yml ở bên ngoài folder judge-server (file mẫu https://github.com/DMOJ/docs/blob/master/sample_files/judge_conf.yml)
  • Thêm judge vào site bằng UI: Admin → Judge → Thêm Judge → nhập id và key (chỉ cần thêm 1 lần) hoặc dùng lệnh (dmojsite) $ python3 managed.py addjudge <id> <key>.
  • Chạy Bridge (cầu nối giữa judge và site) trong 1 tab riêng trong folder online-judge:
(dmojsite) $ python3 managed.py runbridged
  • Khởi động Judge (trong 1 tab riêng):
$ dmoj -c judge.yml localhost
  • Lưu ý: mỗi lần sau này muốn chạy judge thì mở 1 tab cho bridge và n tab cho judge. Mỗi judge cần 1 file yml khác nhau (chứa authentication khác nhau)

Some frequent difficulties when installation:

  1. Missing the local_settings.py. You need to copy the local_settings.py in order to pass the check.
  2. Missing the problem folder in local_settings.py. You need to create a folder to contain all problem packages and configure in local_settings.py.
  3. Missing static folder in local_settings.py. Similar to problem folder, make sure to configure STATIC_FILES inside local_settings.py.
  4. Missing configure file for judges. Each judge must have a seperate configure file. To create this file, you can run python dmojauto-conf. Checkout all sample files here https://github.com/DMOJ/docs/blob/master/sample_files.
  5. Missing timezone data for SQL. If you're using Ubuntu and you're following DMOJ's installation guide for the server, and you are getting the error mentioned in #45, then you can follow this method to fix:
mysql
-- You may have to do this if you haven't set root password for MySQL, replace mypass with your password
-- SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mypass');
-- FLUSH PRIVILEGES;
exit
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -D mysql -u root -p 
mysql -u root -p -e "flush tables;" mysql
  1. Missing the chat secret key, you must generate a Fernet key, and assign a variable in local_settings.py like this
CHAT_SECRET_KEY = "81HqDtbqAywKSOumSxxxxxxxxxxxxxxxxx="

Usage

Suppose you finished all the installation. Everytime you want to run a local server, follow these steps:

  1. Activate virtualenv:
source dmojsite/bin/activate
  1. Run server:
python3 manage.py runserver 0.0.0.0:8000
  1. Create a bridge (this is opened in a different terminal with the second step if you are using the same machine)
python3 manage.py runbridged
  1. Create a judge (another terminal)
dmoj 0.0.0.0 -p 9999 -c <path to yml configure file>

Here we suppose you use the default port 9999 for bridge in settings.py. You can create multiple judges, each should be in a seperate terminal.

Optional

  1. Run celery worker (This is server's queue. It may be necessary in some functions)
celery -A dmoj_celery worker
  1. Run a live event server (So everything is updated lively like in the production)
node websocket/daemon.js
  1. To use subdomain for each organization, go to admin page -> navigation bar -> sites, add domain name (e.g, "localhost:8000"). Then go to add USE_SUBDOMAIN = True to local_settings.py.

Deploy

Most of the steps are similar to Django tutorials. Here are two usual steps:

  1. Update vietnamese translation:
  • If you add any new phrases in the code, python3 manage.py makemessages
  • go to locale/vi
  • modify .po file
  • python3 manage.py compilemessages
  • python3 manage.py compilejsi18n
  1. Update styles (using SASS)
  • Change .css/.scss files in resources folder
  • ./make_style.sh && python3 manage.py collectstatic
  • Sometimes you need to press Ctrl + F5 to see the new user interface in browser.

Screenshots

Leaderboard

Leaderboard with information about contest rating, performance points and real name of all users.

Admin dashboard

Admin dashboard helps you easily managing problems, users, contests and blog posts.

Statement editor

You can write the problems' statement in Markdown with LaTeX figures and formulas supported.

Chat

Users can communicate with each other and can see who's online.

online-judge's People

Contributors

anhkha2003 avatar baole106 avatar canuc80k avatar cuom1999 avatar giorzang avatar hungbacktracking avatar letangphuquy avatar luzivaltic avatar ngvanthanggit avatar thanhluong avatar tin12q avatar twilightty avatar yucyle avatar zhaospei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

online-judge's Issues

Spoiler in Editor

Tạo spoiler như CF, mặc định là phần bên trong sẽ bị ẩn, khi click thì sẽ hiện ra.

Lỗi khi Thêm dữ liệu vào DB

(dmojsite) root@instance-20240706-0834:/home/ubuntu/online-judge# python3 manage.py migrate
Traceback (most recent call last):
  File "/home/ubuntu/online-judge/manage.py", line 18, in <module>
    execute_from_command_line(sys.argv)
  File "/home/ubuntu/dmojsite/lib/python3.10/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/home/ubuntu/dmojsite/lib/python3.10/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/ubuntu/dmojsite/lib/python3.10/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/ubuntu/dmojsite/lib/python3.10/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/home/ubuntu/dmojsite/lib/python3.10/site-packages/django/core/management/base.py", line 89, in wrapped
    res = handle_func(*args, **kwargs)
  File "/home/ubuntu/dmojsite/lib/python3.10/site-packages/django/core/management/commands/migrate.py", line 92, in handle
    executor = MigrationExecutor(connection, self.migration_progress_callback)
  File "/home/ubuntu/dmojsite/lib/python3.10/site-packages/django/db/migrations/executor.py", line 18, in __init__
    self.loader = MigrationLoader(self.connection)
  File "/home/ubuntu/dmojsite/lib/python3.10/site-packages/django/db/migrations/loader.py", line 53, in __init__
    self.build_graph()
  File "/home/ubuntu/dmojsite/lib/python3.10/site-packages/django/db/migrations/loader.py", line 214, in build_graph
    self.load_disk()
  File "/home/ubuntu/dmojsite/lib/python3.10/site-packages/django/db/migrations/loader.py", line 116, in load_disk
    migration_module = import_module(migration_path)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/ubuntu/online-judge/judge/migrations/0091_compiler_message_ansi2html.py", line 4, in <module>
    from lxml.html.clean import clean_html
  File "/home/ubuntu/dmojsite/lib/python3.10/site-packages/lxml/html/clean.py", line 18, in <module>
    raise ImportError(
ImportError: lxml.html.clean module is now a separate project lxml_html_clean.
Install lxml[html_clean] or lxml_html_clean directly.```

Site Corrupted when I open a problem

SIGSEGV: invalid_state

corrupt page /problem/aplusb
site: fatal signal: Segmentation fault
site died (signal 500, exit -11)

[Go back](javascript:history.back())

Traceback (most recent call last):
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/django/core/handlers/base.py", line 204, in _get_response
    response = response.render()
               ^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/django/template/response.py", line 105, in render
    self.content = self.rendered_content
                   ^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/django/template/response.py", line 83, in rendered_content
    return template.render(context, self._request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/django_jinja/backend.py", line 59, in render
    return mark_safe(self._process_template(self.template.render, context, request))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/django_jinja/backend.py", line 105, in _process_template
    return handler(context)
           ^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/home/duongnhanac/online-judge/templates/problem/problem.html", line 1, in top-level template code
    {% extends "common-content.html" %}
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/online-judge/templates/common-content.html", line 1, in top-level template code
    {% extends "base.html" %}
  File "/home/duongnhanac/online-judge/templates/base.html", line 374, in top-level template code
    <div id="content-body">{% block body %}{% endblock %}</div>
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/online-judge/templates/common-content.html", line 71, in block 'body'
    {% block comments %}{% endblock %}
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/online-judge/templates/problem/problem.html", line 402, in block 'comments'
    {% include "problem/related_problems.html" %}
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/online-judge/templates/problem/related_problems.html", line 14, in top-level template code
    <a href="{{url('problem_detail', problem.code)}}">{{ problem.name }}</a>
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/django_jinja/builtins/extensions.py", line 190, in _url_reverse
    return reverse(name, args=args, kwargs=kwargs, current_app=current_app)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/django/urls/base.py", line 86, in reverse
    return resolver._reverse_with_prefix(view, prefix, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/django/urls/resolvers.py", line 698, in _reverse_with_prefix
    raise NoReverseMatch(msg)
django.urls.exceptions.NoReverseMatch: Reverse for 'problem_detail' with arguments '(Undefined,)' not found. 1 pattern(s) tried: ['problem/(?P<problem>[^/]+)$']

Value error

image
Trong khi đang build LQDOJ trong WSL2 (Ubuntu 22.04) thì mình gặp lỗi trên. Mong team LQDOJ xử lí giúp mình ạ

Coders of the week

Tạo một bảng XH coders của tuần để khuyến khích ae làm bài. BXH sẽ list những người được nhiều điểm nhất trong vòng 1 tuần gần nhất.

Có thể đặt trong trang home, hoặc có thể đặt trong users (trong TH các thầy muốn theo dõi học sinh trong group).

New issue when I create a contest and the Contest started

SIGSEGV: invalid_state

trang bị sập /contests/
site: fatal signal: Segmentation fault
site died (signal 500, exit -11)

[Go back](javascript:history.back())

Traceback (most recent call last):
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/django/core/handlers/base.py", line 204, in _get_response
    response = response.render()
               ^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/django/template/response.py", line 105, in render
    self.content = self.rendered_content
                   ^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/django/template/response.py", line 83, in rendered_content
    return template.render(context, self._request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/django_jinja/backend.py", line 59, in render
    return mark_safe(self._process_template(self.template.render, context, request))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/django_jinja/backend.py", line 105, in _process_template
    return handler(context)
           ^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/home/duongnhanac/online-judge/templates/contest/list.html", line 202, in top-level template code
    value="{{ _('Join') }}">
  File "/home/duongnhanac/online-judge/templates/two-column-content.html", line 2, in top-level template code
    {% extends "three-column-content.html" %}
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/online-judge/templates/three-column-content.html", line 122, in top-level template code
    <span class="sidebar-text">{{ text }}</span>
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/online-judge/templates/base.html", line 374, in top-level template code
    <div id="content-body">{% block body %}{% endblock %}</div>
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/online-judge/templates/three-column-content.html", line 135, in block 'body'
    {% block middle_content %}{% endblock %}
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/online-judge/templates/contest/list.html", line 297, in block 'middle_content'
    <span class="time">{% trans countdown=contest.end_time|as_countdown %}Ends in {{countdown}}{% endtrans %}</span>
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/dmojsite/lib/python3.11/site-packages/django_jinja/library.py", line 91, in _wrapper
    data = render_to_string(template, fn(*args, **kwargs))
                                      ^^^^^^^^^^^^^^^^^^^
  File "/home/duongnhanac/online-judge/judge/jinja2/timedelta.py", line 29, in as_countdown
    initial = abs(time - time_now)
                  ~~~~~^~~~~~~~~~
TypeError: can't subtract offset-naive and offset-aware datetimes

Lỗi PDF

Screenshot (5)
Mình đang gặp tình trạng lỗi đề PDF khi chạy web với nginx + supervisor như docs của DMOJ

Mong team LQDOJ giúp đỡ mình ạ

Judge live update

Khi chấm bài site không liên tục cập nhật trạng thái chấm như bên LQDOJ, phải làm mới trang nó mới cập nhật.

Mình đã thử set EVENT_DAEMON_USE = False ở settings.py và local_settings.py nhưng vẫn chưa được.

Xin hỏi phải set như thế nào để site liên tục cập nhật kết quả chấm. Xin cảm ơn

Thêm bài tập

Hiện tại mình đang bị vướng hai thứ:

  • Thêm bài tập dạng pdf là bị lỗi không thêm được mặc dù truy cập vps vẫn thấy thư mục bài tập và tệp pdf
  • Thêm bài là phải khởi động lại judge nó mới hiển thị là có máy chấm cho bài mới thêm
    Xin giúp mình cách khắc phục. Xin cảm ơn

Possible bug when showing full names on the contest leaderboard

Leaderboard shows full names when the checkbox is not checked (and vice versa).

Steps to reproduce:

  • Open the leaderboard of a contest
  • Check "Show full name"
  • Move to another page (eg. the previous page, or a particular problem's ranking page) (*)
  • Return to the leaderboard page

(*): If this another page requires hard reloading or some sorts, then the bug will not be produced.

ScoreBoard của site

Khi tổ chức kỳ thi có bài vẽ hình scratch, bài này sẽ chấm sau và cập nhật lên scoreboard sau khi test kết thúc.
Sau khi thi, mình chấm lại 5 bài nộp, tuy nhiên bảng xếp hạng chỉ cập nhật điểm mới của 2 bài. Dù restart site hay vps nó vẫn vậy.
Cho mình hỏi làm thế nào khắc phục vấn đề này?
Cảm ơn

Lỗi DB khi đăng ký

image
Mình đang deploy một server riêng với source của LQDOJ, nhưng khi dùng tính năng đăng ký thì gặp lỗi này, bắt buộc phải SET FOREIGN_KEY_CHECKS = 1; mới hiện ra trang đăng ký thành công được (mặc dù vẫn nhận được mail activate)
Mong team LQDOJ xem xét và giúp đỡ mình ạ.

Basic Algo checklist

Problems about pure algorithms & data structures that need to add to the OJ:

Note:
Push the link to each problem after done, make sure to write editorial in every problem (something like general ideas and links to helpful sites, exercises).

  • Graph theory:
  • Minimum Spanning Tree
  • Max Flow
  • Shortest Paths (Dijkstra)
  • All Shortest Paths (Floyd)
  • Connected Components (DFS/BFS)
  • Shortest Paths in Unweighted Graph (BFS)
  • Min Cost Max Flow
  • Strongly Connected Components (Tarjan/Korasaju)
  • Longest Path in DAG
  • Bipartite Matching
  • Bridge and Arcticulation Point
  • Max Matching on General Graph
  • 2-SAT
  • Tree
  • Heavy Light Decomposition
  • Centroid Decomposition
  • DP on Tree
  • Diameter on Tree
  • LCA
  • Range Queries
  • RMQ
  • IT
  • IT + Lazy
  • BIT
  • SQRT Decomposition
  • Persistent IT
  • Mo Algorithm
  • Number theory:
  • Binary Exponentiation
  • Sieve of Eratosthenes
  • Inverse modulo
  • Euclid algorithm
  • Big Num
  • Integer Factorisation (SQRT)
  • Fast Integer Factorisation (Rabin-Miller)
  • Factorisation By Sieve
  • Primality Test (O(log n))
  • Math
  • Polynomial Multiplication (FFT)
  • Linear Programming (Simplex)
  • Gaussian Elimination on 0/1 Matrix
  • Gaussian Elimination on General Matrix
  • Randomization Algorithm
  • Searching
  • Binary Search on Integer
  • Binary Search on Real
  • Ternary Search on Integer
  • Ternary Search on Real
  • Local Search
  • Strings:
  • KMP / Z-Algorithm
  • Suffix array
  • Trie
  • Hash
  • Suffix Automaton
  • Manacher
  • Aho-Corasick
  • Dynamic Programming:
  • Convex Hull Trick Optimization
  • Divide and Conquer Optimization
  • Knuth Optimization
  • 1D Optimization
  • Dynamic Convex Hull Trick / Segment Tree of Intervals (Li Chao Tree)
  • Matrix Multiplication
  • Lucas Theorem (Not sure if needed)
  • Brute Force: (Important)
  • Listing all subsets
  • Listing all permutations
  • Generate all combinations (Backtrack)
  • Iterating through all masks with their submasks (Link)
  • Special:
  • Divide and Conquer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.