Giter VIP home page Giter VIP logo

fastolympiccoding's Introduction

Fast Olympic Coding plugin for Sublime Text 3 & 4

Installation

  • Install via Package Control
  • Install manually:
    download plugin into packages (Preferences — Browse packages...)
    Warning! rename plugin folder to FastOlympicCoding

TestManager

TestManager

TestManager Keybindings

  • ctrl+b (OSX) ctrl+alt+b (Linux + Win) compile and run
  • ctrl+enter new test
  • ctrl+c (OSX) ctrl+x (Linux + Win) kill process
  • ctrl+shift+b (OSX) run with debugger
  • ctrl+d delete test
  • ctrl+super+up/ctrl+super+down (OSX) ctrl+shift+up/ctrl+shift+down (Linux + Win) swap tests
  • cmd+k, cmd+p (OSX) ctrl+k, ctrl+p (Linux + Win) close/open right panel

Settings

  • To edit settings
    • press cmd+shift+p (OSX) ctrl+shift+p (Linux + Win) and type FastOlympicCoding: Open Settings
    • or Preferences — Package Settings — FastOlympicCoding

StressTesting

StressTesting

  • To stress test a solution, you need to implement the three following files:
    • <name>.cpp - program that works incorrect
    • <name>__Good.cpp - program that works correct
    • <name>__Generator.cpp - program that generates tests, you can read a seed for a random generator in the input
  • Type FastOlympicCoding: Make Stress in the command palette to run and FastOlympicCoding: Stop Stress to stop stress testing

ClassCompletion

ClassCompletion

  • Type aliases to substitute them with data types
  • Customize aliases in the settings file

CppLint

CppLint

  • Error highlighting works in real-time
  • Specify custom compile command in the settings file

Debugger

Debugger

  • debugger only for OSX
  • ctrl+shift+b to run with debugger
  • point the cursor on a variable to see its value
  • to select a stack frame (type FastOlympicCoding: Select Frame in the command palette)
  • the only one dependency is xcode (you can install it with xcode-select --install)

fastolympiccoding's People

Contributors

jatana avatar npanuhin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fastolympiccoding's Issues

File doesn't compiles

when i compile a file, it just shows compiling but never compiles.
image

Console log:

Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 1066, in run_
    return self.run(edit, **args)
  File "/home/ayush/.config/sublime-text-3/Packages/FastOlympicCoding/test_manager.py", line 1266, in run
    self.redirect_var_value(var_name, pos=pos)
  File "/home/ayush/.config/sublime-text-3/Packages/FastOlympicCoding/test_manager.py", line 754, in redirect_var_value
    if self.tester.process_manager.has_var_view_api():
AttributeError: 'NoneType' object has no attribute 'process_manager'
[FastOlympicCoding] session saved
[FastOlympicCoding] session saved
indexing [job 78]: no files were indexed out of the 1 queued, abandoning crawl
[FastOlympicCoding] session saved
[FastOlympicCoding] session saved
[FastOlympicCoding] session saved
[FastOlympicCoding] session saved
[FastOlympicCoding] session saved
[FastOlympicCoding] session saved
[FastOlympicCoding] session saved
[FastOlympicCoding] session saved
[FastOlympicCoding] session saved
[FastOlympicCoding] session saved
indexing [job 168]: no files were indexed out of the 1 queued, abandoning crawl
[FastOlympicCoding] process terminating error

WSL support

Hey Jatana,
Could you please add an option to build system that supports wsl2 shell instead of default cmd for windows users?

-run window not opening in macOS

Pressing cmd+b is not opening the -run panel on the side as it is supposed to.
I have to manually do it by opening menu (cmd+shift+p) then fastolympiccoding: run.
I have not interfered with the default settings but I don't know why this is happening also I uninstalled sublime and installed the package again but problem remain same. Is intel based mac is a problem.

heres the console: (after cmd+shift+p --> fastolympiccoding: run )

startup, version: 3211 osx x64 channel: stable
executable: /Applications/Sublime Text.app/Contents/MacOS/Sublime Text
working dir: /
packages path: /Users/hrushikeshpatra/Library/Application Support/Sublime Text 3/Packages
state path: /Users/hrushikeshpatra/Library/Application Support/Sublime Text 3/Local
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/hrushikeshpatra/Library/Application Support/Sublime Text 3/Installed Packages
ignored_packages: ["Vintage"]
pre session restore time: 0.293708
startup time: 0.403882
environment variables loaded using: /bin/zsh -l
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.detect_indentation
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin ShellScript.ShellScript
reloading plugin 0_package_control_loader.00-package_control
reloading plugin Package Control.1_reloader
reloading plugin Package Control.2_bootstrap
reloading plugin Package Control.Package Control
reloading plugin CppFastOlympicCoding.ContestHandler
reloading plugin CppFastOlympicCoding.Cpp_Intellij_Sense
reloading plugin CppFastOlympicCoding.NumberSpliter
reloading plugin CppFastOlympicCoding.olympic_funcs
reloading plugin CppFastOlympicCoding.settings
reloading plugin CppFastOlympicCoding.stress_manager
reloading plugin CppFastOlympicCoding.test_edit
reloading plugin CppFastOlympicCoding.test_manager
plugins loaded
Package Control: Skipping automatic upgrade, last run at 2022-01-25 21:24:19, next run at 2022-01-25 22:24:19 or after
no command for selector: noop:
Running g++ "/Users/hrushikeshpatra/Desktop/cat.cpp" -o "/Users/hrushikeshpatra/Desktop/cat"
[FastOlympicCoding] session saved

