PopsPack is a collection of interesting plugins that enhance the TopCoder applet experience and provide plugin writers some debugging tools. Please note that some of these plugins use undocumented API’s within the applet and can fail if TopCoder changes anything and is relatively unsupported. Please also note that these plugins are fully experimental and that you assume any risk or consequences in their use. The plugins included are:
1) TalkingApplet – a whole new dimension to the applet
2) TalkingEditor – an editor that can speak various editor things
3) AutoLogon – automatically logs onto the applet
4) AutoDownload – keep your plugins up to date always
5) PopsProcessor – a CodeProcessor java only test generator
6) PopsCutter – a CodeProcessor script to eliminate code within predetermined blocks
7) Debugging Classes – Useful wrappers for debugging editors, code processors and the applet plugin manager
Thing of note: this plugin uses undocumented API calls to the applet that can change at TopCoder’s discretion and without warning. Additionally, this is a purely experimental plugin and I make no guarantees on it’s ability to work nor on it’s affects to the applet – use at your own risk.
Ø Requires Java 1.4+
Ø Requires a JSAPI implementation.
Ø Fast PC (don’t ask what). Pauses were noticeable only on applet startup on an Anthlon 1Gz but ran fine otherwise. On a Intel 4 2.8HT, I don’t see any pauses.
Go to http://freetts.sourceforge.net to download version 1.1.2 (note: I have not tested out version 1.2 beta and do not know if it will work – try it if you want). Please follow the Download and Installing – Quickstart directions. For those who don’t read doc – here is the instructions in a nutshell:
1) Download the binary distribution and unzip it to some directory
2) Follow http://freetts.sourceforge.net/docs/jsapi_setup.html to setup JSAPI
a. Essentially – simply execute jsapi.exe (or jsapi.sh on unix) to extract the JSAPI classes
b. Copy speech.properties to your home directory (same directory that you find contestapplet.conf)
3) Execute the Hello World demo (“FreeTTSDir/demo/JSAPI/HelloWorld”) to ensure your installation works
Note: please don’t ask me if you have issues with FreeTTS – I probably wouldn’t be able to answer them. Use the FreeTTS forums for help…
Setting up this plugin is similar to any other plugin:
Entrypoint is “popspack.popstalk.TalkingApplet”
ClassPath is “PopsPack.jar;{every jar required by JSAPI implementation}”. If you are using FreeTTS – you’d include every jar in the /lib directory of the FreeTTS installation.
The one special thing that must be done is to check the ‘At Startup’ option. By checking this option, the plugin will start with the applet and integrate itself nicely.
Important: After you have specified the above, press the Configure button. You MUST setup the JSAPI tabs – choosing the engine and voice to use. If you are using the FreeTTS implementation – choose the “unlimited…” engine and the “kevin16” voice (please note that the Kevin voices are the same regardless of any other settings [gender/age/etc]). After choosing those, press the TEST button to have the given text spoken. The first time you do this – it will take awhile to load up (depending of course on the speed of your CPU). If you hear no voice – check the java console for any messages. If you hear a voice, press SAVE and exit – you should be good to use the applet once you have closed all browsers and restarted the applet.
NOTE: if you specify a quote in your text – YOU MUST SPECIFY A TWO OF THEM. Some error exists in the MessageFormat class that gets screwed up on a single quote.
There is nothing to do to use it – simply start the applet. Whatever items you have checked in the configuration will automatically be done – that’s it!
There is an option that allows you to have ALL chat in the room read to you. Use this option with care – if you do this on a room with alot of chat happening, the chat queue will get back’ed up. Use this with CAUTION:
To have all the chat messages read in your room – simply enter the chat message “chat on” in the chat line and press enter. To stop the chat from being read – enter the chat message “chat off” in the chat line and press enter.
Ø Requires Java 1.4+
Ø Requires a JSAPI implementation. (See installation of FreeTTS above)
Ø Fast PC (don’t ask what). Pauses were noticeable only on applet startup on an Anthlon 1Gz but ran fine otherwise. On a Intel 4 2.8HT, I don’t see any pauses.
Setting up this plugin is similar to any other plugin:
Entrypoint is “popspack.popstalk.TalkingEditor”
ClassPath is “PopsPack.jar;{every jar required by JSAPI implementation};{your editor classpath}”. If you are using FreeTTS – you’d include every jar in the /lib directory of the FreeTTS installation.
Important: After you have specified the above, press the Configure button. You MUST setup the JSAPI tabs – choosing the engine and voice to use. If you are using the FreeTTS implementation – choose the “unlimited…” engine and the “kevin16” voice (please note that the Kevin voices are the same regardless of any other settings [gender/age/etc]). After choosing those, press the TEST button to have the given text spoken. The first time you do this – it will take awhile to load up (depending of course on the speed of your CPU). If you hear no voice – check the java console for any messages.
Specify the entry point of the real editor that will be used. Please note that you must include that editor’s classpath into this plugin’s classpath in order for it to be properly initialized.
Prior to exiting, make sure you have the ‘Default’ checked on this plugin – then press SAVE and exit – you should be good to use the applet once you have closed all browsers and restarted the applet.
This editor plugin adds a set of buttons to the bottom of your editor. When you first open up a screen – the editor will speak the element that you chose in the configuration. Pressing any of the buttons will speak that individual element. You may press the STOP button to immediately stop the current speaking element. Please note that this plugin does it’s best effort to speak the element chosen – however, it will certainly not be perfect in that the problem description may contain wording or tags that will not be spoken correctly.
Ø None
Setting up this plugin is similar to any other plugin:
Entrypoint is “popspack.autologon.AutoLogon”
ClassPath is “PopsPack.jar”
You must check the ‘At Startup’ option. By checking this option, the plugin will be able to log you on at startup.
Important: After you have specified the above, press the Configure button. This is required for you to enter in your userid and password (and the amount of delay). Please note that you cannot set your delay to less than 3 seconds – this is to allow the sponsor logo to be viewed.
There are TWO methods that can be used to automatically log you in:
Direct – This method uses the internal messages of the applet to log you in. You are at risk if TopCoder implements any changes but will be unaffected by the side effects above.
Check the TUNNEL checkbox if you ALWAYS want to use the tunneling option.
The best use of this plugin is to start the applet and do NOTHING until you are correctly logged on. If you do something while the applet is starting up – it may likely burn some of the keystokes this plugin feeds in – forcing you to log on yourself.
WARNING - Your password is stored as clear text within
the contestapplet.conf. Please do NOT
use this plugin if you use a shared machine.
Ø None
Setting up this plugin is similar to any other plugin:
Entrypoint is “popspack.autodownload.DownloadManager”
ClassPath is “PopsPack.jar”
You must check the ‘At Startup’ option. By checking this option, the plugin will be able to log you on at startup.
Important: After you have specified the above, press the Configure button. This allows you to specify the URL to check and the destination file.
Any other plugin that depends on this synchronization of files CANNOT have it’s startup flag checked. If it is checked, you may run into issues if the other plugin ‘locks’ the file that needs to be synchronized.
This plugin will automatically check files at startup and will automatically download the files if action is required.
Ø CodeProcessor v1.0+
The entry point for the CodeProcessing script is “popspack.processors.PopsProcessor”
This plugin will generate two things:
1) Java test case code to a variable called $MAIN$
2) Writer Code to a variable called $WRITERCODE$
If you use FileEdit or PopsEdit (or other compatible editor), place either (or both) of these variables in your template definition and it will be replaced by the generated code.
Please note: this code processor script will surround the generated test case code by the tags specified in PopsCutter (regardless if PopsCutter is installed or not). If you combine PopsCutter with this script, the generated test case code will automatically be removed when the code is submitted to TC.
There is no configuration associated with this processor script.
Ø CodeProcessor v2.0
The entry point for the CodeProcessing script is “popspack.processors.PopsCutter”.
This script has a configuration dialog (accessible by pressing the Configure button within CodeProcessor) that will allow you to specify the beginning and ending tags.
The script will simply delete any text between the beginning and ending tags. Note: this implements a simple on/off type of switch (ie hits the begin tag, starts cutting all text until the end tag is reached) and will not support embedded or mismatched tags.
The debugging stuff is useful for would be editor writers, code processor script writers and people trying to debug the applet’s Plugin Manager. There are four classes available:
Name |
EntryPoint |
Description |
Cacheable Editor |
popspack.debug.Cacheable |
Tests the applet’s cache ability |
NonCacheable Editor |
popspack.debug.NonCacheable |
Tests the applet’s non-cache ability |
Logging Editor |
popspack.debug.EntryPoint |
A wrapper around another editor that displays (sysout) the interaction (ie method calls) between the applet and an editor |
Logging CodeProcessor |
popspack.debug.CodeProcessor |
A wrapper around another CodeProcessing script that displays (sysout) the interaction (ie method calls) between the CodeProcessor and a CodeProcessor script. |
#1 and #2 are of little use and are only included if a future applet maintainer needs it. Both #3 and #4 can be configured (through the configure button) to specify the embedded editor/codeprocessor. Then all method calls will be logged to the console.