shi-yang / jnoj Goto Github PK
View Code? Open in Web Editor NEWJiangnan Online Judge
Home Page: https://www.jnoj.dev
License: Other
Jiangnan Online Judge
Home Page: https://www.jnoj.dev
License: Other
在后台编辑题目时, ck-editor中的中文内容,按一下BackSpace退格键后,会一下删除2个中文内容,非常的不习惯。
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}
目前可以查看错误测试点
但是如果数据量太大,无法展示完
求错误测试点下载功能
配置信息
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
为什么 不能滚榜 我已经按照教程操作了 为什么滚榜界面是空白的 谢谢帮助
oj.javiblog.top
在nginx下、centos
直接403,无论生么链接
如何增加新的编程语言如FreeBASIC,判题机要怎么改?
用户名一般都为英文,没有辨识度。
应该要显示代码的把
导入从hustoj导出的题目,数据均缺少sample.in 和sample.out
在最新更新中,将题目设置为VIP私有时,问题列表中点击分类Tag时,这些VIP题目始终都会显示,正确时应该只显示Tag对应的题目。
本 OJ 当初只是因为本人不满市面上各开源 OJ 的功能、界面,而为学校比赛临时开发的,并已开源。目前,本 OJ 也有大大小小的学校,机构投入使用了,其功能也很好地满足校内举办比赛的需求或日常使用。但由于近期本人精力有限,不能持续为此投入工作。
特此相关说明:
现在提交了代码后,需要手动刷新才能看到提交结果,能不能加一个自动刷新的代码,比如3秒后通过AJAX刷新一次状态,检查到状态不是Pending后就停止刷新(或者简单的刷新2-3次就停止)。
1、提供通过率,便于累积历史数据,便于高水平选手选题
2、求支持多tag搜索,方便从内容,难度……等方面定义题目
3、OI模式下榜单显示,能不能按(第一次成绩/最高成绩/提交次数的方式显示)
在输入样例2与样例3中,如果输入与输出的内容都是0的话,会不显示。
作业与比赛中,当一个用户参加后,做了几个题目,然后管理员在后台将用户从作业或比赛中删除,这时进入作业的榜单就会出问题了,榜单网页直接崩溃了。
将一个题目设置为“私有”时,如果再次进行编辑,在编辑界面中只有“可见”与“隐藏”选项,保存后就会默认变为“隐藏”了,不再是“私有”的状态。
就是说那种一个点10分那种算分方式和算分赛制。。
作业里发布作业后出现错误:Forbidden (#403) You are not allowed to perform this action.
验题一直pending.....
contest_announcement这张表中的主键是contest_id,导致一场比赛只能发一条公告
1.管理员创建作业后,普通用户可以直接进入作业,点击“问题”与“状态”时,直接网页异常。 需要先点击"参赛”后,才可以正常使用,也就是说进入作业时,少了一个判断是否已经参赛的过程。(同时感觉在作业中使用参赛,这个用词也不是太合适,比如改成我要参与应该会比较合适一些。)
2.创建在作业,管理员可以在后台“比赛”界面中删除,但是在删除时也会出现一个网页异常。
当程序运行时间超过时限两倍后,程序会被kill掉,此时应被判TLE,但是此时程序会被判RE。
环境 ubuntu18.04 自行安装g++ gcc最新版
返回信息:
Runtime Error:[ERROR] A not allowed system call.
Call ID:273
你好,请问一下为什么我按照教程安装完之后没有site目录呢?
服务器返回的是404错误http://oj.noncoeur.com/jnoj/web/site/index
我点击这个页面里面所有的东西都是404http://oj.noncoeur.com/jnoj/web/
请问系统的环境是ubuntu的哪个版本还是其他的系统?
管理员创建的作业,普通用户进入后,标题上还是显示有“设置”功能,点击后会网页异常。
首先感谢开源了这么好的一个OJ系统,系统中的中英文混杂的情况比较多,有些可以直接在汉化文件中加入,其它一些在模板文件中可以修改,还是有不少没找到位置。
功能建议: 在比赛或者小组作业中 可以限制题目使用什么语言进行提交
评测机系统:Centos7,64位系统。
经过测试,如果评测机系统为64为系统,则Java程序运行会报错RE。
初步鉴定为目录/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,
某些机器上出现的。暂未能重现该问题。
建议:
1.希望能在OI赛制下添加选择是否实时评测反馈和公开实时榜单;
2.希望可以删除题目讨论;
3.希望可以增加邀请码注册或注册审核功能。
BUG:
在现有的OI赛制下比赛,选手可以通过状态页面的时间和内存消耗判断程序是否正常运行以及是否超时,建议在状态页面只显示 submitted。
首先感谢开发者能够及时回应我的关于Special Judge的问题。
现在我想再提及一下另外几个我发现的问题(以及建议)。
1:在正式的ICPC比赛中,CE(编译错误)一般是不算罚时的,但经过测试,在比赛和作业中的CE,都算上了罚时
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)
经过测试,在单组输入的时候则不会出现上述问题。
4:(Suggestion)在一般的区域赛中,封榜之后如果某队有提交,在选手的榜单上一般是以Pending图标表示,并显示目前提交的次数,希望也能够把这点在榜单中实现?
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下如果复制本地编译器的代码则也是一切正常
最后衷心祝愿JNOJ越来越好~~
现在的首页上的信息比较少,利用率比较低,能不能像http://ybt.ssoier.cn:8088/的首页一样,可以添加一个下拉菜单系统,直接在首页上显示分类的题目,这样在学校中使用会更方便一些。
一步一步按照 安装教程
先安装了 LAMP 然后一步一步安装。
但是 ./yii install 没有报错。但之后访问 http://localhost/jnoj/web/ 显示
Not Found
The requested URL /jnoj/web/ was not found on this server.
Apache/2.4.18 (Ubuntu) Server at 127.0.0.1 Port 80
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功能貌似无法正常工作。
首先,现在我的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.
建议增添创建者和OJ管理员可以删除小组操作
能不能在提交时右侧的提交记录与 所有用户的提交状态中,再添加一个得分的功能,通过就是100分,有部分错误时,也显示0分或30分等,这样就可以更清楚直观的了解解题后的总体情况。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.