[Assorted-commits] SF.net SVN: assorted: [651] configs/trunk/src
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-04-02 05:21:27
|
Revision: 651 http://assorted.svn.sourceforge.net/assorted/?rev=651&view=rev Author: yangzhang Date: 2008-04-01 22:21:28 -0700 (Tue, 01 Apr 2008) Log Message: ----------- added topcoder setup script and config template Added Paths: ----------- configs/trunk/src/topcoder/ configs/trunk/src/topcoder/contestapplet.conf.template configs/trunk/src/topcoder/setup.py Added: configs/trunk/src/topcoder/contestapplet.conf.template =================================================================== --- configs/trunk/src/topcoder/contestapplet.conf.template (rev 0) +++ configs/trunk/src/topcoder/contestapplet.conf.template 2008-04-02 05:21:28 UTC (rev 651) @@ -0,0 +1,197 @@ +#TopCoder ContestApplet Preferences File +#Thu Sep 13 01:33:13 EDT 2007 +com.topcoder.client.contestApplet.common.LocalPreferences.menufont=Arial +com.topcoder.client.contestApplet.common.LocalPreferences.menufontsize=10 +com.topcoder.client.contestApplet.common.LocalPreferences.commonclasspath=`CLASSPATH` +com.topcoder.client.contestApplet.common.LocalPreferences.chatpanelback=-16777216 +com.topcoder.client.contestApplet.common.LocalPreferences.chatfindhighlight=-8355712 +com.topcoder.client.contestApplet.common.LocalPreferences.chatfindback=-16776961 +com.topcoder.client.contestApplet.common.LocalPreferences.chatfont=Monospaced +com.topcoder.client.contestApplet.common.LocalPreferences.chatfontsize=12 +com.topcoder.client.contestApplet.common.LocalPreferences.keysubmit=Alt+U +com.topcoder.client.contestApplet.common.LocalPreferences.edstdkeyfind=Alt+F +com.topcoder.client.contestApplet.common.LocalPreferences.keycompile=Alt+C +com.topcoder.client.contestApplet.common.LocalPreferences.edstdkeyredo=Ctrl+Y +com.topcoder.client.contestApplet.common.LocalPreferences.edstdkeyundo=Ctrl+Z +com.topcoder.client.contestApplet.common.LocalPreferences.edstdkeygoto=Alt+G +com.topcoder.client.contestApplet.common.LocalPreferences.keytest=Alt+T +com.topcoder.client.contestApplet.common.LocalPreferences.keysave=Alt+S +com.topcoder.client.contestApplet.common.LocalPreferences.edstdselb=-16751104 +com.topcoder.client.contestApplet.common.LocalPreferences.edstdselt=-1 +com.topcoder.client.contestApplet.common.LocalPreferences.edstdsyntaxkeywords=-6710785 +com.topcoder.client.contestApplet.common.LocalPreferences.edstdsyntaxliterals=-65281 +com.topcoder.client.contestApplet.common.LocalPreferences.edstdback=-16777216 +com.topcoder.client.contestApplet.common.LocalPreferences.edstdsyntaxcomments=-16724992 +com.topcoder.client.contestApplet.common.LocalPreferences.edstdsyntaxdefault=-1 +com.topcoder.client.contestApplet.common.LocalPreferences.edstdfore=-1 +com.topcoder.client.contestApplet.common.LocalPreferences.edstdfont=Monospaced +com.topcoder.client.contestApplet.common.LocalPreferences.edstdfontsize=12 +com.topcoder.client.contestApplet.common.LocalPreferences.edstdtabsize=4 +com.topcoder.client.contestApplet.common.LocalPreferences.problemback=-16777216 +com.topcoder.client.contestApplet.common.LocalPreferences.problemfore=-1 +com.topcoder.client.contestApplet.common.LocalPreferences.messagefore=-1 +com.topcoder.client.contestApplet.common.LocalPreferences.messageback=-16777216 +com.topcoder.client.contestApplet.common.LocalPreferences.problemfont=Monospaced +com.topcoder.client.contestApplet.common.LocalPreferences.problemfontsize=12 +com.topcoder.client.contestApplet.common.LocalPreferences.problemfixedfont=Monospaced +com.topcoder.client.contestApplet.common.LocalPreferences.problemfixedfontsize=12 +com.topcoder.client.contestApplet.common.LocalPreferences.messagefont=Monospaced +com.topcoder.client.contestApplet.common.LocalPreferences.messagefontsize=12 +com.topcoder.client.contestApplet.common.LocalPreferences.chalsrcback=-16777216 +com.topcoder.client.contestApplet.common.LocalPreferences.chalprobback=-16777216 +com.topcoder.client.contestApplet.common.LocalPreferences.chalsrcfore=-1 +com.topcoder.client.contestApplet.common.LocalPreferences.chalprobfore=-1 +com.topcoder.client.contestApplet.common.LocalPreferences.chalprobfont=Monospaced +com.topcoder.client.contestApplet.common.LocalPreferences.chalprobontsize=12 +com.topcoder.client.contestApplet.common.LocalPreferences.chalprobfixedfont=Monospaced +com.topcoder.client.contestApplet.common.LocalPreferences.chalprobfixedfontsize=12 +com.topcoder.client.contestApplet.common.LocalPreferences.chalsrcfont=Monospaced +com.topcoder.client.contestApplet.common.LocalPreferences.chalsrcfontsize=12 +com.topcoder.client.contestApplet.common.LocalPreferences.summaryunopened.color=-1 +com.topcoder.client.contestApplet.common.LocalPreferences.summaryunopened.bold=false +com.topcoder.client.contestApplet.common.LocalPreferences.summaryunopened.italic=false +com.topcoder.client.contestApplet.common.LocalPreferences.summaryopened.color=-1 +com.topcoder.client.contestApplet.common.LocalPreferences.summaryopened.bold=false +com.topcoder.client.contestApplet.common.LocalPreferences.summaryopened.italic=false +com.topcoder.client.contestApplet.common.LocalPreferences.summarycompiled.color=-1 +com.topcoder.client.contestApplet.common.LocalPreferences.summarycompiled.bold=false +com.topcoder.client.contestApplet.common.LocalPreferences.summarycompiled.italic=false +com.topcoder.client.contestApplet.common.LocalPreferences.summaryjavapoints.color=-16711936 +com.topcoder.client.contestApplet.common.LocalPreferences.summaryjavapoints.bold=false +com.topcoder.client.contestApplet.common.LocalPreferences.summaryjavapoints.italic=false +com.topcoder.client.contestApplet.common.LocalPreferences.summaryjavachlpassed.color=-16711936 +com.topcoder.client.contestApplet.common.LocalPreferences.summaryjavachlpassed.bold=true +com.topcoder.client.contestApplet.common.LocalPreferences.summaryjavachlpassed.italic=true +com.topcoder.client.contestApplet.common.LocalPreferences.summaryjavachlfailed.color=-16711936 +com.topcoder.client.contestApplet.common.LocalPreferences.summaryjavachlfailed.bold=false +com.topcoder.client.contestApplet.common.LocalPreferences.summaryjavachlfailed.italic=false +com.topcoder.client.contestApplet.common.LocalPreferences.summaryjavasyspassed.color=-16711936 +com.topcoder.client.contestApplet.common.LocalPreferences.summaryjavasyspassed.bold=true +com.topcoder.client.contestApplet.common.LocalPreferences.summaryjavasyspassed.italic=true +com.topcoder.client.contestApplet.common.LocalPreferences.summaryjavasysfailed.color=-65485 +com.topcoder.client.contestApplet.common.LocalPreferences.summaryjavasysfailed.bold=false +com.topcoder.client.contestApplet.common.LocalPreferences.summaryjavasysfailed.italic=true +com.topcoder.client.contestApplet.common.LocalPreferences.summarycpppoints.color=-103 +com.topcoder.client.contestApplet.common.LocalPreferences.summarycpppoints.bold=false +com.topcoder.client.contestApplet.common.LocalPreferences.summarycpppoints.italic=false +com.topcoder.client.contestApplet.common.LocalPreferences.summarycppchlpassed.color=-103 +com.topcoder.client.contestApplet.common.LocalPreferences.summarycppchlpassed.bold=true +com.topcoder.client.contestApplet.common.LocalPreferences.summarycppchlpassed.italic=true +com.topcoder.client.contestApplet.common.LocalPreferences.summarycppchlfailed.color=-103 +com.topcoder.client.contestApplet.common.LocalPreferences.summarycppchlfailed.bold=false +com.topcoder.client.contestApplet.common.LocalPreferences.summarycppchlfailed.italic=false +com.topcoder.client.contestApplet.common.LocalPreferences.summarycppsyspassed.color=-103 +com.topcoder.client.contestApplet.common.LocalPreferences.summarycppsyspassed.bold=true +com.topcoder.client.contestApplet.common.LocalPreferences.summarycppsyspassed.italic=true +com.topcoder.client.contestApplet.common.LocalPreferences.summarycppsysfailed.color=-65485 +com.topcoder.client.contestApplet.common.LocalPreferences.summarycppsysfailed.bold=false +com.topcoder.client.contestApplet.common.LocalPreferences.summarycppsysfailed.italic=true +com.topcoder.client.contestApplet.common.LocalPreferences.summarycsharppoints.color=-10066177 +com.topcoder.client.contestApplet.common.LocalPreferences.summarycsharppoints.bold=false +com.topcoder.client.contestApplet.common.LocalPreferences.summarycsharppoints.italic=false +com.topcoder.client.contestApplet.common.LocalPreferences.summarycsharpchlpassed.color=-10066177 +com.topcoder.client.contestApplet.common.LocalPreferences.summarycsharpchlpassed.bold=true +com.topcoder.client.contestApplet.common.LocalPreferences.summarycsharpchlpassed.italic=true +com.topcoder.client.contestApplet.common.LocalPreferences.summarycsharpchlfailed.color=-10066177 +com.topcoder.client.contestApplet.common.LocalPreferences.summarycsharpchlfailed.bold=false +com.topcoder.client.contestApplet.common.LocalPreferences.summarycsharpchlfailed.italic=false +com.topcoder.client.contestApplet.common.LocalPreferences.summarycsharpsyspassed.color=-10066177 +com.topcoder.client.contestApplet.common.LocalPreferences.summarycsharpsyspassed.bold=true +com.topcoder.client.contestApplet.common.LocalPreferences.summarycsharpsyspassed.italic=true +com.topcoder.client.contestApplet.common.LocalPreferences.summarycsharpsysfailed.color=-65485 +com.topcoder.client.contestApplet.common.LocalPreferences.summarycsharpsysfailed.bold=false +com.topcoder.client.contestApplet.common.LocalPreferences.summarycsharpsysfailed.italic=true +com.topcoder.client.contestApplet.common.LocalPreferences.summaryvbpoints.color=-8267265 +com.topcoder.client.contestApplet.common.LocalPreferences.summaryvbpoints.bold=false +com.topcoder.client.contestApplet.common.LocalPreferences.summaryvbpoints.italic=false +com.topcoder.client.contestApplet.common.LocalPreferences.summaryvbchlpassed.color=-8267265 +com.topcoder.client.contestApplet.common.LocalPreferences.summaryvbchlpassed.bold=true +com.topcoder.client.contestApplet.common.LocalPreferences.summaryvbchlpassed.italic=true +com.topcoder.client.contestApplet.common.LocalPreferences.summaryvbchlfailed.color=-8267265 +com.topcoder.client.contestApplet.common.LocalPreferences.summaryvbchlfailed.bold=false +com.topcoder.client.contestApplet.common.LocalPreferences.summaryvbchlfailed.italic=false +com.topcoder.client.contestApplet.common.LocalPreferences.summaryvbsyspassed.color=-8267265 +com.topcoder.client.contestApplet.common.LocalPreferences.summaryvbsyspassed.bold=true +com.topcoder.client.contestApplet.common.LocalPreferences.summaryvbsyspassed.italic=true +com.topcoder.client.contestApplet.common.LocalPreferences.summaryvbsysfailed.color=-65485 +com.topcoder.client.contestApplet.common.LocalPreferences.summaryvbsysfailed.bold=false +com.topcoder.client.contestApplet.common.LocalPreferences.summaryvbsysfailed.italic=true +com.topcoder.client.contestApplet.common.LocalPreferences.summarypythonpoints.color=-39169 +com.topcoder.client.contestApplet.common.LocalPreferences.summarypythonpoints.bold=false +com.topcoder.client.contestApplet.common.LocalPreferences.summarypythonpoints.italic=false +com.topcoder.client.contestApplet.common.LocalPreferences.summarypythonchlpassed.color=-39169 +com.topcoder.client.contestApplet.common.LocalPreferences.summarypythonchlpassed.bold=true +com.topcoder.client.contestApplet.common.LocalPreferences.summarypythonchlpassed.italic=true +com.topcoder.client.contestApplet.common.LocalPreferences.summarypythonchlfailed.color=-39169 +com.topcoder.client.contestApplet.common.LocalPreferences.summarypythonchlfailed.bold=false +com.topcoder.client.contestApplet.common.LocalPreferences.summarypythonchlfailed.italic=false +com.topcoder.client.contestApplet.common.LocalPreferences.summarypythonsyspassed.color=-39169 +com.topcoder.client.contestApplet.common.LocalPreferences.summarypythonsyspassed.bold=true +com.topcoder.client.contestApplet.common.LocalPreferences.summarypythonsyspassed.italic=true +com.topcoder.client.contestApplet.common.LocalPreferences.summarypythonsysfailed.color=-65485 +com.topcoder.client.contestApplet.common.LocalPreferences.summarypythonsysfailed.bold=false +com.topcoder.client.contestApplet.common.LocalPreferences.summarypythonsysfailed.italic=true +com.topcoder.client.contestApplet.common.LocalPreferences.usertablefont=Arial +com.topcoder.client.contestApplet.common.LocalPreferences.usertablefontsize=12 +com.topcoder.client.contestApplet.common.LocalPreferences.summaryfont=Arial +com.topcoder.client.contestApplet.common.LocalPreferences.summaryfontsize=12 +com.topcoder.client.contestApplet.common.LocalPreferences.edstdsyntaxcommentsstyle=0 +com.topcoder.client.contestApplet.common.LocalPreferences.edstdsyntaxliteralsstyle=0 +com.topcoder.client.contestApplet.common.LocalPreferences.edstdsyntaxkeywordsstyle=0 +com.topcoder.client.contestApplet.common.LocalPreferences.edstdsyntaxdefaultstyle=0 +com.topcoder.client.contestApplet.common.LocalPlight=true +com.topcoder.client.contestApplet.common.LocalPreferences.chalsrcsyntaxhighlight=true +com.topcoder.client.contestApplet.LocalPreferences.connectionType=DIRECT +com.topcoder.client.contestApplet.panels.ChatPanel.generalback=-16777216 +com.topcoder.client.contestApplet.panels.ChatPanel.whispertoback=-65536 +com.topcoder.client.contestApplet.panels.ChatPanel.meback=-16777216 +com.topcoder.client.contestApplet.panels.ChatPanel.systemfore=-16711936 +com.topcoder.client.contestApplet.panels.ChatPanel.whisperback=-16777216 +com.topcoder.client.contestApplet.panels.ChatPanel.whispertofore=-6710887 +com.topcoder.client.contestApplet.panels.ChatPanel.whisperfore=-6710887 +com.topcoder.client.contestApplet.panels.ChatPanel.generaltoback=-65536 +com.topcoder.client.contestApplet.panels.ChatPanel.emphsystemfore=-16711936 +com.topcoder.client.contestApplet.panels.ChatPanel.emphsystemback=-16777216 +com.topcoder.client.contestApplet.panels.ChatPanel.systemback=-16777216 +com.topcoder.client.contestApplet.panels.ChatPanel.generaltofore=-1 +com.topcoder.client.contestApplet.panels.ChatPanel.handleback=-16777216 +com.topcoder.client.contestApplet.panels.ChatPanel.mefore=-6710887 +com.topcoder.client.contestApplet.panels.ChatPanel.generalfore=-1 +com.topcoder.client.contentApplet.panels.ChatPanel.moderatedChatQuestionFore=-16711936 +com.topcoder.client.contentApplet.panels.ChatPanel.moderatedChatSpeakerFore=-1 +com.topcoder.client.contentApplet.panels.ChatPanel.moderatedChatSpeakerBack=-16777216 +com.topcoder.client.contentApplet.panels.ChatPanel.moderatedChatQuestionBack=-16777216 +com.topcoder.jmaContestApplet.frames.codingframe.location=0\:0 +com.topcoder.jmaContestApplet.frames.codingframe.size=1024\:746 +com.topcoder.jmaContestApplet.frames.codingframe.dividerloc=319 +com.topcoder.jmaContesntApplet.ContestApplet.enableTimestamps=true +fileeditor.config.dirName=C\:\\Documents and Settings\\Yang\\My Documents\\Visual Studio 2008\\Projects\\TopCoderCS\\TopCoderCS +fileeditor.config.fileName=Program +fileeditor.config.beginCut=// BEGIN CUT HERE +fileeditor.config.endCut=// END CUT HERE +fileeditor.config.probdescfileextnsion=txignaturefilename= +fileeditor.config.lineComments=true +fileeditor.config.overrideFileName=true +fileeditor.config.provideBreaks=false +fileeditor.config.probdescfilewrite=false +fileeditor.config.breakAt=60 +fileeditor.config.htmldesc=false +fileeditor.config.backup=true +fileeditor.config.javatemplate=$BEGINCUT$\n$PROBLEMDESC$\n$ENDCUT$\nimport java.util.*;\npublic class $CLASSNAME$ {\n\tpublic $RC$ $METHODNAME$($METHODPARMS$) {\n\t\t\n\t}\n\tpublic static void main(String[] args) {\n\t\t$CLASSNAME$ temp \= new $CLASSNAME$();\n\t\tSystem.out.println(temp.$METHODNAME$($METHODPARMS$));\n\t}\n} +fileeditor.config.cpptemplate=// vim\:et\:sw\=2\:ts\=2\n\n$BEGINCUT$\n\#if 0\n$PROBLEMDESC$\n\#endif\n$ENDCUT$\n\n\n\n\n\n\n\n//\#line $NEXTLINENUMBER$ "$FILENAME$"\n\#include <algorithm>\n\#include <cassert>\n\#include <cctype>\n\#include <cmath>\n\#include <cstdio>\n\#include <cstdlib>\n\#include <deque>\n\#include <iostream>\n\#include <map>\n\#include <queue>\n\#include <set>\n\#include <sstream>\n\#include <stack>\n\#include <string>\n\#include <vector>\nusing namespace std;\n\n\#define ARRSIZE(x) (sizeof(x)/sizeof(x[0]))\n\n\n\n\n\n\n\n$BEGINCUT$\ntemplate<typename T> void print( T a ) {\n\tcerr << a;\n}\nstatic void print( long long a ) {\n\tcerr << a << "L";\n}\nstatic void print( string a ) {\n\tcerr << '"' << a << '"';\n}\ntemplate<typename T> void print( vector<T> a ) {\n\tcerr << "{";\n\tfor ( int i \= 0 ; i \!\= a.size() ; i++ ) {\n\t\tif ( i \!\= 0 ) cerr << ", ";\n\t\tprint( a[i] );\n\t}\n\tcerr << "}" << endl;\n}\ntemplate<typename T> void eq( int n, T have, T need ) {\n\tif ( have \=\= need ) {\n\t\tcerr << "Case " << n << " passed." << endl;\n\t} else {\n\t\tcerr << "Case " << n << " failed\: expected ";\n\t\tprint( need );\n\t\tcerr << " received ";\n\t\tprint( have );\n\t\tcerr << "." << endl;\n\t}\n}\ntemplate<typename T> void eq( int n, vector<T> have, vector<T> need ) {\n\tif( have.size() \!\= need.size() ) {\n\t\tcerr << "Case " << n << " failed\: returned " << have.size() << " elements; expected " << need.size() << " elements." << endl;\n\t\tcerr << " have\: "; print( have );\n\t\tcerr << " need\: "; print( need );\n\t\treturn;\n\t}\n\tfor( size_t i\= 0; i < have.size(); i++ ) {\n\t\tif( have[i] \!\= need[i] ) {\n\t\t\tcerr << "Case " << n << " failed. Expected and returned array differ in position " << i << "." << endl;\n\t\t\tcerr << " have\: "; print( have );\n\t\t\tcerr << " need\: "; print( need );\n\t\t\treturn;\n\t\t}\n\t}\n\tcerr << "Case " << n << " passed." << endl;\n}\nstatic void eq( int n, string have, string need ) {\n\tif ( have \=\= need ) {\n\t\tcerr << "Case " << n << " passed." << endl;\n\t} else {\n\t\tcerr << "Case " << n << " failed\: expected ";\n\t\tprint( need );\n\t\tcerr << " received ";\n\t\tprint( have );\n\t\tcerr << "." << endl;\n\t}\n}\n$ENDCUT$\n\n\n\n\n\n\n\n$BEGINCUT$\n\#if 0\ntemplate<typename T> void pp(const T & xs) {\n\tfor (typename T\:\:const_iterator it \= xs.begin();\n\t\tit \!\= xs.end();\n\t\tit++)\n\t\tcout << *it << " ";\n\tcout << endl;\n}\n\nvector<string> split( const string& s, const string& delim \=" " ) {\n\tvector<string> res;\n\tstring t;\n\tfor ( int i \= 0 ; i \!\= s.size() ; i++ ) {\n\t\tif ( delim.find( s[i] ) \!\= string\:\:npos ) {\n\t\t\tif ( \!t.empty() ) {\n\t\t\t\tres.push_back( t );\n\t\t\t\tt \= "";\n\t\t\t}\n\t\t} else {\n\t\t\tt +\= s[i];\n\t\t}\n\t}\n\tif ( \!t.empty() ) {\n\t\tres.push_back(t);\n\t}\n\treturn res;\n}\n\nvector<int> splitInt( const string& s, const string& delim \=" " ) {\n\tvector<string> tok \= split( s, delim );\n\tvector<int> res;\n\tfor ( int i \= 0 ; i \!\= tok.size(); i++ )\n\t\tres.push_back( atoi( tok[i].c_str() ) );\n\treturn res;\n}\n\#endif\n$ENDCUT$\n\n\n\n\n\n\n\nclass $CLASSNAME$ {\n\tpublic\:\n\t$RC$ $METHODNAME$($METHODPARMS$) {\n\t\t$RC$ res;\n\t\treturn res;\n\t}\n};\n\n\n\n\n\n\n\n$BEGINCUT$\nint main() {\n$MAINBODY$\n\tcin.get();\n\treturn 0;\n}\n$ENDCUT$\n +fileeditor.config.csharptemplate=using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.Text.RegularExpressions;\n\npublic class $CLASSNAME$ {\n\tpublic $RC$ $METHODNAME$($METHODPARMS$) {\n\t}\n\n\n\n\n\n\n\tpublic void pp<T>(T x) { Console.WriteLine(x); }\n\n\n\n\n\n\n\n\n\t$BEGINCUT$\n\tpublic static void Main(string[] args) {\n\t\t$MAINBODY$\n\t\tConsole.WriteLine("done\!");\n\t\tConsole.Read();\n\t}\n private static void eq( int n, object have, object need) {\n if( eq( have, need ) ) {\n Console.WriteLine( "Case "+n+" passed." );\n } else {\n Console.Write( "Case "+n+" failed\: expected " );\n print( need );\n Console.Write( ", received " );\n print( have );\n Console.WriteLine();\n }\n }\n private static void eq( int n, Array have, Array need) {\n if( have \=\= null || have.Length \!\= need.Length ) {\n Console.WriteLine("Case "+n+" failed\: returned "+have.Length+" elements; expected "+need.Length+" elements.");\n print( have );\n print( need );\n return;\n }\n for( int i\= 0; i < have.Length; i++ ) {\n if( \! eq( have.GetValue(i), need.GetValue(i) ) ) {\n Console.WriteLine( "Case "+n+" failed. Expected and returned array differ in position "+i );\n print( have );\n print( need );\n return;\n }\n }\n Console.WriteLine("Case "+n+" passed.");\n }\n private static bool eq( object a, object b ) {\n if ( a is double && b is double ) {\n return Math.Abs((double)a-(double)b) < 1E-9;\n } else {\n return a\!\=null && b\!\=null && a.Equals(b);\n }\n }\n private static void print( object a ) {\n if ( a is string ) {\n Console.Write("\\"{0}\\"", a);\n } else if ( a is long ) {\n Console.Write("{0}L", a);\n } else {\n Console.Write(a);\n }\n }\n private static void print( Array a ) {\n if ( a \=\= null) {\n Console.WriteLine("<NULL>");\n;\n for ( int i\= 0; i < a.Length; i++ ) {\n print( a.GetValue(i) );\n if( i \!\= a.Length-1 ) {\n Console.Write(", ");\n }\n }\n Console.WriteLine( '}' );\n }\n\t$ENDCUT$\n}\n +fileeditor.config.javaextension=java +fileeditor.config.cppextension=cpp +fileeditor.config.csharpextension=cs +editor.defaultname=ExampleBuilder +editor.1.name=ExampleBuilder +editor.1.entrypoint=codeprocessor.EntryPoint +editor.1.classpath= +editor.1.eager=1 +editor.numplugins=1 +editor.2.name=ExampleBuilder +editor.2.entrypoint=codeprocessor.EntryPoint +editor.2.classpath= +editor.2.eager=1 +codeprocessor.config.pluginentrypoint=fileedit.EntryPoint +codeprocessor.config.codeprocessor=tc_plugin.ExampleBuilder Added: configs/trunk/src/topcoder/setup.py =================================================================== --- configs/trunk/src/topcoder/setup.py (rev 0) +++ configs/trunk/src/topcoder/setup.py 2008-04-02 05:21:28 UTC (rev 651) @@ -0,0 +1,37 @@ +#!/usr/bin/env python +# vim:et:sw=2:ts=2 + +from __future__ import with_statement +from contextlib import * +from os import * +from os.path import * +from re import * +from sys import * +from urllib import * + +# Source URLs to the plugin jars. +urls = """ +http://www.topcoder.com/contest/classes/ExampleBuilder/ExampleBuilder.jar +http://www.topcoder.com/contest/classes/CodeProcessorV2/CodeProcessor.jar +http://www.topcoder.com/contest/classes/FileEdit/FileEdit.jar +""".strip().split() + +# Figure out and setup paths. +homedir = environ[ 'HOME' if platform != 'win32' else 'HOMEPATH' ] + sep +plugindir = ( argv[1] if len(argv) < 1 else homedir + '.topcoder' ) + sep +try: makedirs( plugindir ) +except OSError, ex: + if ex.errno != 17: raise +paths = [ plugindir + basename(url) for url in urls ] + +# Download jars if necessary. +for url, path in zip( urls, paths ): + if not exists( path ): + urlretrieve(url, path) + +# Generate the final configuration file from the template. +with file( 'contestapplet.conf.template' ) as template: + with file( homedir + 'contestapplet.conf', 'w' ) as output: + output.write( sub( '`CLASSPATH`', + pathsep.join( paths ), + template.read() ) ) Property changes on: configs/trunk/src/topcoder/setup.py ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |