Блог пользователя d-agrawal

Автор d-agrawal, история, 4 года назад, По-английски

Hello All!

A competitive programming extension for VS Code!

I have created an extension for Visual Studio Code that makes testing, creating, and downloading testcases very easy. It is similar to CPPFastOlympicCoding for Sublime. Search within VS Code Extensions or download from link below. Works on Windows, Mac, Linux. You need to have G++ ( GCC ) installed.

Extension Name : Competitive Programming Helper

Store Link : https://marketplace.visualstudio.com/items?itemName=DivyanshuAgrawal.competitive-programming-helper

Features

  • Add multiple testcases.

  • Download from Codeforces automatically.

  • Auto compile and run, shows compilation errors, run-time errors ( stack overflow, seg-faults etc).

  • GUI, no manual file editing.

UI

Please try it out and give feedback. Please report issues/ send feature requests here : https://github.com/agrawal-d/competitive-programming-helper

Thanks!

  • Проголосовать: нравится
  • +64
  • Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Amazing extension! Thanks :)

»
4 года назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

I started few months ago similar tool, you can check it here:

I love the way you display testcases in your tool. Unfortunately I don't have too much time to hack on mine this days, but it would be great if I could incorporate this to my tool, are you ok with that? I see you don't have any LICENSE, so I encourage you to add one.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +5 Проголосовать: не нравится

    Your extension is pretty cool! My university examinations are coming soon, so maybe later? And thanks for reminding, I'll add the LICENSE.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Awesome man!!

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Hi , Thank You for developing such a good tool Which port should i set for Competitive Companion to work ?

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Not able to download problem and test cases on clicking chrome extension, was working fine few days ago.

»
4 года назад, # |
Rev. 8   Проголосовать: нравится +3 Проголосовать: не нравится

Can I suggest some ideas ? (These may slowdown the test so can you do a Advance Mode for advance setting allowed ?)

1) Add some more verdicts instead of Success and Failed
2) Advance Settings for Each Testcase
3) Advance Settings for All Testcases
4) Advance Settings for codes

Hope your project become success and well-known <3

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Amazing Extension. but Not able to download problem and test cases on clicking Firefox extension. I have used custom port You given on set up video.but still it's not working.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    The firefox extension have never worked for me. It seems like the port just isn't updated when set. As I couldn't find the local settings file to edit it by myself, I ended up never using it... Copy-pasting a test into a local file is just a matter of seconds after all, even if I'd rather have it done automatically :)

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

what is Your theme name ?

»
4 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Hi, is there a quick howto, simple starter guide? I installed the extension, but there is literaly no button or anything where I can click. How can I download problems/testcases from codeforces?

I am not an expert with VSC. Where to start?

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

This is an amazing extension. I was wondering if it's possible to open the file with a custom code template while parsing

»
4 года назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Does this work on WSL? When running the test cases, it seems the extension is not picking up the output from my program.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

when i press green icon in competitive programming

it says failed to create new file

how parse the problem?

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Been waiting for this for a long time. Thanks a lot. :)

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

If there are multiple correct answers to the problem , will the extension work ?

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I am using this extension for quite a while now and I must say, its really useful, Thank you so much. However, I have been facing an issue from the start. When, I am done with my code and click the green button on the input file to show me the answer, for the first time, it runs for about 10 secs before displaying timed out and SIGTERM error. However, once I close vscode and start again, it runs successfully and shows the desired output. Is there any fix?

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Hey, first thanks for this great tool. But I still don't understand how to debug while using this effectively. I mean I generally don't use a debugger. I just use cout statements. So to do this in VS Code I have to do it in the terminal . But the problem is the file name is generally so big. So what should I do?

»
4 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Hey, I have using this since a month. Recently I switched to new laptop. And whenever I run my program for the 1st time , it shows SIGTERM and then when I run the same code for 2nd time, I says passed. Why is it so?

»
4 года назад, # |
  Проголосовать: нравится +10 Проголосовать: не нравится

anything for "visual studio" not vs code

that would be really helpful.

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

