ngsankha / codejudge Goto Github PK
View Code? Open in Web Editor NEWhost coding competitions anywhere, anytime
Home Page: http://sankhs.com/codejudge
License: MIT License
host coding competitions anywhere, anytime
Home Page: http://sankhs.com/codejudge
License: MIT License
A live notification system should be there on Codejudge. It may use the technique of AJAX to give live notifications. Maybe all the notifications can be collected in a notification center like page.
Notifications can be of different types like:
Codejudge has grown bigger, and we need a test suite to prevent new bugs from creeping in.
I am considering the use of Selenium to write the test suite for Codejudge.
Hi, I noticed when we want to create a problem, one Enter is not enough to create a newline, so I must press Enter button twice. In problem.php, I tried to change <?php echo($selected['text']);?>
to <?php echo( <pre>".$selected['text']."</pre>");?>
, so we can display the preview as we type.
And in index.php, I tried to change echo($out);
to echo("<pre>".$out."</pre>");
. But there's a problem, it automatically convert twice Enter into p HTML tag, so there's extra newline. How to remove the p tag?
Hello!
How can I compile Java files and use them on a hosting?
Aah, I had cloned your repo a long way back. I see quite a few developments, this summer.
One thing I felt about the latest codejudge is you can use a date time picker for starting and closing event. I used one in mine. Saves a lot of work for the admin!
http://tarruda.github.io/bootstrap-datetimepicker/
I used the above one. If I find time I'll submit a pull request.
Cheers \m/
hello sir
please tell me installation process of code judge step by step.
Users will find it more comfortable to code on the platform with a syntax highlighter.
A blog should be added to Codejudge, to announce any latest changes, updates or announcements to the event being organised.
The blog can be simple Markdown flavoured allowing comments from the registered users.
I cant start compiler which written in Java and how to integrate both of them to each other and run server. thank for your help
Add the support for the following languages:
Bug reported by Shivendra Pal Singh:
I cannot get past the issue whenever a new problem is updated and if a user tries to solve it, it shows submission time is closed. Apparently when new problem is added it is not updated in the database,i have beeen trying to rectify this,can you please help?
Additional information reported:
After you updated the scoring scheme,install.php was unable to update the database with "event" information.
Null array was returned when later on the record was fetched by update.phpAn INSERT QUERY had to be modified in install.php for it to work back to normal
The direct input of the Filename
box is taken into compile.sh
script file. By specially writing the filenames it is possible execute arbitrary shell commands on the server. This is a serious security flaw and should be fixed immediately.
The possible solutions are:
space
or ;
, etc. are not in the filename.Main
.Current Status: The data is piped via a socket to the Java process from PHP, after it is read from the database. This is the performance bottleneck.
Expected: Java should read directly from MySQL. This will remove the total transfer layer from the PHP to Java process altogether.
Hello!
Can you provide ready jar file which can be used?
The output of Codejudge never matches to the real output and hence marks a correct program wrong. This is because of eval.php
in which between each line a \n
is added. Hence the resultant output does not match.
Any registered user can login at any moment even before the start of any competition to see and start solving the problems. There is currently no mechanism provided by the system that can help prevent do so.
What I propose is a Start Contest
check box on the admin panel so that once it is check all the problems become visible otherwise, any logged in user before the contest starts will see some message like The contest has not started yet.
or so on.
There is an problem while registering for new user in codejudge. It gives error even if filled all the details that are needed to create the account. It gives an error as "Please enter all the details asked before you can continue!" The values are not stored in the database while registering even i gave my database root access. Please reply as soon as possible. need to resolve this quickly. And there is another issue of compiling the program. The submit button does not work.
Currently any program that is executed under Codejudge is running under the access privileges of the user. So it is possible to create a malicious program that can damage the user's data or the system. One way would be to create a chroot
ed environment in which the program is run so that it cannot access any outside files.
In such a case one needs to modify the classes ( yes, and not the Language
interface) that implement each particular language.
There needs to be form on the admin panel to fill in the formula for calculating the score. The admin can fill any formula of his choice and it will be used by Codejudge to calculate the rank the players accordingly.
Firstly, I must say your online judge project is amazing. I learned the concept. But when I ran your project, it crashed my system.
When I ran the following code:
#include<iostream>
using namespace std;
int main() {
int test,i;
while(test--) { //Didn't take the value of testcase.so infinite loop
cin >> i;
i = i * (i + 1) / 2;
cout << i;
}
return 0;
}
The stage folder for the above running occupied 12.4 GB of file. Since the above code filled the out.txt
file with i
values.
So, how can I overcome it?
Also, how can I use sandbox with your project? I have no idea at all about integrating sandbox to your online judge.
Plus,What if I run a fork infinite time on your online judge.The Computer that runs compiler server will definitely crash due to infinite number of process created.So, try to overcome this issue too.
A forum should be there to post any issues or doubts by the participants during the contest. A discussion forum will facilitate activity among the users to discuss doubts about the problems in the contest.
Currently there is no timer implemented in the Codejudge Compiler Server Java code. Thus the eval.php
file will not return if somebody submits a program that takes very long to complete or infinite time to complete.
Thus a timer needs to implemented, that will run the program for a specified maximum time only. If the program takes more than that it will be terminated and the user will be shown an appropriate message. Things required to implement it are:
problems.php
.eval.php
.A useful feature that is helpful when organising contests is to know who submitted a solution first to decide upon the winners.
Codejudge should have a system to store the timestamp at which a program was submitted to facilitate the judging process.
Your codejudge-compiler is very slow, if the input test files is around 10 MB. Its quite faster for the small test files(1 MB-2 MB), however the judge becomes very slow for large inputs. For 10 MB input files, i remember i have to wait 10 mins to get a judge verdict.
I went through your code, and changing one line , made the judge amazingly fast.The 10 minutes waiting time got reduced to 5 sec (Isn't it amazing - 1000x times faster) - In codejudge-compiler/src/codejudge/compiler/RequestThread.java
file: Don't use +
operator for concatenating lines. Instead take a string builder and concatenate lines using Java inbuilt 'append' function and at last convert the string builder to string(the return type of the function).
Further optimization:
Try to use Java as much as possible, as Java is 4x times faster than PHP. For example, try to compare the expected and user output only in Java, instead of receiving the entire user program output through socket and comparing it with official output in PHP.
If the admin adds a problem and the user submits a solution to it and it is correct he gets a solved tag. But later when the admin removes the old problem and adds a new one, then the old solution is taken to be the solution of the new problem and if the old solution is correct then the new problem is also marked correct.
I have doubt, while executing, the judge considers the total time spent by the process or the time spend by the process in CPU. ideally it should be the second one.
Giving names to files (other than Java) is unnecessary. What i propose is that the file name dialog should only appear in case of submitting a java file. Or better, inform the user to name his/her class "Solution" or something like that..
Currently the pages in which the problem will be added and the page where the solutions can be submitted have text-boxes that are non-responsive in design. That is they will not adjust to a variety of devices and screen sizes. It needs to be fixed.
Relevant sources are in admin/problems.php
and solve.php
. Preferable way to solve them would be adding the Bootstrap API's span
classes instead of the fixed width that are currently defined.
Replication of the problem:
Result: The entry is still in the list of his attempted problems. But the name of the problem does not appear.
Ideally speaking in install.php while creating the prefs table, start and end should be datetime format and not int(11) .
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.