Giter Club home page Giter Club logo

cpp-environment's Introduction

Deprecated

Moved to atcoder-env

Try Out Development Containers: C++

What is this?

C++ development environment for competitive programming.
This environment is meant to be used in VSCode with a Remote - Containers extension.

Advantage

On any computer, you can use this environment to write/debug C++ source codes for competitive programming.
(VSCode and some of its extensions must be installed.)

Setting up the development container

VS Code Remote - Containers

Follow these steps to open this sample in a container using the VS Code Remote - Containers extension:

  1. If this is your first time using a development container, please ensure your system meets the pre-reqs (i.e. have Docker installed) in the getting started steps.

  2. To use this repository, open a locally cloned copy of the code:

    • Clone this repository to your local filesystem.
    • Press F1 and select the Remote-Containers: Open Folder in Container... command.
    • Select the cloned copy of this folder, wait for the container to start, and try things out!

Things to try

Once you have this sample opened, you'll be able to work with it like you would locally.

Note: This container runs as a non-root user with sudo access by default. Comment out "remoteUser": "vscode" in .devcontainer/devcontainer.json if you'd prefer to run as root.

Some things to try:

  1. Edit:
    • Open main.cpp
    • Try adding some code and check out the language features.
    • Notice that the C++ extension is already installed in the container since the .devcontainer/devcontainer.json lists "ms-vscode.cpptools" as an extension to install automatically when the container is created.
  2. Terminal: Press ctrl+shift+` and type uname and other Linux commands from the terminal window.
  3. Build, Run, and Debug:
    • Open main.cpp
    • Add a breakpoint (e.g. on line 7).
    • Press F5 to launch the app in the container.
    • Once the breakpoint is hit, try hovering over variables, examining locals, and more.

aliases

  • at
    -> atcoder-tools

functions

※ This is a little bit outdated! Please see .devcontainer/conf/.bashrc for more detail.

  • at-gen
    Example: at-gen abc200
    This should run following tasks.

    1. Generate contest directory.
    2. Change directory to abc200.
    3. Open main.cpp for problem A.
      ※ This should also work for the contest of which the first problem is not named A. See the definition in .devcontainer/conf/.bashrc to know how it works.
  • at-open
    Example: at-open abc200
    This should run following tasks.

    1. Change directory to abc200.
    2. Open main.cpp for problem A.
  • at-change
    Example: at-change B
    This should take you to the directory of Problem B in the same contest directory.
    ※ You must be in either the contest directory or the problem directory of the contest directory.
    Eg.
    /workspaces/cpp-environment/atcoder/abc249
    or
    /workspaces/cpp-environment/atcoder/abc249/A

  • at-clean
    Remove all files/directory (other than .gitignore) in atcoder/.

cpp-environment's People

Contributors

k1832 avatar

Watchers

 avatar

cpp-environment's Issues

コンテストフォルダへの移動のパスを動的に解決する

コンテストの1問目が「A」ではないときに移動に失敗する。(例:典型90問

cd /workspaces/cpp-environment/atcoder/$1/A; code /workspaces/cpp-environment/atcoder/$1/A/main.cpp

「コンテストフォルダが作成されたときに、問題ごとのフォルダ名を走査して最初の問題のフォルダに移動・main.cppを開く」ということができるようにする。
以下のようにすればいけそう

  1. コンテストフォルダ以下のフォルダ名を全て取得
  2. フォルダ名をソートして最初にくる名前を一問目のフォルダ名としてパスを解決

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.