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

Автор snapdragon3101, 7 лет назад, По-английски

Check : https://cpeditor.github.io

Hi Guys !

You guys are truly amazing. I created CP Editor around 3 months ago just for fun and personal use, never wanted to make it public but anyways, I decided to make it public with this blog. I got so much love and support that I could not hold myself back from improving it, in following weeks I released the second version in this blog. Fixing a lot of issues and bringing new features.

Let's get into what is new in this release of CP Editor. But first,

Merry Christmas programmers!!

Thanks to ouuan for his wonderful contributions. Almost all new features were implemented by him.

What's New

More information
  • [NEW] Editor now only prompts to save on exit, if unmodified changes are present.
  • [NEW] Title-bar shows * for unsaved files.
  • [NEW] Verdict now shows colors. WA in Red and AC in Green.
  • You can Expand the size of the Input, Output and Message box.
  • Now you can Read Input from files in Input boxes.
  • Editor now also Optionally accepts Expected Output that you can use to check against your program's stdout.
  • Editor also Shows Verdict If you have provided Expected Output. Verdict can be any of three :
    • AC : Accepted, Verdict given when Output matches with Expected Output
    • WA : Wrong Answer, Verdict given when Output does not matches with Expected Output
    • ** : Unknown, Either Expected or Your Program's stdout is Empty.
  • Diff viewer has been added to check the difference between the Expected and Produced Output. (Click More to view Diff)
  • Set Tab Size.
  • Added Competitive Companion in the Editor. So no need to copy paste Input/Output manually, Competitive Companion fetches testcases for you. Set it up as follow :
Setting Competitive Companion

What's Fixed

  • [New] Fixed Issue when even if expected and produces output were same, the editor still produced WA.
  • [New] Fixed an Issue where upon format, there was a chance of command window to blink.
  • [New] Fixed Application Crash when Companion Server was restarted.
  • [New] Fixed Issue where AppImage would crash on Some Ubuntu 18.04.
  • Fixed the issue where { always automatically added a new line with }
  • Fixed Tab and Spaces mix-up, in the old version editor always used Spaces for indentation.
  • Fixed issue where if user was not opted for beta. Still they get beta update notifications.

Troubleshooting and General Information

  • Make sure Competitive companion extension port and CP Editor Companion port are same and above 10,000.
  • Make sure no other server is listening on the port. If this is the reason you may have to change the port to something else that is not being used.
  • Two instances of CP Editor will not be able to run Companion, because only one of them can listen at one port.
  • Competitive Companion can also parse Contests. Make sure you are on a problem page when you press parse Task not on a contest page.
  • If a problem has more than Sample 3 testcases. The Editor will discard all testcases except first three.
  • I have not much experience with Windows, So if your OS has a firewall that prevents CP Editor from listening or request from arriving, you may need to add an exception for the port in your Anti-virus or firewall settings.

Download

Sources : https://github.com/coder3101/cp-editor2

Download : https://github.com/coder3101/cp-editor2/releases

Support me with Stars**
  • Проголосовать: нравится
  • +123
  • Проголосовать: не нравится

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

How can I use it in my Ubuntu ?

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

"An invalid payload was delivered on the listening port"

The above error is coming when we click on the browser extension on codeforces.What to do now, i have checked they have same port no configured.

»
7 лет назад, скрыть # |
← Rev. 3  
Проголосовать: нравится +5 Проголосовать: не нравится

Hey)

Recently I've started to use this editor, and I like it very much so far) Here some of my thoughts)

1) The size of output boxes and compiler messages box size could be flexible, because on small monitors there is just not enough space for code editor window.

2) An option to make a new .cpp file after parsing a task could be very convenient. Like it would be possible to choose a folder, and when I parse a task, a file with the task name automatically is made.

3) I cannot figure out why the expected output thing sometimes does not work. It works for sums of numbers for example. But for this task https://codeforces.me/contest/1277/problem/B it does not work for some reason. It prints WA when the output is clearly the same.

4) Make run and compile possible using a hotkey

5) Make an option to make WA and AC red and green colors, so I'll will be able to immediately see the verdict

Keep up the good work, I'll definitely follow this project)

EDIT: here an img of bug that I mentioned in (3) https://imgur.com/a/7Q6miXw

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

Is there any way to update instead of download new version and install it?

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

I have been using this text editor and its really cool.I just wanted to share a few things i have experienced multiple times-

1) There's some issue when we use mouse to select a range of code,and try to copy or do something,i mean, there's no problem in copying but i was not able to select the lines of code as normally as we could have done.There's some issue there.

2)There were problems that i was solving, that got executed in other online compilers and also got AC in codeforces but I was getting error in the text editor( and i was just finding whats wrong in my code when there was none). The error message i was getting is "Error occured during execution...Non-zero exit code -1073741571" Here is one of the submissions if you want to refer it: 67448850. You may try it for any test case.

3) When we press '(' followed by ')' key, we get only one pair of bracket but this doesn't happen in case of the following keys- ',"(single inverted and double inverted) where we get two pairs if we press twice.Please make it behave the same as bracket.

But altogether a great experience, and thanks for this editor.

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

Does this work on Macintosh??snapdragon3101

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

So i have been using this editor for the whole day today, and i'm totally in love with this.

I was really in need of something like this :P

I would like to request/recommend some more features which will surely enhance this awesome editor.

  1. Support for more themes ( I really like my Monokai Theme :P ).
  2. Feature that lets you comment a block of code using [ Ctrl ]+[ / ]
  3. Auto Completion
  4. Some more blocks for test cases, maybe scrollable (Not a Must tho)

Thanks to snapdragon3101 and all devs for creating this. <3

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

    Support for more themes! Okay, It can be added easily.

    Comment with CTRL+/ is already in progress.

    Auto completion requires at least some kind of LSP which slows down stuff! However auto completion like that of Geany could be added. It's already in progress, actually I am stuck at one of dependency to add this feature. So as soon as it's done, it will rollout!

    I thought 3 would be enough as mostly CF problem or other problems don't have more than 3 testcases. It also requires doing some UI tweaks which i don't want to do now. Maybe Later.

    Here is what you should do:

    Open issue on the above GitHub, that way you can track the progress of your feature requests! Open 2 issues one for CTRL+/ comment and other for Monkai theme. Issues also help us (devs) to remember what our users want.

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

Is there a way to make snippets?

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

[Format feature will not work as your format command is not valid]. I am getting this error. Please help.