Code Monkey home page Code Monkey logo

project_lemonlime's People

Contributors

5ab-juruo avatar alphagocc avatar ancker-0 avatar codacy-badger avatar coelacanthushex avatar dust1404 avatar fossabot avatar github-actions[bot] avatar heliumoi avatar iotang avatar ksyx avatar kunoisayami avatar memset0 avatar mivik avatar registergen avatar strear avatar swiftqwq avatar woshiluo avatar xeonacid 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  avatar  avatar  avatar  avatar

project_lemonlime's Issues

各系统可用性报告

如在列表中未列出的系统(系统或版本不同)上正常使用,可在这里报告(也可直接 PR 对 README 的修改
如无法正常使用,请开新 issue 报告 bug

[Feature]能否增加自定义评分脚本功能

我希望根据通过测试点的数量给分。例如一共500个测试点,只要通过的测试点数目大于等于125个就能得100分,通过少于125个就不得分
这个应该不算难写,每评完一道题后把题目每个测试点的情况(测试点得分以及使用的时间/空间)写入一个文件,然后运行评分脚本就行

[BUG]测试时随机 WA

OS:windows10 x64 1909 (18363.1139)
通过 Release v0.2.7 下载 lemon-win-x64.ziplemon-win-x86.zip 均有此情况。

测试时随机 WA,从 WA 的信息来看大致情形是输出文件比答案文件短(显示第 1 行少或者某一个数字被截断)。对 std 进行测试十余次,每次 WA 的点都不同,基本排除 std 及数据问题。数据特征为输入或输出量较大,文件 IO。

尝试重启软件、重启系统,无效。

经过多次测试后复现概率降低,但仍有出现。

(曾经维护 lemonplus 时有人向我说过有莫名 WA 的问题,当时的单题重测就是为了这个开发的,但当时未复现,不清楚是否是同一个问题。)

暂不清楚其余系统是否存在这个问题。

qt.conf会导致运行时错误

运行时报错:

qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

[1]    29080 abort (core dumped)  ./lemon

将lemon文件移至其他文件夹即可正常工作。


https://github.com/iotang/Project_LemonLime/blob/99e560b349bb0db01b0d09b43f08ff4e278883b0/qt.conf#L5

原因应为qt.conf文件第五行限定的目录不一定能与当前操作系统适配(反正manjaro这儿跑不了)

建议移除。

ps: 在manjaro上能正常工作的Plugins目录为/usr/lib/qt/plugins(推测arch系都是如此)

[Feature]请求增加类似Cena的收取代码的功能

Is your feature request related to a problem? Please describe.
您的功能请求是否与某些问题有关?请描述。
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
毕竟OI比赛后,代码都是需要收取的评测机上进行评测的呀,所以不管什么类型的比赛,如果使用lemon评测,肯定会遇到收取代码麻烦 困难的情景啊QAQ,甚至很多教练采用Cena收取代码,Lemon评测的方式进行比赛。

Describe the solution you'd like
描述您想要的解决方案(没有也可)
A clear and concise description of what you want to happen.
添加类似Cena的通过网络收取源代码的功能。
事实上已经有人做过这件事情了,但是希望能够移植到这个项目,请参考 https://github.com/panda2134/LemonPlusClient

Additional context
补充内容
Add any other context or screenshots about the feature request here.

程序的运行时间波动非常大

  1. 程序的运行时间会严重受到电脑当时同步运行的程序的影响(关掉备份与同步程序之后,可能会快 1s 左右)
  2. 在同样的条件下,程序的运行时间也会有很大的波动。这个视频中,试题 tree 的配置为每个测试点时间 2250ms, 空间 1024MB,连续 4 次测试 std 的结果差异较大。视频链接

[BUG] 对 TLE 的判定似乎有一些偏差

如题,LemonLime 对 TLE 的判定似乎有一些偏差。

复现:

用如下代码做测试:

#include <bits/stdc++.h>

int n;

int main() {
	std::cin >> n;

	int ans = 1;
	for (int i = 1; i <= n; ++i) {
		ans = 1ll * ans * i % 998244353;
	}

	for (int i = 1; i <= 500000; ++i) {
		std::cout << ans << std::endl;
	}
}

调整 n 的大小使得该程序大概需要执行 1.5s(本机测试时取了 n=4e8)。

在 LemonLime 中开 2s 时限会得到 TLE,开 3s 时限会正常结束并且运行时间为 1.5s 左右。

若将 std::endl 换成 "\n",或只输出一个数时,一切正常。

无论是否使用标准输入输出都会得到以上结果。

测试环境为 Windows 10,MinGW 4.9.2 64-bit。LemonLime 为 Release 中的 lemon-win-x64.zip,版本为 0.2.6。配置为 C++11 O2。

[BUG] debian的包貌似有点小问题

系统:Ubuntu 20.04.1 Lemonlime:0.2.4

如果你安装了这个包,然后系统更新一下,然后...

你的Lemonlime没了!

这是因为这个包名字是lemon,ubuntu官方的软件源正好也有一个包叫lemon(当然这两个lemon完全不同),而且其版本号为3.31,比lemonlime的包"更新”!

所以系统误以为它们是同个软件包,只是版本不同,更新时会自动把这个lemon换成官方的软件源里的“假”lemon。然后,你的lemonlime会消失!

Like This:

望修复!

[BUG] Lost Configuration after upgrade

Is your feature request related to a problem? Please describe.
您的功能请求是否与某些问题有关?请描述。
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
希望可以将用户配置文件信息,即设置中的选项保存至用户文件夹.

Describe the solution you'd like
描述您想要的解决方案(没有也可)
A clear and concise description of what you want to happen.
本小白在升级Lemon_Lime的版本时直接替换文件夹会丢失数据和比赛历史记录.

Additional context
补充内容
Add any other context or screenshots about the feature request here.

[Feature] Increase the difficulty of Auto-AC or executing malicious code

Is your feature request related to a problem? Please describe.
您的功能请求是否与某些问题有关?请描述。

In low-grade classes or private "online" contests, some contestants might submit JudgeHackers and malicious code (although not likely), but the administrator will not have time to go through all codes to check if they're right.

JudgeHackers are programs that read the answer in the data directory and print it directly. It's obviously a type of cheating. Here's an example of JudgeHacker which still works with the 20200709 build.

Malicious code can be any system( ) code you care to name, for example, system("shutdown -s -t 0") shuts down the judger in Windows. They also work in LemonLime.

Describe the solution you'd like
描述您想要的解决方案(没有也可)

Suggested full fix

A full fix of this is a sandboxed environment. This looks difficult, but there's probably already some implementations on the Internet.

Temporary fixes

To increase the difficulty of using JudgeHackers, we can simply create the judgement directory outside of the contest directory, so the program won't be able to get the path of the data by retrieving CWD. However, JudgeHackers can still work if the contestant manages to predict the absolute path of the contest.

Another way of preventing illegal code is searching for keywords in a pre-compiled source code (however this fix is language-specific and not good for compatibility). Luogu used to do this, but failed.

Additional context
补充内容
Add any other context or screenshots about the feature request here.

在mac上无法编译

/Library/Developer/CommandLineTools/usr/bin/clang++ -c -pipe -stdlib=libc++ -std=c++11 -O2 -std=gnu++11  -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.11 -Wall -W -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/usr/local/Cellar/qt/5.11.2/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/qt/5.11.2/lib/QtGui.framework/Headers -I/usr/local/Cellar/qt/5.11.2/lib/QtNetwork.framework/Headers -I/usr/local/Cellar/qt/5.11.2/lib/QtCore.framework/Headers -I. -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AGL.framework/Headers -I. -I/usr/local/Cellar/qt/5.11.2/mkspecs/macx-clang -F/usr/local/Cellar/qt/5.11.2/lib -o advancedcompilersettingsdialog.o advancedcompilersettingsdialog.cpp
advancedcompilersettingsdialog.cpp:240:8: error: use of undeclared identifier 'location'
        if (! location.isEmpty())
              ^
advancedcompilersettingsdialog.cpp:242:3: error: use of undeclared identifier 'location'
                location = location.replace('/', QDir::separator());
                ^
advancedcompilersettingsdialog.cpp:242:14: error: use of undeclared identifier 'location'
                location = location.replace('/', QDir::separator());
                           ^
advancedcompilersettingsdialog.cpp:243:33: error: use of undeclared identifier 'location'
                ui->compilerLocation->setText(location);
                                              ^
advancedcompilersettingsdialog.cpp:259:8: error: use of undeclared identifier 'location'
        if (! location.isEmpty())
              ^
advancedcompilersettingsdialog.cpp:261:3: error: use of undeclared identifier 'location'
                location = location.replace('/', QDir::separator());
                ^
advancedcompilersettingsdialog.cpp:261:14: error: use of undeclared identifier 'location'
                location = location.replace('/', QDir::separator());
                           ^
advancedcompilersettingsdialog.cpp:262:36: error: use of undeclared identifier 'location'
                ui->interpreterLocation->setText(location);
                                                 ^
8 errors generated.
make: *** [advancedcompilersettingsdialog.o] Error 1

[Feature] Write the results to CDF file immediately after each judging.

It's useful when I forget to close the program but I want to share the contest directory with someone,
Or I don't want to close the program at now.
In previous versions,the cdr file may be recorded no results.
We can write the results to CDF file immediately after each judging,
then it will be easier to share the contest directory,I think.

建议不忽略分值为 0 分的测试点

如题,在测评含子任务捆绑的题目时,有时候子任务的测试点比较多,我想到这样一种实现方法。

测试点 1:apb.in.1b / apb.out.1b  0 分
测试点 2:apb.in.1c / apb.out.1c  0 分
测试点 3:apb.in.1d / apb.out.1d  0 分
测试点 4:apb.in.1a / apb.out.1a  10 分, 子任务依赖 1, 2, 3 测试点

理论上,这样就可以实现 1a, 1b, 1c, 1d 全部通过的情况下才可以拿到 10 分。

可是由于实际评测时 LemonLime 忽略了分值为 0 分的测试点(显示“被忽略”),导致无论能否通过 1b, 1c, 1d 测试点,只要通过了 1a 测试点,都可以拿到 10 分。

能否修改成不忽略分值为 0 分的测试点,使得这种子任务捆绑的实现方式能够正常工作呢?或者是否有更好的子任务捆绑的实现方式呢?

P.S. 有一种可能的方式是把总分分配到每个测试点上,如

测试点 1:apb.in.1b / apb.out.1b  1 分
测试点 2:apb.in.1c / apb.out.1c  1 分
测试点 3:apb.in.1d / apb.out.1d  1 分
测试点 4:apb.in.1a / apb.out.1a  7 分, 子任务依赖 1, 2, 3 测试点

但是如果点很多,每个点能分到的分数不足 1 分,似乎就不太行了;而且似乎也不太直观。

无法测评程序

一旦测评就会弹出
由于找不到libgcc_s_dw2-1.dll,无法继续执行代码,重新安装程序可能会解决问题。
TIM截图20200210133815

由于找不到libstdc++-6.dll,无法继续执行代码,重新安装程序可能会解决问题。
image

Deepin下编译错误

系统环境:Deepin15.11

gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)

