Giter Club home page Giter Club logo

jnoj's People

Contributors

bobby285271 avatar harukama avatar i-curve avatar shi-yang 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  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  avatar  avatar  avatar  avatar

jnoj's Issues

反馈一个问题

在后台编辑题目时, ck-editor中的中文内容,按一下BackSpace退格键后,会一下删除2个中文内容,非常的不习惯。

yii\base\ErrorException: Trying to get property 'nickname' of non-object in /www/jnoj/views/solution/index.php:32

Stack trace:
#0 /www/jnoj/views/solution/index.php(32): yii\base\ErrorHandler->handleError(8, 'Trying to get p...', '/www/jnoj/views...', 32, Array)
#1 [internal function]: yii\base\View->{closure}(Object(app\models\Solution), 32, 6, Object(yii\grid\DataColumn))
#2 /www/jnoj/vendor/yiisoft/yii2/grid/DataColumn.php(230): call_user_func(Object(Closure), Object(app\models\Solution), 32, 6, Object(yii\grid\DataColumn))
#3 /www/jnoj/vendor/yiisoft/yii2/grid/DataColumn.php(244): yii\grid\DataColumn->getDataCellValue(Object(app\models\Solution), 32, 6)
#4 /www/jnoj/vendor/yiisoft/yii2/grid/Column.php(111): yii\grid\DataColumn->renderDataCellContent(Object(app\models\Solution), 32, 6)
#5 /www/jnoj/vendor/yiisoft/yii2/grid/GridView.php(520): yii\grid\Column->renderDataCell(Object(app\models\Solution), 32, 6)
#6 /www/jnoj/vendor/yiisoft/yii2/grid/GridView.php(489): yii\grid\GridView->renderTableRow(Object(app\models\Solution), 32, 6)
#7 /www/jnoj/vendor/yiisoft/yii2/grid/GridView.php(353): yii\grid\GridView->renderTableBody()
#8 /www/jnoj/vendor/yiisoft/yii2/widgets/BaseListView.php(160): yii\grid\GridView->renderItems()
#9 /www/jnoj/vendor/yiisoft/yii2/grid/GridView.php(321): yii\widgets\BaseListView->renderSection('{items}')
#10 /www/jnoj/vendor/yiisoft/yii2/widgets/BaseListView.php(135): yii\grid\GridView->renderSection('{items}')
#11 [internal function]: yii\widgets\BaseListView->yii\widgets{closure}(Array)
#12 /www/jnoj/vendor/yiisoft/yii2/widgets/BaseListView.php(138): preg_replace_callback('/{\w+}/', Object(Closure), '{items}{pager}')
#13 /www/jnoj/vendor/yiisoft/yii2/grid/GridView.php(296): yii\widgets\BaseListView->run()
#14 /www/jnoj/vendor/yiisoft/yii2/base/Widget.php(140): yii\grid\GridView->run()
#15 /www/jnoj/views/solution/index.php(88): yii\base\Widget::widget(Array)
#16 /www/jnoj/vendor/yiisoft/yii2/base/View.php(336): require('/www/jnoj/views...')
#17 /www/jnoj/vendor/yiisoft/yii2/base/View.php(254): yii\base\View->renderPhpFile('/www/jnoj/views...', Array)
#18 /www/jnoj/vendor/yiisoft/yii2/base/View.php(156): yii\base\View->renderFile('/www/jnoj/views...', Array, Object(app\controllers\SolutionController))
#19 /www/jnoj/vendor/yiisoft/yii2/base/Controller.php(384): yii\base\View->render('index', Array, Object(app\controllers\SolutionController))
#20 /www/jnoj/controllers/SolutionController.php(45): yii\base\Controller->render('index', Array)
#21 [internal function]: app\controllers\SolutionController->actionIndex()
#22 /www/jnoj/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#23 /www/jnoj/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#24 /www/jnoj/vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction('index', Array)
#25 /www/jnoj/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction('solution/index', Array)
#26 /www/jnoj/vendor/yiisoft/yii2/base/Application.php(386): yii\web\Application->handleRequest(Object(yii\web\Request))
#27 /www/jnoj/web/index.php(12): yii\base\Application->run()
#28 {main}

滚榜的问题

  1. 如果发现某个题未被AC,则在滚榜的时候榜单会默认向左靠齐

正确的榜单

1818032100

滚榜时发现榜单
2061750682

  1. 滚榜的数据错位,缺少提交记录

MySQL版本
1276694679

polygon启动失败,Judge启动成功,相同配置。

配置信息

