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

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

TestManager

Hello, I would like to introduce the plugin FastOlympicCoding for Sublime Text.
It provides several useful features for competitive programming.

Test Manager
  • The main feature is test managing. You can effectively add, edit, and delete tests. See the screenshot above.
Debugger
  • Also for OSX, there is a debug functions.

Debugger

Class Completions
  • The next feature is class completions.
  • Write chars as classes for a template substitution.

ClassComplete

CppLint
  • C++ lint
  • Edit lint properties in settings.

CppLint

Stress Testing
  • You can stress test your program for finding test where it works incorrect.
  • This function requires a program that works correct and a test generator.
  • For further information see instructions on github

Stress


For the additional information and keybindings please visit the github page — https://github.com/Jatana/FastOlympicCoding

Installation
Contribution and Issues
  • Feel free to ask any question or express your ideas here or on github
  • Проголосовать: нравится
  • +245
  • Проголосовать: не нравится

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

Great job! As a Sublime Text user, I have to say thanks :)

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

Amazing work will be very helpful if you can also provide something for java like this

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

Aren't autocompletion, linting and other IDE functions common plugins for many languages?

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

I think the "Compile and Run" should save the file first then compile, as default compile options in sublime does.
Btw, how to change key bindings?

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

It is not working for me on Ubuntu 18.04. When I compile (ctrl-alt-b) gives the following error:

Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 993, in run_
    return self.run(edit, **args)
  File "/home/daniel/.config/sublime-text-3/Packages/FastOlympicCoding/test_manager.py", line 1465, in run
    self.create_opd(clr_tests=clr_tests, sync_out=sync_out, use_debugger=use_debugger)
  File "/home/daniel/.config/sublime-text-3/Packages/FastOlympicCoding/test_manager.py", line 1307, in create_opd
    file_ext = path.splitext(file_name)[1][1:]
  File "./python3.3/posixpath.py", line 125, in splitext
  File "./python3.3/genericpath.py", line 92, in _splitext
AttributeError: 'NoneType' object has no attribute 'rfind'
»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I have installed it from package control but unable to use it.Can somebody please tell what is the next step after installing the plugin?

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

Can anybody help me. When I try to compile it just hung. Can any body give me there settings file. Thank you

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

Hey, I have a feature request, can you automatically fetch test cases from cf problem page into sublime editor? Something like Hightail does?

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

Is there any similar package for python I have switch from c++ to python and i miss it so much Thanks

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

please somebody help..how to use python in sublime text?

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

Can you add support for competitive companion so that we can automatically run the test cases. You could also add a submit soln button using cf tools.

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

can someone tell me , how to modify this so that it will work as given below ..

mmll --> multimap<ll,ll>
msll --> multiset<ll,ll>
dql  --> deque<ll>
  • »
    »
    6 лет назад, скрыть # ^ |
    Rev. 2  
    Проголосовать: нравится -10 Проголосовать: не нравится

    You can use

    typedef multimap<ll, ll> mmll;
    typedef multiset<ll, ll> msll;
    typedef deque<ll> dql;
    

    or

    #define mmll multimap<ll, ll> 
    #define msll multiset<ll, ll> 
    #define dql deque<ll> 
    
  • »
    »
    6 лет назад, скрыть # ^ |
    Rev. 2  
    Проголосовать: нравится +13 Проголосовать: не нравится

    Sublime menubar -> Tools -> FastOlympicCoding -> (in the File opened) cpp_completion_setting. Add any more snippet in the fashion given below.

    "deque":{
    	"template_size": 1,
    	"bind": "d"
    },
    "unordered_map":{
    	"template_size":2,
    	"bind": "D"
    }
    

    Please note that you can only use one char as bind.

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

When I try to compile it only works the first time after I have started Sublime, then when I try to compile something it gets stuck at "compiling" and never finishes. I saw that there are people with similar issues but never found a solution to them.

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

I have a problem where when you save the file the test case gets cleared, is there any ways to fix that.

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

Is there a way to send the code from the Sublime Text?

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

deleted

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

Hey .. just like ctrl+d, which deletes the current testcase, Is there a way to have a key Binding which deletes all the test cases present in the file. Thanks in advance !

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