qt5-default/lion,now 5.7.1+dfsg-10deepin amd64

build-essential/lion,now 12.3 amd64

编译时在judgingthread.cpp时报错

错误信息如下:

judgingthread.cpp: In member function ‘void JudgingThread::compareRealNumbers(const QString&)’:
judgingthread.cpp:696:85: error: call of overloaded ‘abs(long double)’ is ambiguous
   if (std::isnan(a) != std::isnan(b) || std::isinf(a) != std::isinf(b) || (abs(a - b) > eps && abs(a - b) > eps * abs(b)))
                                                                                     ^
In file included from /usr/include/c++/6/cstdlib:75:0,
                 from /usr/include/c++/6/bits/stl_algo.h:59,
                 from /usr/include/c++/6/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:94,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qchar.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:48,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qdatetime.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTime:1,
                 from judgingthread.cpp:29:
/usr/include/stdlib.h:735:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^~~
In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,
                 from /usr/include/c++/6/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:94,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qchar.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:48,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qdatetime.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTime:1,
                 from judgingthread.cpp:29:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~
judgingthread.cpp:696:105: error: call of overloaded ‘abs(long double)’ is ambiguous
 ::isnan(a) != std::isnan(b) || std::isinf(a) != std::isinf(b) || (abs(a - b) > eps && abs(a - b) > eps * abs(b)))
                                                                                                ^