OJ_HOST_NAME=localhost
OJ_USER_NAME=***
OJ_PASSWORD=***
OJ_DB_NAME=***
OJ_PORT_NUMBER=3306
OJ_MYSQL_UNIX_PORT=/tmp/mysql.sock # MySQL 连接套接字路径
OJ_RUNNING=4            #最多同时判题数量
OJ_SLEEP_TIME=1         #通过轮询数据库发现新任务,轮询间隔的休息时间,单位秒
OJ_TOTAL=1              #老式并发处理中总的judged数量
OJ_MOD=0  #老式并发处理中,本judged负责处理solution_id按照TOTAL取模后余数为几的任务。
OJ_JAVA_TIME_BONUS=2    #Java等虚拟机语言获得的额外运行时间
OJ_JAVA_MEMORY_BONUS=64 #Java等虚拟机语言获得的额外内存
OJ_JAVA_XMS=-Xms64M
OJ_JAVA_XMX=-Xmx128M
OJ_SIM_ENABLE=0
OJ_SHM_RUN=1            #是否使用/dev/shm的共享内存虚拟磁盘来运行答案,如果启用能提高判题速度,但需要较多内存
OJ_LANG_SET=0,1,2,3
OJ_COMPILE_CHROOT=1

版本 0.9.0 (2019-04-22)
确认数据库账号密码没问题,因为judge能够启动。
调试模式信息
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) MySQL server has gone away Segmentation fault

BUG

为什么 不能滚榜 我已经按照教程操作了 为什么滚榜界面是空白的 谢谢帮助

404

oj.javiblog.top
在nginx下、centos
直接403,无论生么链接

无法使用注册功能

1.png
配置好所有内容后,只能登陆初始设置的管理员,无法使用注册功能,如何解决呢?

反馈一个Bug

在最新更新中,将题目设置为VIP私有时,问题列表中点击分类Tag时,这些VIP题目始终都会显示,正确时应该只显示Tag对应的题目。

一则说明:关于此项目的维护

本 OJ 当初只是因为本人不满市面上各开源 OJ 的功能、界面,而为学校比赛临时开发的,并已开源。目前,本 OJ 也有大大小小的学校,机构投入使用了,其功能也很好地满足校内举办比赛的需求或日常使用。但由于近期本人精力有限,不能持续为此投入工作。

特此相关说明:

  1. 此 OJ 会长期维护,这里的维护目前只限于修复 Bug,有 Bug 会第一时间修复
  2. 此 OJ 是否会增加新功能,可以说明的是近期不会。如果有功能需求也欢迎提 issue,虽然不一定能够增加。但日后有时间的话会满足。
  3. 若在 OJ 的部署或使用上有什么问题,欢迎开 issue 来提问,或者在项目主页底部提供的联系方式,以及我的主页所显示的邮箱,都能联系到我。

再提一个建议,不知道能不能实现。

现在提交了代码后,需要手动刷新才能看到提交结果,能不能加一个自动刷新的代码,比如3秒后通过AJAX刷新一次状态,检查到状态不是Pending后就停止刷新(或者简单的刷新2-3次就停止)。

功能建议:题目列表

1、提供通过率,便于累积历史数据,便于高水平选手选题
2、求支持多tag搜索,方便从内容,难度……等方面定义题目
3、OI模式下榜单显示,能不能按(第一次成绩/最高成绩/提交次数的方式显示)

反馈一个BUG

在输入样例2与样例3中,如果输入与输出的内容都是0的话,会不显示。

反馈一个BUG

作业与比赛中,当一个用户参加后,做了几个题目,然后管理员在后台将用户从作业或比赛中删除,这时进入作业的榜单就会出问题了,榜单网页直接崩溃了。

反馈一个BUG

将一个题目设置为“私有”时,如果再次进行编辑,在编辑界面中只有“可见”与“隐藏”选项,保存后就会默认变为“隐藏”了,不再是“私有”的状态。

作业功能出错