how to solve this...

it doesn't save tests

when I make tests and and save it and after that edit the code and compile it , I found that the previous tests isn't stored and I need to write tests another time.
is there a solution for that ?

Compilation issue

Hello. It seems that the last release has an issue. Compilation of a file by Ctrl+Alt+B throws:
g++: error: 'C:\path\to\file\a.cpp': Invalid argument g++: fatal error: no input files compilation terminated.
Compiling .py file is broken too.
python: can't open file ''C:\path\to\file\a.py'': [Errno 22] Invalid argument
I am running Windows 10. After rolling back to 1.3.4 version the issue disappeared.

Sublime Text 4 support

Wasn't able to find FastOlympicCoding in package control (install a package) in Sublime text 4. So, downgraded to Sublime Text 3. for compatibility. Please look into it!

How to stop stress

I just want to make 100 test each time so how can I do it?
I'm a beginner and just learned a little about c++
Thanks

Plugin not working in linux

I tried to run a simple code but the output is not getting printed
Following is the issue...
Screenshot from 2021-04-21 12-36-03

Kindly look on this

Error trying to parse file

After downloading plugin into packages, error occurred as shown in picture below.

_20180720173917

I have no idea to deal with it!

How to change the key bindings

Hey, TBH we can change the default key binding for sure, but can't figure out how. So please tell and also put it to the docs or readme file

automatically omit large I/O

Sublime Text cannot afford big amount of datas in the editor. When I add a large test and run it, all the editor will lag for a while, then the test input are display in the command. Finally, I get 0ms in the test, but it need to be 0.5s or more.

I think this lag depends on the data displayed in the screen. I hope there can be a "max_test_display_length" settings, so that large tests will be omitted and there will be less lags.

You can learn it from submissions of Codeforces. It only shows a small part of each large test.

Request for a feature

Hey Janata,
I just wanted to give a request for a feature such that we can also see the expected outcome / output for the cases within the plugin
. Just a little window beneath the testcases would do.

parsing test cases from codeforces

It would be great if this is able to parse the test cases from codeforces via competitive-companion and we can quickly check the output.
Also, it would be great if we are able to submit from within sublime text.

run time

How to see runtime of a code using FastOlympicCoding?

Not Installing

CppFastOlympicCoding is a very nice and my favorite package. Due to some reasons, I had to reinstall my ubuntu 20.04 LTS operating system. Now I am trying to install CppFastOlympicCoding from last three days but it gives me this error all time(See at Picture below).
Screenshot from 2020-10-21 17-59-00

I'd tried to download manually form github but it also doesn't work.

The sidebar hide automatically?

when I open the compile and run mode,the right panel open,but the sidebar which in the left was hiden automatically.
Maybe that's the sublime's operation instead the FastOlympicCoding,
If FastOlympicCoding has this feature, I want to know how to set, and don't hide the sidebar automatically.

Thanks.

Infinite Loop Situation

Is it possible to kill a 'c++' program automatically after it runs for say 1 second because if its run time is greater than that most probably there is an infinite loop which will hang the computer if it isn't manually killed from task-Manager(which I myself do in these situations).

Compilation error in MacOS

It was working fine with clang.
But then I installed gcc.
Now it shows the following compilation error

ld: unknown option: --stack=268435456
collect2: error: ld returned 1 exit status

Please tell me what to do to tackle this problem.

use c++17

Why did I get an error when I changed -std=c++11 to -std=c++17 when compiling, can this be changed?

Compile Issue

If there are space or any punctuation mark in directory folder name or file name, gives compilation error.
Screenshot from 2020-09-20 14-26-37

Need debugger for windows

Everytime we have to see the variable and also value , it is right or wrong !!! so, please....create debugging feature for windows .

Changing Colors of input and ouput

Well one thing to note is that the colors of integer output are different from character output data..
This ain't much of a problem but it does affect the perceiving the output data and such..
So I was just wondering that is it possible to have single color for the same and also is it possible to customize the colors as per the desired..
Thanks in advanced for the same!

How to disable generating test file automaitically?

