Giter Site home page Giter Site logo

codejudge's People

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codejudge's Issues

Scoring System for Codejudge

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.

Non responsive design in 2 pages

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.

Blog to announce updates to events

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.

Sandbox missing

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.

Deleted problem's solution is assumed to be a new problem's solution

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.

Discussion Board to discuss problems

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.

installation

hello sir
please tell me installation process of code judge step by step.

The filename box can be exploited to execute shell commands

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:

  • Check for the correctness of the filename. Make sure that special characters like space or ;, etc. are not in the filename.
  • Remove the filename box altogether. In such a case for the language Java, the users have to submit their code in only a single class name possibly something like Main.

Submission time closed for newly added problem

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.php

An INSERT QUERY had to be modified in install.php for it to work back to normal

Start Competition option missing in Codejudge

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.

Date-Time Picker

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/

Test Suite for Codejudge

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.

how to start java compiler app?

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

Program should run in a secure chroot

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 chrooted 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.

Java should read directly from MySQL

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.

Judge uses CPU time or total time?

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.

File Name not required (except for Java)

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..

Codejudge should have a live notification system

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:

  • A new announcement is made in the blog about the event. All participants can be notified as soon as the announcement is made.
  • Some new comment appears on the discussion forum post for which the user is subscribed to. So he/she can be notified and they can reply back immediately.

Java

Hello!

How can I compile Java files and use them on a hosting?

Add a timer when checking solutions

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:

  • Maximum time that will be allowed for each problem should be specified in the Problems page, ie. problems.php.
  • Appropriately update the Codejudge Compiler Server's Java code.
  • Define error signals in the Java source if the program terminates prematurely and accordingly update eval.php.
  • Store the time taken by each solution in database so that it can be used in the calculation of scores.

Syntax Highlighter

Users will find it more comfortable to code on the platform with a syntax highlighter.

Newline Problem

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?

Slow performances on large input test files.

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.

Deleted problems still leave their entry in users database

Replication of the problem:

  1. Add a problem. Let some users submit solutions for it.
  2. Go to the admin panel and delete the problem. Then click on Users on the navigation bar.
  3. Click on any user that submitted the solution for that problem.

Result: The entry is still in the list of his attempted problems. But the name of the problem does not appear.

Problem registering new user.

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.

Output is not matching in case of multi-line output

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.

Jar file

Hello!

Can you provide ready jar file which can be used?

Config of prefs table

Ideally speaking in install.php while creating the prefs table, start and end should be datetime format and not int(11) .

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.