online-compilation

Sending input data to child process in node.js

三世轮回 提交于 2019-12-24 03:37:36
问题 I am writing code to create an online c++ compiler in node.js environment.Using spawn function i created a child process which will compile the code and execute it and send the output back to the user. But i need to send input to the running c++ program . I used child.stdin.write('data'); for sending data to child but i think cin in the program is not receiving the input . Please help me to send the input to the running c++ code. Thanks. 回答1: You should probably use either cluster, or fork if

How can compile I `.java file` in jsp?

我们两清 提交于 2019-12-14 03:31:57
问题 Using java compiler API I want to compile a java file in jsp . I created a html file and using its textArea element I sent its text, which is expected to be code in java entered by user, to JSP on server and after collecting it in a string I made a file with .java extension and wrote it with textArea contents then i used compiler API but it is not compiling the file. I want to do something like this index.html <form action="formAction.jsp" method="post"> Please enter your text: <br/>

Time out a java code?

牧云@^-^@ 提交于 2019-12-08 13:34:48
问题 I am writing an online java programming app where I take a java code as input from user and returns the output after compilation and execution through a python script. For controlling the memory heap I have a standard solution of using -Xms and -Xmx while running the code in JVM. I have installed Sun Java 1.7.0_40. Now the problem is that I am confused about how to restrict the code with a time limit. For example any code submitted by user in my app should not run for more than T seconds,

Any Online compiler you know for C or other languages? [closed]

感情迁移 提交于 2019-12-03 03:53:57
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Any online C compiler that you know which can do the following: Compile and execute the C programs online File handling System functions like exec() , system() , fork() Or any compiler which does not need installation procedure (I mean that you can just copy paste a folder to run the compiler easily ) Note

How to Create a Web App to Compile and Run Java/C/PHP Code Online? [closed]

独自空忆成欢 提交于 2019-11-28 20:43:09
Though this is a question with broader scope, I want to write a Online Test Code for my company where people can be given questions to write code in java/php/c etc and the code run and compiles online. I have seen this happening in site like codeacademy, Udacity etc. Just want to understand the architecture behind it. I have searched a lot along the similiar lines a lot on Google but couldnt find a concrete answer. Though after reading bits and pieces here and there i understood that the code is sent to compiler on server and then the results are sent back. Not sure how exactly that happens.

How to Create a Web App to Compile and Run Java/C/PHP Code Online? [closed]

﹥>﹥吖頭↗ 提交于 2019-11-27 11:43:15
问题 Though this is a question with broader scope, I want to write a Online Test Code for my company where people can be given questions to write code in java/php/c etc and the code run and compiles online. I have seen this happening in site like codeacademy, Udacity etc. Just want to understand the architecture behind it. I have searched a lot along the similiar lines a lot on Google but couldnt find a concrete answer. Though after reading bits and pieces here and there i understood that the code