Sorry to open this stupid issue, but in most cases, I really don't need to do some test. In default config settings file,
I can't find any parameter to disable automatically generating test file after I compile and run.

My system is ubuntu20.04 LTS, and sublime version is Build 4113.

Thanks.

compile issue in mac

first it is not start when i press cmd + b or ctrl + b ( after pressing cmd + shift + p and then select FastOlympicCoding run side window appear) and just stop at compiling and after press ctrl + ~ it shows

using gpu buffer for window
Running g++ "/Users/madhurjoshi/Competitive Programming/Competions/e.cpp" -o "/Users/madhurjoshi/Competitive Programming/Competions/e" && "/Users/madhurjoshi/Competitive Programming/Competions/e"
[FastOlympicCoding] session saved
Traceback (most recent call last):
File "/Users/madhurjoshi/Library/Application Support/Sublime Text 3/Packages/FastOlympicCoding-master/test_manager.py", line 972, in compile
cmp_data = process_manager.compile()
File "/Users/madhurjoshi/Library/Application Support/Sublime Text 3/Packages/FastOlympicCoding-master/Modules/ProcessManager.py", line 71, in compile
cmd = self.get_compile_cmd()
File "/Users/madhurjoshi/Library/Application Support/Sublime Text 3/Packages/FastOlympicCoding-master/Modules/ProcessManager.py", line 51, in get_compile_cmd
for x in opt:
TypeError: 'NoneType' object is not iterable
[FastOlympicCoding] process terminating error
[FastOlympicCoding] session saved
Traceback (most recent call last):
File "/Users/madhurjoshi/Library/Application Support/Sublime Text 3/Packages/FastOlympicCoding-master/test_manager.py", line 972, in compile
cmp_data = process_manager.compile()
File "/Users/madhurjoshi/Library/Application Support/Sublime Text 3/Packages/FastOlympicCoding-master/Modules/ProcessManager.py", line 71, in compile
cmd = self.get_compile_cmd()
File "/Users/madhurjoshi/Library/Application Support/Sublime Text 3/Packages/FastOlympicCoding-master/Modules/ProcessManager.py", line 51, in get_compile_cmd
for x in opt:
TypeError: 'NoneType' object is not iterable
Running g++ "/Users/madhurjoshi/Competitive Programming/Competions/e.cpp" -o "/Users/madhurjoshi/Competitive Programming/Competions/e" && "/Users/madhurjoshi/Competitive Programming/Competions/e"
Running g++ "/Users/madhurjoshi/Competitive Programming/Competions/e.cpp" -o "/Users/madhurjoshi/Competitive Programming/Competions/e" && "/Users/madhurjoshi/Competitive Programming/Competions/e"

how to correct it please help sir (and what to chose in build system)

Add new tests not working in sublime text 4

Recently I updated my sublime text 3 to sublime text 4 and found out while solving problems that the add new tests feature is not working, whenever I add new tests manually, the extension hangs and I need to restart sublime.

1-based indexing of tests

Hi !
I want to change my setup to have 1-based indexing for the tests. I tried to go throgh the code but didnt find how to do so. Can you please help me how to do so ?

(brief : The place where its shows "Test 0", I want it to start from "Test 1")

Ignore trailing whitespaces

There are cases where trailing spaces are being printed for every testcase in the end. But in the correct answers list, if the expected answer contains no trailing testcases in the end, the solution is not getting accepted. Please provide a fix to ignore trailing spaces after every testcase

Linkage for C++ with libXL library

I was trying to compile C++ with libXL for Excel.

Here is the code:

#include <iostream>
#include "../libxl/include_cpp/libxl.h"

using namespace libxl;

int main() 
{
    Book* book = xlCreateBook(); // xlCreateXMLBook() for xlsx
    if(book)
    {
        Sheet* sheet = book->addSheet(/*L*/"Sheet1");
        if(sheet)
        {
            sheet->writeStr(2, 1, /*L*/"Hello, World !");
            sheet->writeNum(3, 1, 1000);
        }
        book->save(/*L*/"example.xls");
        book->release();
    } 
    return 0;
}

It is giving this error:

C:\Users\abhijit\AppData\Local\Temp\cc2Ip6Ru.o:test2.cpp:(.text+0xf): undefined reference to `xlCreateBookA'

collect2.exe: error: ld returned 1 exit status

I think there is some linkage issue.
How can I fix/include this in the package for Sublime editor?

E.g. in Qt C++ package:

   - add the following lines to a configuration file (.pro):

     INCLUDEPATH = c:/libxl-3.6.4.0/include_cpp
     LIBS += c:/libxl-3.6.4.0/lib/libxl.lib

   - copy bin\libxl.dll to the build directory of your project 

Please help!

How to stop Build

When I build a file and the program infinitely loops, how to stop the fastolympic coding
It doesn't allow to stop I have to restart sublime text every time. PLS HELP

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.