Topcoder arena plugin

Source: Internet
Author: User
How to Use examplebuilder plugin

Examplebuilder is a codeprocessor plug-in that, given a problemcomponentmodel, produces code to test the examples in the target language.

The plug-in expects a JVM version 1.4 or later.

The plug-in has been in use for nearly a year in its current incarnation (its previous version that used a parser was in use for about a year before then ). I did most of my testing using C # problems. I verified compatibility with Java and C ++ on a handful of examples, but no extensive testing has been done.

Examplebuilder comes with code templates for Java, C ++, and C #. the plug-in defines a $ mainbody $ variable used in the templates. code templates are important part of the plug-in between you must configure your fileedit with a version derived from one of the templates supplied with the plug-in.

Installing examplebuilder

To install examplebuilder, you need to install codeprocessor, and configure it with an editor of your choice. See instructions below for processing ing codeprocessor to use examplebuilder and fileedit.

  1. Download the latest codeprocessor. jar, fileedit. jar, and examplebuilder. jar from the topcoder's Web site
  2. Start the topcoder arena Applet
  3. From the Options menu, choose editor to open editor preferences
  4. In editor preferences, click [add]
  5. Enter name = examplebuilder
  6. Enter entrypoint = codeprocessor. entrypoint
  7. Enter classpath = <download>/codeprocessor. jar; <download>/fileedit. jar; <download> examplebuilder. jar, where <download> represents an absolute path to the directory to which you downloaded the jar files.
  8. In editor preferences, select examplebuilder, and click [configure] To Open codeprocessor Configuration
  9. Enter editor entrypoint = fileedit. entrypoint
  10. Enter processorclass = tc_plugin.examplebuilder
  11. In codeprocessor configuration, click [verify]. The applet shocould detect that preprocess and getuserdefinedtags methods are present.
  12. In codeprocessor configuration, click [configure] to access fileedit's configuration page. Make a code template that uses the $ mainbody $ tag to see the code that examplebuilder generates.
  13. Click [Save] and [close] in all open dialogs
  14. Depending on your language preference, download codetemplate. Java, codetemplate. cpp, or codetemplate. cs. paste the text of the desired template in the fileedit's Configuration window.
  15. If you are running WebStart application, close it; if you are running in a browser, close the instance of the browser that runs the applet.

To verify the installation, go to a practice room and open a problem. Verify that examples are expanded in the output.

Troubleshooting the installation

The most common installation problem is a JVM version mismatch. if you are running the arena from the browser, go to Java Plugin configuration in the control panel, and verify that your default JRE is 1.4. if you are running the arena in WebStart, go to "file/preferences, Java" in the WebStart application, and verify that 1.4 is the default JRE version.

Happy coding!
Kyky

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.