作业里发布作业后出现错误:Forbidden (#403) You are not allowed to perform this action.

BUG

验题一直pending.....

前台能正常提 后台验题一直run & judge

如果设置问题子任务则 前台能正常提交 后台验题一直run & judge Picture
去掉子任务就可以正常提交但是 之前的run & judge还是在run & judge
Picture
Picture
Picture
Picture
系统Ubuntu18.04 gcc7.4.0

发现2个BUG,反馈一下。

1.管理员创建作业后,普通用户可以直接进入作业,点击“问题”与“状态”时,直接网页异常。 需要先点击"参赛”后,才可以正常使用,也就是说进入作业时,少了一个判断是否已经参赛的过程。(同时感觉在作业中使用参赛,这个用词也不是太合适,比如改成我要参与应该会比较合适一些。)

2.创建在作业,管理员可以在后台“比赛”界面中删除,但是在删除时也会出现一个网页异常。

可能的评测bug(TLE->RE)

当程序运行时间超过时限两倍后,程序会被kill掉,此时应被判TLE,但是此时程序会被判RE。
环境 ubuntu18.04 自行安装g++ gcc最新版
返回信息:
Runtime Error:[ERROR] A not allowed system call.
Call ID:273

能把英文都汉化一下吗?

首先感谢开源了这么好的一个OJ系统,系统中的中英文混杂的情况比较多,有些可以直接在汉化文件中加入,其它一些在模板文件中可以修改,还是有不少没找到位置。

Java在64位系统评测机下会出现RE问题的解决方案

问题描述:

评测机系统:Centos7,64位系统。
经过测试,如果评测机系统为64为系统,则Java程序运行会报错RE。
1544547233 1
初步鉴定为目录/judge/src/okcalls64.h 文件中 24行中的

int LANG_JV[256] = {0,2,3,4,5,9,10,11,12,13,14,21,56,59,89,97,104,158,202,218,231,273,257,
		61, 22, 6, 33, 8, 13, 16, 111, 110, 39, 79, 302, SYS_fcntl,

缺少157参数。

解决方案

只需要将上诉代码加上157参数即可。如下代码:

int LANG_JV[256] = {0,2,3,4,5,9,10,11,12,13,14,21,56,59,89,97,104,157,158,202,218,231,273,257,
		61, 22, 6, 33, 8, 13, 16, 111, 110, 39, 79, 302, SYS_fcntl,

Bug: 关于题目统计页面

  • 同一个人通过多次将会反复出现在统计中
  • 无法按照代码长度排序
  • 按照内存排序有时会出问题

建议和BUG

建议:
1.希望能在OI赛制下添加选择是否实时评测反馈和公开实时榜单;
2.希望可以删除题目讨论;
3.希望可以增加邀请码注册或注册审核功能。

BUG:
在现有的OI赛制下比赛,选手可以通过状态页面的时间和内存消耗判断程序是否正常运行以及是否超时,建议在状态页面只显示 submitted。

在使用过程中遇到的一些问题

首先感谢开发者能够及时回应我的关于Special Judge的问题。
现在我想再提及一下另外几个我发现的问题(以及建议)。
1:在正式的ICPC比赛中,CE(编译错误)一般是不算罚时的,但经过测试,在比赛和作业中的CE,都算上了罚时
1544375250 1

2:oj上给予的spj的模板代码有问题。
先贴上代码:

#include <stdio.h>

#define AC 0
#define WA 1
#define ERROR -1

int spj(FILE *input, FILE *user_output){
    /*
      parameter:
        - input,your input file pointer
        - user_output,user output file pointer
      return:
        - if the answer is correct, return AC else return WA
        - if something unexpected happened in your judge function, you can return ERROR

      demo:

      int a, b;
      while(fscanf(user_output, "%d %d", &a, &b) != EOF){
          if(a -b != 3){
              return WA;
          }
      }
      return AC;
     */
}

void close_file(FILE *f){
    if(f != NULL){
        fclose(f);
    }
}

int main(int argc, char *args[]){
    FILE *input = NULL, *user_output = NULL;
    int result;
    if(argc != 4){
        printf("Usage: spj x.in x.out\n");
        return ERROR;
    }
    input = fopen(args[1], "r");
    user_output = fopen(args[2], "r");
    if(input == NULL || user_output == NULL){
        printf("Failed to open output file\n");
        close_file(input);
        close_file(user_output);
        return ERROR;
    }

    result = spj(input, user_output);
    printf("result: %d\n", result);

    close_file(input);
    close_file(user_output);
    return result;
}

经过测试(我的服务器建立的系统是在Centos 7),jonj的args[1]存放的是datain,args[2]存放的是dataout,args[3]存放的才是userout。因此如果采用上面的spj代码,评测机判题时会一直显示AC。(经过测试确实发现如果将args[2]作为userout,任何有dataout的代码都将AC,将args[3]作为userout才会正确判断)。
另外,关于上述spj代码,经过一系列的测试,还发现如下现象:
倘若在spj函数中含有fscanf的多组输入输出(即下面的代码)

while(fscanf(user_output, "%d %d", &a, &b) != EOF){
          if(a -b != 3){
              return WA;
          }
      }
      return AC;

则此时主函数的这个判断:

if(input == NULL || user_output == NULL){
        printf("Failed to open output file\n");
        close_file(input);
        close_file(user_output);
        return ERROR;
    }

就不会产生作用(即:在这种情况下只要不输出东西都可以AC)
经过测试,在单组输入的时候则不会出现上述问题。

3:点击提交代码后,出现的代码框的左边框时不时会加载不出来
1544375442 1

4:(Suggestion)在一般的区域赛中,封榜之后如果某队有提交,在选手的榜单上一般是以Pending图标表示,并显示目前提交的次数,希望也能够把这点在榜单中实现?

updata(12-10)

5-1:普通用户(非管理员)只能够通过 首页的Wiki-出题要求-Polygon System进入出题系统(即普通用户不能通过比较直观的方式进入Polygon System)
5-2(Suggestion):在Polygon System中,希望能够增加一个检索功能(方便管理员/出题人快速找到自己之前出题目)

6(Suggestion):在将题目拉入Contest(比赛)后,如果某题目未手动隐藏,则还是能够在问题列表中看到该问题,如果每次创建训练赛都进行手动操作可能会比较繁琐。希望能够增加如下功能:如果在比赛中创建训练赛,则题目自动隐藏,比赛结束后取消隐藏。

7:在Linux 环境下,倘若复制网站上的黑框代码,则再粘贴之后,会发现代码会被压缩成一行。
我个人在ubuntu 14.04,ubuntu16.04,ubuntu 18.04,Centos 7测试后发现这几个系统都会发生上述情况
而Windows下一切正常,Linux下如果复制本地编译器的代码则也是一切正常
webwxgetmsgimg


最后衷心祝愿JNOJ越来越好~~

在命令行运行 ./yii install 来安装 时 报错

root@ubuntu:/home/qwe/jnoj# ./yii install
================================================
 Jiangnan Online Judge Initialization Tool v1.0
================================================

   generate cookie validation key in config/web.php
   chmod 0777 runtime
   chmod 0777 web/assets
   chmod 0777 web/uploads
   chmod 0777 polygon/log
   chmod 0777 polygon/data
   chmod 0777 judge/data
   chmod 0777 judge/log

================================================
Run: ./yii migrate
================================================
Yii Migration Tool (based on Yii v2.0.15.1)

Error: could not find driver

================================================
Run: php socket.php start -d
================================================
PHP Fatal error:  Uncaught Error: Class 'PHPSocketIO\SocketIO' not found in /home/qwe/jnoj/socket.php:15
Stack trace:
#0 {main}
  thrown in /home/qwe/jnoj/socket.php on line 15

Initialization completed.

请问该如何解决……

OJ中的Special Judge无法得到正确的答案

经过尝试,发现现在的oj上的special judge功能貌似无法正常工作。
首先,现在我的jnoj是在centos 7系统下进行配置的,除了special judge外,判题一切正常。
我将某个基于hustoj搭建的oj上能够正常工作的spj加入到jnoj中,却发现jnoj会直接返回wrong answer
更有甚者,我将jnoj所展示的标准spj代码进行了如下修改后:

#include <bits/stdc++.h>
using namespace std;
#define AC 0
#define WA 1
#define ERROR -1

int spj(FILE *input, FILE *user_output){
    /*
      parameter:
        - input,your input file pointer
        - user_output,user output file pointer
      return:
        - if the answer is correct, return AC else return WA
        - if something unexpected happened in your judge function, you can return ERROR

      demo:
*/
      int a, b;
      while(fscanf(user_output, "%d %d", &a, &b) != EOF){
          if(a -b != 3){
              return WA;
          }
      }
      return AC;
}

void close_file(FILE *f){
    if(f != NULL){
        fclose(f);
    }
}

int main(int argc, char *args[]){
    FILE *input = NULL, *user_output = NULL;
    int result;
    if(argc != 4){
        printf("Usage: spj x.in x.out\n");
        return ERROR;
    }
    input = fopen(args[1], "r");
    user_output = fopen(args[2], "r");
    if(input == NULL || user_output == NULL){
        printf("Failed to open output file\n");
        close_file(input);
        close_file(user_output);
        return ERROR;
    }

    result = spj(input, user_output);
    printf("result: %d\n", result);

    close_file(input);
    close_file(user_output);
    return result;
} 

后用代码:

#include <bits/stdc++.h>
using namespace std;
int main()
{
	cout<<3<<" "<<0<<endl;
	return 0;
}

提交后发现仍然返回wrong answer。
我个人安装均按照了教程指引,现在请问一下是因为我的机子编译器的问题还是原本的spj的配置有有些漏洞呢?

建立训练场

能不能像洛谷那样建立一个训练场 ,新手试炼场这样的 分类 。

安装时,遇到问题

./yill install

提示:

Warning: Unexpected character in input:  '\' (ASCII=92) state=1 in /www/web/oj_xpuca_top/public_html/yii on line 23

Parse error: syntax error, unexpected T_STRING in /www/web/oj_xpuca_top/public_html/yii on line 23

还请问一下,这个是什么原因。

安卓错误

安装完成之后访问显示An internal server error occurred.

新年快乐,提个建议。

能不能在提交时右侧的提交记录与 所有用户的提交状态中,再添加一个得分的功能,通过就是100分,有部分错误时,也显示0分或30分等,这样就可以更清楚直观的了解解题后的总体情况。

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.