Source code online sources java

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Online Code Checker and Compiler in Java

License

joney000/Online-Code-Checker-and-Compiler-Java

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Online Code Checker and Compiler in Java : CodeOj ( codeoj.com )

Online Code Checker and Compiler system ( formally CodeOj / Code Online Judge ) is java based automated testing system to check the Algorithmic skills of the user providing a platform to compete with large no of software developers.

It develop «Fast & Furious» attitude to the coders to be Accurate and Efficient in coding. It will enhance the speed of hiring procedure. Recruiters can assign hiring coding task and schedule the event as per their suitability. Moreover the project can be used for educational purpose for students around the world learning competitive programming.

Quality Attributes of the Software :

  • Scalable and high performance : Concurrent requests optimization.
  • Java8 with Database Independence Software System.
  • Study of component based reliability modeling on code checker System with the study of code checker’s component use factor / component use ratio.
  • Extensible, Simple and Easy to use [web / desktop] Interface : Easily configurable at local or web.
  • Fully Automated Event/Creation, Judging & result preparation, result statics.
  • Assigning and dynamic update of user ratings as per their overall performance.

CodeOj follows the concept of «Data independence» which is the type of data transparency that matters for a centralized DBMS. It refers to the immunity of user applications to changes made in the definition and organization of data. Physical data independence deals with hiding the details of the storage structure from user applications.

CodeOj allows you to use whichever database you want to use or at any stage of development process you can change the DB.

CodeOj uses a number of open source tools and technology to work properly:

  • Java8 — Open JDK.
  • Ace Editor — Awesome web-based text editor
  • Hibernate ORM — A Java based ORM providing several features of data persistence like object caching, mapping etc.
  • Twitter Bootstrap — UI boilerplate for modern responsive web apps
  • JUnit — Unit tests in Java
  • chroot «jail» — Sand-boxing / virtualization of computing node
  • Database — Initially MySQL but you are free to use any open source DB.
  • Python — for running core checker script.
  • jQuery — UI JS

And of course CodeOj itself is open source with a public repository on GitHub.

You need Gulp installed Open source IDE Netbeans v7.x+ with Tomcat server.Download here and follow installation instruction.

A. Install MySQL Server : ( You can go with any other relational databases like DB2 etc. )

$ sudo apt-get install mysql-server $ sudo service mysql start # start mysql server $ mysql -u root -p # login with username and password $ create database codeoj # create a database In the mysql shell : mysql> CREATE USER 'admin'@'localhost' IDENTIFIED BY 'some_pass'; mysql> GRANT ALL PRIVILEGES ON codeoj.* TO 'admin'@'localhost' -> WITH GRANT OPTION;

B. Install Linux, Apache, MySQL, PHP (LAMP) Stack : please follow the link for detailed instruction.

Install git and perform following commands for set up the CodeOj repo:

$ git clone https://github.com/Online-Code-Checker-Java $ cd codeoj $ chmod -R 777 codeoj $ sudo apt-get install python-psutil $ sudo apt-get install python-mysqldb

Then specify the path of «web» folder to the path variable in src/java/connection/Path.java file.

static String path = "path/to/codeoj/web";

and set the database configurations in in src/java/connection/Config.java file

String url = "jdbc:mysql://localhost:3306/codeoj"; //Set up Database server location URL , Port No , Database Name String user = "USERNAME"; // Set MySQL(or your DB User) String pass = "PASSWORD"; // DB password

also set the database configurations in web/judge.py file

db = MySQLdb.connect("localhost","USERNAME","PASSWORD","codeoj")

CodeOj is currently extended with the following languages, so you have to install their respective compilers in your run environment.

E. Configuring CHRoot (Sand-boxing in Linux environment ) :

Sand-boxing provides security by creating a restricted environment for the execution of user’s source code for various languages.

  • It disable the system calls : user’s source code can initiate system calls which can take control and damage the system
  • Limit Memory and CPU allocation : Each Process is Independent and run within their allocated % unit of memory and CPU . It motivate «Optimal Resource Allocation» in restricted Environment. One process cannot communicate or interfere the other running process .
  • Prevent the use of system libraries and disable TCP/IP networking.

Please follow the following resource for documentation and installation of CHRoot

CodeOj in Action : Administrative Functions

  • Step A: Create a admin in the «codeoj» database «Admin» table by adding a row with a username and MD5 encrypted password entry.
  • Step B: Import Project in NetBeans and perform «Build and Run».
  • Step C: If you are Re-installing the CodeOj project and you already have backup files file1.sql,/file2.sql etc . Add following line in src/java/hibernate.cfg.xml hibernate configuration file.