It's an amazing tool, I have been using it for months now, but today somehow, the CPH judge got attached to the VS-code sidebar, instead of the usual view on the right side, Can you please tell me how to fix it?

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Any way to get a judge to a right like it was before ? pls

  • »
    »
    3 года назад, # ^ |
    Rev. 5   Проголосовать: нравится +5 Проголосовать: не нравится
    • Step 1 : Go to Extensions Tab [Ctrl + Shift + X], Search "CP Helper", Select the Downloaded Extension

    • Step 2 & 3 : Click on Down-Arrow Besides "Uninstall" -> "Install Another Version..."

    Step-1-2

    • Step 4 : Select 4.5.5 (1 month ago) or older Version

    Step-3-4

    • Step 5 : Reload VS Code

    Upvote if it was Helpful!

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Thanks for the extension. I am getting one error while using "Ctr+Alt+b" option in vsCode. "Aborted creation of new file" . I have installed the browser extension(Competitive Companion) as well.

Could you please suggest some fix. Thanks. HNY 2021!.

»
3 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

I am using it from last 7 months staright and trust me your creation proved to be the best for me.

»
3 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

The auto submit isnt working please see to this

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Can you add something like, if it makes a new file, it already contains my standard code template.... Btw it's a great extension

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Cool.

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Can we set the default code template as well, since currently we are just able to create a file with the name of of the problem and extracting the test cases. But the code area is blank. Can we have some default code as well?? Thanks

  • »
    »
    3 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Image to extension settings

    In the mentioned image look for the cursor position where you can add the path of your template.cpp or any other file whose contents you want to display as default when CPH create the files! Hope it helps!

    • »
      »
      »
      3 года назад, # ^ |
      Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

      EDIT — PROBLEM FIXED, READ THE REPLY COMMENT TO THIS COMMENT

      It says no settings found for the extension, and whenever I am creating a new file, it asks for the file language and if I dont press in time, or by mistake press somewhere else, error pops up saying aborted creation of new file. Can you please help?

      • »
        »
        »
        »
        3 года назад, # ^ |
        Rev. 4   Проголосовать: нравится 0 Проголосовать: не нравится

        TO ANYONE WHO DOES NOT SEE THE EXTENSION SETTINGS AND HAVING PROBLEM OF "ABORTED CREATION OF NEW FILE"

        FOLLOW THE STEPS:

        1. GO TO : C:\Users\USERNAME\vscode\extensions\divyanshuagrawal.competitive-programming-helper-5.8.5

        2. OPEN package.json FILE

        3. LOCATE "cph.general.defaultLanguage"

        4. CHANGE default VALUE TO LANGUAGE OF YOUR CHOICE

»
3 года назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Heyy!! firstly thanks for this extension, helps a lot, orz!!

Could you add C++20 submission support in it? (you can keep numbers used by CF for different types of submissions).

Again, thanks!

»
2 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

I love this extension. Please add a feature that would show on which line the output does not match with the expected output.

»
2 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Hi and thank you for the amazing extension. Is it possible to make it so that warnings do not show as errors?

»
2 года назад, # |
Rev. 2   Проголосовать: нравится +6 Проголосовать: не нравится

Is it working properly? Testcases always shows TIMED OUT for me from past 10 days.

»
22 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

great tool bro :)..

»
19 месяцев назад, # |
Rev. 2   Проголосовать: нравится +5 Проголосовать: не нравится

SIGTERM int the first test case :

I have been using this tool for sometime now and this is helpful and thank for that , but after every run this gives sigterm for the first test case (even if the answer is correct and can run under 2ms); it gives the time as 2543 ms or something close and when I run the test cases again it is giving test case passed as the output

  • »
    »
    5 месяцев назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    I disabled McAfee antivirus and the SIGTERM error is gone .

    The antivirus treats the code written by us, as a virus

»
9 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

d-agrawal I have to toggle Set ONLINE_JUDGE everytime I run the code. Is there any way to permanently turn this on/off?

  • »
    »
    6 месяцев назад, # ^ |
    Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

    You can add this line to your settings.json file:

    "cph.language.cpp.Args": "-DONLINE_JUDGE"

    It might not show tick mark in the Set ONLINE_JUDGE option, but when compiling, it will use this macro.

»
8 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Test Cases Not running although accepted her , everytime showing "SIGTERM" kindly help anyone

»
7 недель назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

How can I add new language to this extension. I want to add C# in the extension.