wheerdam / merccc Goto Github PK
View Code? Open in Web Editor NEWMercury Control Center source repository
Home Page: https://wheerdam.github.io/merccc/index.html
License: Apache License 2.0
Mercury Control Center source repository
Home Page: https://wheerdam.github.io/merccc/index.html
License: Apache License 2.0
The batch file generated by the installer refers to an absolute path for the JRE's 'java' program. This necessitates reinstallation of merccc every time the JRE is updated on the host computer.
If multiple teams have the same numeric ID, no error would be thrown by the program. It only results in duplicate entries in the Team Selection and Classification controls, and assorted misbehaviors due to shared ID.
The team that is defined later in the configuration file will override earlier team definitions.
The command parser splits the commands by spaces, so if the filename has a space, the command will fail because it sees more than 1 argument.
The local socket API commands add-time
, trigger-display-change
, and trigger-display-rank-start
do not reply with OK if they were successful.
If the server is running in headless mode via the --headless
option, the client won't be able to download the server-side resources even if the --copyresources
option is used on both ends.
The server-side SocketInterface
uses the getResourcePath
method of ControlCenter
to get the path to the resources directory. This method returns null
in headless mode because the resourcePath
field is initialized in the GUI initialization code path in ControlCenter.java
which is not run in headless mode.
The DisplayClient.connect
routine does not clean up the tmp
directory that is created if a zip file is loaded locally with the -z
option.
If the user has a score with +1/Undo score type and typed in an invalid number in the "Add Score" dialog, clicking on either the +1 or Undo button will cause an uncaught NumberFormatException:
Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "2.0z"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.lang.Double.parseDouble(Double.java:538)
at org.osumercury.controlcenter.gui.ControlFrame$ScoringUpUndoActionListener.actionPerformed(ControlFrame.java:1420)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
...
The "Add Score" dialog is the only place where this is possible since the score text field would not be user-editable otherwise.
A score that results in the value Double.NaN
can be committed to the score list on an instance of Team
. However, since the NaN
value can not be compared (always returns false since it doesn't make any sense to compare numbers with... well, not a number), the Team.getBestScore()
method will return null
if the team only has NaN
scores, while Team.hasScore()
will still return true.
The score update callback on DisplayFrame
checks whether the team has any score with the hasScore()
method before calling getBestScore()
to render the current best score for the active team. This results in a NullPointerException
if the team only has NaN
score entries since hasScore()
will return true if all the scores are NaN
values yet it gets a null
with getBestScore()
.
Possible solutions:
DisplayFrame
callback to avoid the exceptionThe first solution seems to be the best way since a NaN
score does not make any sense at all unless the software is scoring some funky scoring system that does not adhere to common arithmetic.
Note that a divide-by-zero with Double
values can return Double.POSITIVE_INFINITY
or Double.NEGATIVE_INFINITY
, which are comparable and handled fine by the program (AFAIK). Not sure if this behavior should stay if the first solution is implemented.
The only times the client syncs with the server's team annotations are when each team is set an annotation and when it is cleared.
If a display client connects to a merccc server with teams that have annotations, the teams may not show up in the classification list because the client's state doesn't have those annotations.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.