question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed when parsing time limit and memory limit on UOJ

See original GitHub issue

As I mentioned in #64, there are many irregular time/memory limits on UOJ.

Most time limits are in this regex format: 时间限制(?:</strong>)?(?::|:)(?:</strong>)? ?\$.*?([1-9][0-9]*).*?\$.

Most memory limits are in this regex format: (?:空间|内存)限制(?:</strong>)?(?::|:)(?:</strong>)? ?\$.*?([1-9][0-9]*).*?(M|G)B.*?\$.

However, there are still a few problems which don’t satisfy these two rules, and there may be more irregular forms in the future.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jmerlecommented, May 11, 2020

I’ve improved the time and memory limit parsing for UOJ in https://github.com/jmerle/competitive-companion/compare/9f0eab3f19c8790db934b605bfe64aca2f88ae7a...197e83c239de0f33c929387c70695b72800003bb. These changes work correctly on all the problems you listed except for 451 and 452 because those problems use a non-standard way of displaying time and memory limits. In case it fails to parse the limits it now falls back to a default time limit of 1000 ms and a default memory limit of 1024 MB.

These changes will go live in 2.16.0 which I am planning to release within the next few hours.

1reaction
jmerlecommented, Mar 29, 2020

~I’ll wait until it’s done, unless that takes longer than expected (lets say 2 weeks) in which case I’ll publish a version using your regex.~

~I’m adding your regex to the UOJ parser, but I’ll wait with publishing it to give the admin some time to implement the feature, unless I have another feature to publish before that happens in which case your regex will be shipped with it (I hope to implement #74 next week).~

Nevermind, back to the original plan, I’m waiting until there is a more structured system for the time/memory limits because your regex only works on the initial html, not on the html after it has been formatted using MathJax.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Avro parsing error in position 893786302. Size of data block ...
BigQuery's limit on loaded Avro file's block size is 16MB ... Unless each row is actually greater than 16MB, you should be able...
Read more >
Performance Notes - Simdjson
Reusing the parser for maximum efficiency ... There is a memory allocation performance cost the first time you process a large file (e.g....
Read more >
Troubleshooting AWS IoT Greengrass
For information about AWS IoT Greengrass quotas (limits), see Service Quotas in the Amazon ... Error: Failed to parse /<greengrass-root>/config/config.json.
Read more >
Understanding memory and time usage - CoreNLP
Limit the size of “documents” you pass to CoreNLP ... In the other direction, if you turn off parsing as well, then 1GB...
Read more >
Error Messages | InfluxData Documentation Archive
The cache maximum memory size exceeded error occurs when the cached memory size increases beyond the cache-max-memory-size setting in the configuration file. By ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found