Блог пользователя Egor

Автор Egor, 12 лет назад, По-русски

Изменения:

Enhancement Add universal interface for task generation
Enhancement Tester: ability to pass message from checker irrespective from verdict type
Defect New Task: default directory should be created if absent
Enhancement Create action to copy full source in order to submit to judges that do not provide file selection as option
Enhancement Task generation: support for CodeChef

Теперь можно генерировать не только таски на весь контест, но и отдельную таску из архива - в качестве id надо ввести "номер_контеста буква_таски", например, "128 B". Кроме того, введена поддержка CodeChef. Тесты на нем структурированы гораздо хуже, так что используется эвристика. Возможно добавление в тест пустых строк, а так же может вообще не сработать. На последних 10 контестах все таски генерируются, проверено. Id для контеста - последняя часть url его страницы, например - NOV11. Id для таски из архива - ее Problem code (например, "LCM"), а для таски из контеста - "contest_id problem_code" (например, "NOV11 DOMNOCUT")
Так же добавлена еще одна акция, которая просто копирует содержимое Main.java (созданный файл) в буфер обмена. Полезно для джаджей, которые не поддерживают отправку файла

Ссылка на плагин, конфигурация не изменилась
  • Проголосовать: нравится
  • +9
  • Проголосовать: не нравится

12 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится
Thanks Egor for the effort. Your help to community is really appreciated.
I tried to setup the plugin. Facing various issues,
- Unable to inline library code into topcoder code.
- Can't find 'Run Task' button
- After i tried couple of things, the CHelper menu title disappeared from Main Menu.
- Now when i try to hit Run against a class, I get the below exception.

configuration file (both USER_DIR\.IntelliJIdea10\config\plugins and PROJ_ROOT_DIR)- http://pastebin.com/F7my1jFR

Exception thrown - http://pastebin.com/erF33zPW

If it is not too much trouble and you have some time to spare, it will be really helpful if you uploaded a screencast with a demo of how to setup your plugin and use it for Topcoder and Codeforces.

Thanks.
  • 12 лет назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится
    I'll andwer you after today's COCI contest
  • 12 лет назад, # ^ |
      Проголосовать: нравится +1 Проголосовать: не нравится
    That exception happens when file associated with task (i.e. Task.java) is deleted. I will wrap it with apporopriate actions (dialog that would suggest to delete task) in the next version
    What is suspectible in your configuration that is TopCoder directory - are you sure it is relative path from project root and source directory in default package?
    I would like to make screencast, but currently do not have access for computer, which has small enough monitor but powerful enough processor.
    • 12 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится
      Thanks for the prompt reply.
      My Idea Project Name is Contests located at C:\Rajat\Codes\Contests
      Under the project, i have a directory named 'topcoder', which is the 'Module Content Root' for the module 'topcoder'. Under the 'topcoder' folder, I have a regular dir, 'TCProject'. Under TCProject, 'srm' is the 'src folder'. This is the location where the TC Arena Plugin dumps source files.

      Please let me know if i am doing something wrong here.
      • 12 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится
        Are you sure you use moj as topcoder plug-in?
        In order to inline code you need to run your problem using either Run (Shift+F10) or Debug (Shift+F9)
        • 12 лет назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится
          I use an IDEA plugin, TopcoderParser to generate source. For reading source from file and compiling to arena, i use FileEdit. Does your plugin work with moj only?
          • 12 лет назад, # ^ |
              Проголосовать: нравится 0 Проголосовать: не нравится
            I'm not sure - if it generates similar code (i.e. my parser able to parse tests from code generated by your plugin) - it should be ok. TopCoder tasks should generate automatically when you open task in arena if it correctly parsed. My own TC plug-in which would just pass needed info to Idea plugin is in plans
            • 12 лет назад, # ^ |
                Проголосовать: нравится 0 Проголосовать: не нравится
              Here is the sample stub generated for Topcoder problems,
              http://pastebin.com/AtcXB67r

              And here is RETester.java which resides in the same package (default package) in the source folder ('srm')
              • 12 лет назад, # ^ |
                  Проголосовать: нравится 0 Проголосовать: не нравится
                Defenately would not work - try using moj. It also works with FileEdit and CodeProcessor
                • 12 лет назад, # ^ |
                    Проголосовать: нравится 0 Проголосовать: не нравится
                  I will try that and update the thread. Although, do you think this will solve the issue of the exception being thrown by the Intellij too?
                  • 12 лет назад, # ^ |
                      Проголосовать: нравится 0 Проголосовать: не нравится
                    Exception is thrown because you tried to run task without associated .java file (I think, you tried to create task manually)
                    • 12 лет назад, # ^ |
                        Проголосовать: нравится 0 Проголосовать: не нравится
                      Where does it expect the .java file to be. I tried to run task by hitting the green play button (which comes in IDEA) against a class which was already there in the topcoder's src dir.
                      • 12 лет назад, # ^ |
                          Проголосовать: нравится 0 Проголосовать: не нравится
                        That java file would be created automatically when you use correct plug-in
                        • 12 лет назад, # ^ |
                            Проголосовать: нравится 0 Проголосовать: не нравится
                          Ok. Let me setup moj and see how it works. It may be because of topcoder problem only, but i havnt been able to use it for Codeforces too. But i think i should try what you suggested before asking more questions. 
                • 12 лет назад, # ^ |
                    Проголосовать: нравится 0 Проголосовать: не нравится
                  I tried with moj. Everything seems to be working fine now. Although there's one last bit piece that annoys. Everytime i restart IDEA, the CHelper menu vanishes from main menu and i have to customize by going to Settings again. Is it expected?
12 лет назад, # |
  Проголосовать: нравится +7 Проголосовать: не нравится
Не могу не попросить писать "задача" вместо "таска" :о)
И еще -- "Так же добавлена еще одна акция" -- пришлось переключаться в английский чтобы понять что это значит :о

  • 12 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится
    Мне надо как-то обозначить вполне конкретную сущность и мне кажется, что "задача" будет допускать слишком много толкований.
    По второму пункту - действие, ИМХО, звучит еще хуже в данном контексте