protectedstaticvoidshowHelp() { System.out.println("Usage: resolver.bat/sh contestURL user password [options]"); System.out.println(" or: resolver.bat/sh contestPath [options]"); System.out.println(); System.out.println(" General options:"); System.out.println(" --info"); System.out.println(" Show additional info to presenter client"); System.out.println(" --speed speedFactor"); System.out.println(" Resolution delay multiplier. e.g. 0.5 will be twice"); System.out.println(" as fast, 2 will be twice as slow"); System.out.println(" --singleStep startRow"); System.out.println(" Require a click for each step starting at a specific"); System.out.println(" row, or for entire contest if no row specified"); System.out.println(" --rowDisplayOffset numRows"); System.out.println(" Move the display up the screen by some number of"); System.out.println(" rows (default 4)"); System.out.println(" --display #"); System.out.println(" Use the specified display"); System.out.println(" 1 = primary display, 2 = secondary display, etc."); System.out.println(" --multi-display p@wxh"); System.out.println(" Stretch the presentation across multiple clients. Use \"2@3x2\""); System.out.println(" to indicate this client is position 2 (top middle) in a 3x2 grid"); System.out.println(" --display_name template"); System.out.println(" Change the way teams are displayed using a template. Parameters:"); System.out.println(" {team.display_name), {team.name), {org.formal_name}, and {org.name}"); System.out.println(" --groups"); System.out.println(" Resolve only the groups in the given regex pattern for ids"); System.out.println(" If multiple groups are given, each is resolved separately"); System.out.println(" --pause #"); System.out.println(" Start at the given pause #. Useful for testing/preview"); System.out.println(" --judgeQueue"); System.out.println(" Start the resolution using a judge queue. Must have at least one list award"); System.out.println(" --test"); System.out.println(" Test on an unfinished contest. Ignores (removes) all unjudged runs"); System.out.println(" --light"); System.out.println(" Use light mode"); System.out.println(" --help"); System.out.println(" Shows this message"); System.out.println(" --version"); System.out.println(" Displays version information"); System.out.println(); System.out.println(" Client options:"); System.out.println(" --presenter"); System.out.println(" connect to a CDS and control it"); System.out.println(" --client"); System.out.println(" connect to a CDS in slave (view-only) mode"); System.out.println(" --side"); System.out.println(" same as --client, but displays logos suitable for"); System.out.println(" a lower resolution/side display"); System.out.println(" --team"); System.out.println(" same as --client, but displays minimal content, e.g."); System.out.println(" to display on all team machines");
System.out.println(); System.out.println(" Keyboard shortcuts:"); System.out.println(" Ctrl-Q - Quit"); System.out.println(" r - Rewind"); System.out.println(" 0 - Restart (jump to beginning)"); System.out.println(" 2 - Fast forward (jump one step without delays)"); System.out.println(" 1 - Fast rewind (jump one step back without delays)"); System.out.println(" +/up - Speed up (reduce resolution delay)"); System.out.println(" -/down - Slow down (increase resolution delay)"); System.out.println(" j - Reset resolution speed"); System.out.println(" p - Pause/unpause scrolling"); System.out.println(" i - Toggle additional info"); }
上面提到了个选项judgeQueue,但我运行时加上这个参数似乎没什么效果,我以为是像在2018 ICPC World Final滚榜前展示的那个各队提交的通过情况judge queue一览。可能是我姿势不对。
// find a problem with matching ordinal IProblem[] probs = contest.getProblems(); for (IProblem p : probs) { if (p.getOrdinal() == problem.getOrdinal()) { add(problem, ID, p.getId()); if (problem.getLabel() == null) add(problem, LABEL, p.getLabel()); } } if (problem.getId() == null) { // assume ordinal is an index try { // if no id, assume ordinal A = 0, B = 1, etc. inti= problem.getOrdinal(); if (i >= 0 && i < LETTERS.length()) { add(problem, ID, LETTERS.charAt(i) + ""); if (problem.getLabel() == null) add(problem, LABEL, LETTERS.charAt(i) + ""); } } catch (Exception e) { // ignore } }
// last attempt: if no label, use the id if (problem.getLabel() == null) add(problem, LABEL, problem.getId());
if (org.getName() == null) add(org, "name", org.getActualFormalName());
booleanexists=false; for (IOrganization org2 : contest.getOrganizations()) { if (org2.getActualFormalName().equals(org.getActualFormalName())) { exists = true; instId = org2.getId(); } }
if (org.getName() == null || org.getName().isEmpty()) add(org, "name", org.getActualFormalName()); if (!exists) contest.add(org);
Teamteam=newTeam(); for (Property p : list) { if (ID.equals(p.name)) { add(team, ID, p.value); } elseif ("external-id".equals(p.name)) add(team, ICPC_ID, p.value); elseif (NAME.equals(p.name)) add(team, NAME, p.value); elseif ("region".equals(p.name)) { IGroup[] groups = contest.getGroups(); for (IGroup g : groups) { if (g.getName().equals(p.value)) add(team, "group_id", g.getId()); } } }
add(team, "organization_id", instId);
// if we already have a team name, let it stand ITeamexisting= contest.getTeamById(team.getId()); if (existing != null && existing.getName() != null) add(team, NAME, existing.getName());
// don't change submission time ISubmissionoldS= contest.getSubmissionById(s.getId()); if (oldS != null) add(s, TIME, Timestamp.format(oldS.getTime()));
ISubmissions= contest.getSubmissionById(runId); if (s != null) { IProblemp= contest.getProblemById(s.getProblemId()); intnn= Integer.parseInt(n); if (p != null && p.getTestDataCount() < nn) { Problempp= (Problem) ((Problem) p).clone(); add(pp, "test_data_count", n); contest.add(pp); } }
// make sure judgement exists before runs that refer to it IJudgementj= contest.getJudgementById(runId); if (j == null) { Judgementsj=newJudgement(); add(sj, "id", runId); add(sj, "submission_id", runId);
for (Object ob : map.keySet()) { if (ob instanceof String) { Stringkey= (String) ob; Objectval= map.get(key); Stringvalue=null; if (val != null) value = val.toString();
if ("letter".equals(key)) problem.add("label", value); elseif ("short-name".equals(key)) { if (problem.getId() == null) problem.add("id", value); if (problem.getName() == null) problem.add("name", value); } else problem.add(key, value); } }
2022.04.30 20:10.03 I Connection failed to resolver.tsv, trying again java.net.MalformedURLException: no protocol: nullresolver.tsv at java.base/java.net.URL.<init>(URL.java:674) at java.base/java.net.URL.<init>(URL.java:569) at java.base/java.net.URL.<init>(URL.java:516) at org.icpc.tools.contest.model.feed.RESTContestSource.createConnection(RESTContestSource.java:223) at org.icpc.tools.contest.model.feed.RESTContestSource.downloadIfNecessaryImpl(RESTContestSource.java:316) at org.icpc.tools.contest.model.feed.RESTContestSource.downloadIfNecessary(RESTContestSource.java:291) at org.icpc.tools.contest.model.feed.RESTContestSource.getFile(RESTContestSource.java:244) at org.icpc.tools.resolver.Resolver.loadSteps(Resolver.java:450) at org.icpc.tools.resolver.Resolver.main(Resolver.java:199) 2022.04.30 20:10.03 I Connection failed to resolver.tsv again, trying again after 500ms java.net.MalformedURLException: no protocol: nullresolver.tsv at java.base/java.net.URL.<init>(URL.java:674) at java.base/java.net.URL.<init>(URL.java:569) at java.base/java.net.URL.<init>(URL.java:516) at org.icpc.tools.contest.model.feed.RESTContestSource.createConnection(RESTContestSource.java:223) at org.icpc.tools.contest.model.feed.RESTContestSource.downloadIfNecessaryImpl(RESTContestSource.java:316) at org.icpc.tools.contest.model.feed.RESTContestSource.downloadIfNecessary(RESTContestSource.java:291) at org.icpc.tools.contest.model.feed.RESTContestSource.getFile(RESTContestSource.java:244) at org.icpc.tools.resolver.Resolver.loadSteps(Resolver.java:450) at org.icpc.tools.resolver.Resolver.main(Resolver.java:199)