Recently I tried to use ST because my codeblocks is compiling slow.But I'm facing problem that when there is infinite loop system is crashing.I want feature like codeblocks that whenever I write infinite loop system will not crashes?

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

Will be amazing if it is integrated into VS Code.

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

Hi! IS there a way that we can delete all the existing tests of a program while compiling and enter all tests from the scratch. As deleting one test at a time is kind of annoying. Thanks.

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

The test manager is not reading the input, so i have to stop the program to run and then I have to edit the test after which the programs gets the input and runs successfully. Is there any way it can be fixed?

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

I am facing a problem in the autocompletion feature(Windows). Whenever, i try to autocomplete the recommened stuff for eg. vec to vector<> ,then the std:: appears with it too and it becomes too annoying. I have tried to change the settings but I couldn't succeed. Please help!!!!!!! Refer to the link to see the problem https://www.imageupload.net/image/screenshot-38.klbeJ

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

When I try to input manually it continues infinitely. It should stop by Enter key. But cursor goes down and down when i press enter. It does not stop taking input and does not show output.

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

I am just wondering Where to give input file??

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

Jatana, Is Codeforces contest setup having some issues lately ? I have tried reinstalling and every stuff but when I try to make a new codeforces contest, it just doesnt load the new files and tests for the same ? I would appreciate the help in advance, Thanks !

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

Jatana Can you please make a video tutorial of how to install and setup. it will be helpful for beginners like me.

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

Firstly,this is really a great tool! Thanks to the author! i spend some time to config it, here's how i do it, hope it can help: btw, i use sublime on windows10.

  1. how to use this tool? just download the FastOlympicCoding folder from github and put it in you sublime package folder, here's my location:C:\Users\zzy81\AppData\Roaming\Sublime Text 3\Packages\FastOlympicCoding, and there might be a user folder in the package folder too, it's the config folder for your sublime.

  2. If you don't want to save it before you run cpp, just because it's too annoying, so you can google how to autosave sublime, you just need to add "save_on_focus_lost": true in user setting.

  3. If you dont want to use ctrl+alt+bto run you cpp, just go inside FastOlympicCoding folder and open Default (Windows).sublime-keymap, find ctrl+alt+b and change to anykey combination you want.

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

First of all, sorry for commenting on an old post.

Is there any way by which we can set an upper bound on the runtime of a program and memory usage of a program?

Whenever I have a command such as

while(1)
{
    v.push_back(0);
}

which uses too much memory, my system freezes, and I have to shut down it forcefully.

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

I tried using a js file to auto parse the testcases but when I try to build the file the testcases get deleted. Cans someone help? I tried using HealthyUG setup but apparently its not working for me.

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

For parsing test cases every time I need to left-click and choose "listen to competitive companion" and then use the competitive companion is there any other alternative where I don't need to left-click and choose listen to competitive companion every time?

Sorry for replying to an old post but I am too annoyed and didn't find a solution to this anywhere.

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

Hello, I would like to share a plugin (i.e., custom target) which runs fast olympic coding after the sublime build is executed successfully. This allows user to have a complex build system (for example: having multiple variants like one variant to fast compile and other to slow compile, that is, in debug mode with various checks) along with the functionality of running fast olympic coding.

I tried various modifications in FastOlympicCoding.sublime-settings file but I couldn't find a way to have multiple build variants for a particluar language. Also, the run_settings have fewer options compared to what a build system offers.

Recently, I came to know that we can have a custom target to execute builds and so I thought to give it a shot. I created the plugin and I think it is working great.

The files can be found here. The setup instruction is written as comments in the file itself.

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

Any shortcut key to delete all the test cases at once?

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

    Ctrl + A then Ctrl + D

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

ctrl + alt + B not working on windows for program execution, is anyone facing this problem :(.

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

this is not working on my mac after installing cppfastolympiccoding please help me anybody

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

Does it have the place to change the keymap? As a mac user I'm used to "command" but not "ctrl", can I change the keymap just in this plugin?

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

My C++lint is not working on Fast Olympic Coding ...Is anyone having the same issue?

Please help me to resolve this problem

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

thanks! it really is so much helpful...