In file included from /usr/include/c++/6/cstdlib:75:0,
                 from /usr/include/c++/6/bits/stl_algo.h:59,
                 from /usr/include/c++/6/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:94,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qchar.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:48,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qdatetime.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTime:1,
                 from judgingthread.cpp:29:
/usr/include/stdlib.h:735:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^~~
In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,
                 from /usr/include/c++/6/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:94,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qchar.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:48,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qdatetime.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTime:1,
                 from judgingthread.cpp:29:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~
judgingthread.cpp:696:120: error: call of overloaded ‘abs(long double&)’ is ambiguous
 (a) != std::isnan(b) || std::isinf(a) != std::isinf(b) || (abs(a - b) > eps && abs(a - b) > eps * abs(b)))
                                                                                                        ^
In file included from /usr/include/c++/6/cstdlib:75:0,
                 from /usr/include/c++/6/bits/stl_algo.h:59,
                 from /usr/include/c++/6/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:94,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qchar.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:48,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qdatetime.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTime:1,
                 from judgingthread.cpp:29:
/usr/include/stdlib.h:735:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^~~
In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,
                 from /usr/include/c++/6/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:94,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qchar.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:48,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qdatetime.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTime:1,
                 from judgingthread.cpp:29:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~
Makefile:1049: recipe for target 'judgingthread.o' failed
make: *** [judgingthread.o] Error 1