property name="hibernate.hbm2ddl.import_files" value="/file1.sql,/file2.sql"/> property name="hibernate.hbm2ddl.auto" value="create"/>
  • If you are installing it first time you need not to create the all the tables or does not require to restore schema structure Dump , If a particular table doesn’t exists , Hibernate Framework creates these tables automatically. Thanks to Hibernate ORM magic.
  • Step D : Open Admin Panel by hitting http://localhost:8080/codeoj/ap/adminpanel.jsp in browser (make sure tomcat running at port 8080) and login with admin username and password.
  • Step E : After login successfully login a form will be shown for asking «Contest Code» followed by » Contest Name » ,» Start Time Stamp » ,» End Time Stamp » , » No of Problems » , » Contest Poster » and » Contest Instructions «.
  • Step F : Click add problems to add Algorithmic Problems to the Specific Contest by filling » Problem Code» , » setter name » , » tester name » , » execution time limit» , » problem description » » no of test I/O files » .

That’s all for creating a new live contest . To participate in a contest , user’s should register for contest in contest page or contest register link at home page .

Admin can make solution public after the contest by clicking make public button. CodeOj uses ACM style rank list with Elo rating system .

We wish to complete following to-dos ASAP by moving Spring Framework 4.2.6

  • Increase Scalability for handling more concurrent Requests/Second
  • Write Unit Tests
  • Improve code quality
  • Add Efficient plagiarism detector
  • Introducing Parallelism in System for Increase Reliability.
  • Add support for more programming languages

For further queries write me to developer.jaswant@gmail.com .

Free Software under MIT

Источник

Free Java Guide

An assortment of programming examples covering many different topics. Many searchable collection of source code snippets illustrating specific tasks best coding practices. With our programming samples you will be able to add your own functionality to the already existing sample. All the examples are made available here for you to copy and paste into your programs.

Free Java Source Code Links

1. Core Java Programs [PAGE 1]


Core Java Programs [ PAGE 1]

Some Java programs which help lot of java beginners to understand the basic fundamentals in Java programming.

//Find Maximum of 2 nos.

public static void main(String args[])

//taking value as command line argument.

//Converting String format to Integer value

int i = Integer.parseInt(args[0]);

int j = Integer.parseInt(args[1]);

System.out.println(i+» is greater than «+j);

System.out.println(j+» is greater than «+i);

//Find Minimum of 2 nos. using conditional operator

public static void main(String args[])

//taking value as command line argument.

//Converting String format to Integer value

int i = Integer.parseInt(args[0]);

int j = Integer.parseInt(args[1]);

System.out.println(result+» is a minimum value»);

/* Write a program that will read a float type value from the keyboard and print the following output.

->Small Integer not less than the number.

->Largest Integer not greater than the number.

public static void main(String args[])

double i = 34.32; //given number

System.out.println(«Small Integer not greater than the number : «+Math.ceil(i));

System.out.println(«Given Number : «+i);

System.out.println(«Largest Integer not greater than the number : «+Math.floor(i));

/*Write a program to generate 5 Random nos. between 1 to 100, and it

should not follow with decimal point.

public static void main(String args[])

/* Write a program to display a greet message according to

Marks obtained by student.

public static void main(String args[])

int marks = Integer.parseInt(args[0]); //take marks as command line argument.

Источник

Online Java — IDE, Code Editor, Compiler

Online Java is a web-based tool powered by ACE code editor. Build, Run & Share Java code online using online-java’s IDE for free. It’s one of the quick, robust, powerful online compilers for java language. Don’t worry about setting up java environment in your local. Now Run the java code in your favorite browser instantly. Getting started with this editor is so easy and fast. Just write the program and click the RUN button!! Code can be saved online by using the SHARE option that enables you to access your code anywhere using internet.

What is Java?

Java is a popular general-purpose programming language which was originally developed by James Gosling at Sun Microsystems (later acquired by Oracle). Java is fast, secure, and reliable. It is widely used for developing desktop and mobile applications, embedded systems, game consoles, supercomputers, big data processing, and so on. According to Oracle, Java runs on 3 billion devices worldwide, which makes it one of the most popular programming languages.

Why learn Java?

  • Web-based Applications
  • Mobile App Development
  • Desktop GUI Applications
  • Gaming Applications
  • Big Data Technologies
  • Distributed Applications
  • Cloud-Based Applications
  • IoT Applications

Features of this tool

  • Simple & Clean Design, Lightweight, Easy & Fast
  • Interactive program execution which makes the user to give program inputs at real time
  • Helpful for beginners to learn and practice programs
  • Dark & Light theme options and customizable code editor with more themes
  • Options to Copy or Download the Output of the Program
  • Expandable Output Terminal
  • Coding sharing option helps you to save your code in cloud so that it can be accessed anytime and anywhere with internet

Learn Other Programming Language?

Visit online-ide.com to learn and practice top programming languages — C, C++, Java, Python, Ruby, PHP, R, GoLang

Источник

Читайте также:  Convert vba to javascript
Оцените статью