vfleaking / uoj Goto Github PK
View Code? Open in Web Editor NEWUniversal Online Judge
License: MIT License
Universal Online Judge
License: MIT License
交互题究竟有什么黑科技导致其文档一直坑着.....
捆绑测试的搞法还是从民间学来的......
UOJ是个好OJ但是没有文档就比较haha了......
据报告在前面加 /* xxxxxxxx */ 形式的注释会出 bug,待证实
程序在申请内存时,被操作系统拒绝,malloc返回NULL。一般选手程序不会对申请失败进行判断,从而导致了RE而不是MLE
服务器把“需要倒计时多长时间”给传过来,但网络延时比较严重时就会导致客户端收到的时候已经晚了。。
作为比赛结束的倒计时出现时,可能导致选手未能及时提交程序
把UOJ集成到ubuntu中做成iso,这样装好系统之后就可以直接运行了。
如果列表中使用Java的人超过一定数量就会导致评测结果全都是Runtime Error,并且错误详情显示:
Error occurred during initialization of VM
java.lang.OutOfMemoryError: unable to create new native t...(thread被省略掉了)
出现错误时,所有用户提交的Java代码均为0分,只有重启docker容器才能解决(平均每20次左右的Java提交就会出现一次这种错误)。
应该是BUG,很影响使用,建议尽快拿出解决方案QWQ
rp_children[n_rp_children].mode = -1
and rp_children[n_rp_children].mode = 0
代表什么?此处没看懂
求助~我想搭建一个在线运行代码
按照标准安装完,修改配置到内网IP裸奔模式,注册和登陆界面都显示“页面已过期”,怀疑csrf问题?
请问是什么原因导致的?
如何修复?
不知道是哪里姿势不太对,今天新建好的image放在container里run之后,注册时提示“页面已过期”。后来蜜汁没有这个问题了...但是登录不上去(也是“页面已过期”)
By the way: 在a9f1af7 这个commit之前的代码没有这个问题....
FYI: 看似是cookie出现了些神奇的问题....(同学用ubuntu是ok的,服务器端注册是不ok的;我的MacBook也是有问题的...)
将题目内容和测试用例文件压缩到一个文件中,然后可以导出和导入。
初步设计
problem.json
和一个文件夹problem.json
是题目的内容,比如{"title": "some title", "time_limit": 1000, ......}
1.in 1.out
In /judge_client/1/uoj_judger/include/uoj_env.h (Source file) ,you include uoj_work_path.h .
However, there's no "uoj_work_path.h" in your repo.
Plz fix it @vfleaking
绑定域名后,非80端口映射出来访问blog的时候404,而80端口一切正常。
所有的
e.g.炫酷反演魔术
好像是用的mathjax cdn炸了
当hack的点非常小时,如果重测只测这个点,0ms就可以测完,所以几秒就可以重测完所有程序。但是每次有人用小hack点去hack时,总会测很久。是不是因为重测了所有的点?
文档可以全部编辑在wiki中 而且用clone也很方便
个人认为文档可以不必放在uoj源代码中
in http://vfleaking.blog.uoj.ac/blog/7 ,these is a link in 我就只介绍最基本的功能好了。其它的自己探索吧~比如[这里]。
。This link is invalid, and can jump to a magical website. Some open source versions seem to be affected.
如果评论里的回复多于一页,能在每次翻页的时候都加载Mathjax吗?
比如说最近的一个post http://a1b3c7d9.blog.uoj.ac/blog/5208
我(r_64)的回复底下的评论超过了一页,翻页的时候第二页里的Mathjax就渲染不出来了,看到的是字符串$O(n^2)$
而不是Mathjax公式O(n²)。第二页翻回第一页的时候也有这样的问题:(
现在UOJ博客/题面的Markdown不太支持表格,像咸鱼一样。
主要是合并单元格等需求的锅。。。
总是显示
make: *** No targets specified and no makefile found. Stop.
使用docker安装后提交java代码显示
Error occurred during initialization of VM
java.lang.OutOfMemoryError: unable to create new native t...
代码:
import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
while(in.hasNext())
{
int a = in.nextInt();
int b = in.nextInt();
System.out.println(a+b);
}
}
}
今日接管了学校的远古部署的 UOJ,试图寻找导致多年来评测机卡顿的原因。
当初没有接管的时候认为是机房电脑过烂,导致评测速度慢,后来发现评测时总是单个 CPU 100%。
通过 top 发现 UOJ 评测时主要有两个进程:Answer 和 mysqld。
后来发现 Answer 其实并不咋占用 CPU 资源,于是进了 mysql,show full processlist; 后发现是用户点击提交后会通过查询 submissions 以检查评测状态:
| 49814 | root | localhost:46186 | app_uoj233 | Query | 3 | Sending data | select count(*) from submissions where ((submissions.problem_id in (select problem_id from team_plist where (team_id = 6 or team_id = 0))) and (submissions.problem_id in (select id from problems where is_hidden = 0))) or (submissions.problem_id in (select problem_id from problems_permissions where username = 'yzxoi')) |
| 49815 | root | localhost:46190 | app_uoj233 | Query | 2 | Waiting for table level lock | update submissions set judge_time = now(), status = 'Judging' where id = 41080 and status = 'Waiting' |
然而由于多年的积累,submissions 表中已经有大量的内容,而又不想删除这些宝贵的提交记录,故求一种可以解决的办法。
恳求大佬们解决。
一开始使用Outlook.com邮箱(强制STARTTLS),发送失败。
然后使用189.cn的邮箱(可选加密),使用非加密的端口,发送失败。
配置全部检查过去了,相同的账号和配置放到foxmail里面可以正常使用。
对于一般的测试点,是否可以考虑像luogu或者syzoj一样,直接上传数据点不用配置文件?
vfk大大把交互题的文档写好后,我尝试去加交互题,但是有一个比较蛋疼的问题就是我的交互库使用了多线程来评测结果......
g++ 4.8.4中开启了-std=c++11
后,虽然可以使用<thread>
,可以编译通过,但是一但运行线程就会被abort
掉,然后在评测结果里的表现就是Dangerous Syscall
。
为了使g++ 4.8.4真正支持多线程,需要加上-pthread
参数。
另外想知道如何手动更新judge_client
......我们找到了judger的编译文件的地方,修改了编译参数,但是make
后好像没效果......
给一个多线程的样例程序:
#include <cstdio>
#include <cstdlib>
#include <thread>
using namespace std;
int main() {
thread t([]() {printf("OK\n"); exit(0);});
t.join();
return 0;
}
编译
g++ www.cpp -std=c++11 -pthread
还有些锅解决之后才能把uoj代码传上来
匹配表达式是^domain|127.0.0.1$。优先级问题,导致domain后加几个字符也能匹配成功(目测)。
这样可以更加直接和方便地对题目进行吐槽吧。
毕竟好评和差评都只算是态度,而没有机会说为什么。
个人认为的话 对于普通的小学校 java并不是学习的主流吧 所以... 似乎也并没有必要列到默认的安装上?
hacker提交的测试数据太大导致超过apache post文件的限制,加数据的请求被服务器拒绝
我没有找到SMTP的端口设置……
FILE app/models
:
<?php
require $_SERVER['DOCUMENT_ROOT'].'/app/vendor/phpmailer/PHPMailerAutoload.php';
class UOJMail {
public static function noreply() {
$mailer = new PHPMailer();
$mailer->isSMTP();
$mailer->Host = "smtp.qq.com";
$mailer->SMTPAuth = true;
$mailer->Username = UOJConfig::$data['mail']['noreply']['username'];
$mailer->Password = UOJConfig::$data['mail']['noreply']['password'];
$mailer->setFrom(UOJConfig::$data['mail']['noreply']['username'], "UOJ noreply");
$mailer->CharSet = "utf-8";
$mailer->Encoding = "base64";
return $mailer;
}
}
SMTP的默认端口是25
,然而QQ邮箱的端口是465
……
所以我如何把邮件的端口改成465
?
(uoj好大一口锅
如果我没有看错的话,当选手提交后,为了达到实时更新的效果,目前uoj采取的方法是每500ms访问一次/submission/xxxxx?get=status-details
(这里xxxxx
表示提交的ID),直到"judged":true
。
我觉得在比赛的时候,会有一大堆waiting,这时候请求是非常频繁的,不妨尝试codeforces的方法,使用nginx-push-stream-module。感觉上可以减轻服务器负担。
按照教程搭建之后,进入127.0.0.1,发现网站无法正常显示,点击“注册“后,显示
找不到 local_uoj.ac 的服务器 IP 地址。
请问是什么情况?
由于 Linux 等系统上没有好的中文字体,并且不知道 chrome 什么鬼不使用伪粗体,导致部分地方 UOJ 的粗体字体显示很奇怪。
求拯救,我今天才发现这个 bug。
我的 Ubuntu 14.04 和安卓手机上均出现了这个问题
http://uoj.ac/submission/99424
使用Python 3,导入了decimal
库。出现了Dangerous Syscall。
使用Python 2.7没有问题。
这是为什么......
import decimal
a, b = raw_input().split()
a = decimal.Decimal(a)
b = decimal.Decimal(b)
context = decimal.getcontext()
context.prec = 2333
decimal.setcontext(context)
print(a + b)
如何使非管理用户无法查看别人的提交代码呢?
现在默认只能用www.abc.com
之类的访问,但是想再加个后缀/oj
。不知道能否通过配置实现?
这么做的原因是这样的:我们主机上只有一个域名用来放实验室主页。我们要再同一个主机上放uoj
,但显然只能用www.abc.com/oj
这样的域名。我们做法是把uoj
运行在81端口,然后用apache把www.abc.com/oj
的请求转发给81端口。
然而由于路径依赖有问题:里头有很多路径如css,js是按照绝对路径www.abc.com/css
, www.abc.com/js
来找的,那样子就不会被apache转发了。
即使解决css,js的路径问题,也不知道有没有其他问题。
希望作者能帮帮忙,提供一些解决方案或者建议?
本地svn commit后(使用提供的第一个a+b的例子)点击题目页面上的与”svn仓库同步“,返回“file problem.conf not found”。 后台显示/var/svn/problem/1/cur/1 内包含所有上传的文件(包括problem.conf)。求助!
您好,请问为何我自己在虚拟机的docker中搭建的uoj在每次提交后都显示Compiler Time Limit Exceeded但在进入docker内使用uoj相同的编译命令编译相同的文件却没有问题
谢谢
您好,可以给一个自己构建镜像的方式吗,谢谢
我希望能在arm平台下搭建这个OJ
Thanks to @TRCYX
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.