Test In Arch Linux @ 2020-2-22

我在2020-2-22于本人新安装的Arch Linux上进行了测试,目前看来功能一切正常

系统名称 版本号 位数 DE / WM
Arch 2020-2-22 64 KDE

另外我是来请罪的,因为某些愚蠢的原因,我将AUR上git包中的文件名写错,致使build failed,在此道歉,现已修复

[Feature] 增加命令行使用支持

Is your feature request related to a problem? Please describe.
您的功能请求是否与某些问题有关?请描述。
可以增加windows命令行使用支持吗?

Describe the solution you'd like
描述您想要的解决方案(没有也可)
比如启动时开启一个后台进程,留下一个pid文件,然后可以使用命令行操作比赛设置之类的
就是能使其他程序能调用lemon吗?

暗色主题增加需求

在 Linux Mint 上选了一个主题商城的暗色主题,果不其然评分界面亮度异常的高,眼睛不好的群众表示瞎了。而且感觉字体灰度比较低所以不太容易看清。

效果图:

TIM图片20200225214722.png

最新发现的一个 bug 是超链接因为颜色过深也会增加阅读难度?

TIM图片20200225221456.png

0.2.2版本 Deepin V20编译报错

报错信息:
CMake Error at CMakeLists.txt:16 (add_subdirectory):
The source directory

/home/zly/Downloads/Project_LemonLime-0.2.2/singleapplication

does not contain a CMakeLists.txt file.

-- Configuring incomplete, errors occurred!
See also "/home/zly/Downloads/Project_LemonLime-0.2.2/CMakeFiles/CMakeOutput.log".
漏提交文件了?

[BUG] 无法使用标准输入输出

Describe the bug
描述一下这个 Bug
无法使用标准输入输出

To Reproduce
如何复现
Steps to reproduce the behavior:
Ubuntu 系统下,建立题目,选中定向到标准输入和输出,添加测试点,测试,提示超出时间限制,换成文件输入输出则正常。未使用任何快速读入,只使用 scanfprintf 读入输出。

Expected behavior
期望获得的结果
正常评测。

Screenshots
有截图吗?
试题配置

评测失败

Version:

  • Version: 0.2.6:64
  • Linux: Ubuntu 20.04.1 LTS / Linux version 5.4.0-54-generic (buildd@lcy01-amd64-024)

Additional context
也许可以补充些其他信息?

测试输入

1 2

测试输出

3

测试程序

#include <cstdio>

int main() {
	int a, b;
	scanf("%d%d", &a, &b);
	printf("%d\n", a + b);
}

希望可以自定义工作目录

新建比赛的时候,填上保存文件名就在下面自动填充工作目录,每次都是主文件夹,希望可以自定义这个目录

[Feature] 建议增加WSL支持

emm 帮机房某位提的问题

他希望能使用win下的Lemonlime,用WSL里的编译器编译源码,并且在WSL中运行程序

不太清楚直接用命令wsl g++ .......这样是否可行(我觉得他应该不会想去装GUI)

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.