Add the initial translation of chapter "appendix" (#1325)
parent
baf30b1c92
commit
316b0e9215
After Width: | Height: | Size: 86 KiB |
@ -0,0 +1,47 @@
|
|||||||
|
# Contributing
|
||||||
|
|
||||||
|
Due to the limited abilities of the author, some omissions and errors are inevitable in this book. Please understand. If you discover any typos, broken links, missing content, textual ambiguities, unclear explanations, or unreasonable text structures, please assist us in making corrections to provide readers with better quality learning resources.
|
||||||
|
|
||||||
|
The GitHub IDs of all [contributors](https://github.com/krahets/hello-algo/graphs/contributors) will be displayed on the repository, web, and PDF versions of the homepage of this book to thank them for their selfless contributions to the open-source community.
|
||||||
|
|
||||||
|
!!! success "The charm of open source"
|
||||||
|
|
||||||
|
The interval between two printings of a paper book is often long, making content updates very inconvenient.
|
||||||
|
|
||||||
|
In this open-source book, however, the content update cycle is shortened to just a few days or even hours.
|
||||||
|
|
||||||
|
### Content fine-tuning
|
||||||
|
|
||||||
|
As shown in the figure below, there is an "edit icon" in the upper right corner of each page. You can follow these steps to modify text or code.
|
||||||
|
|
||||||
|
1. Click the "edit icon". If prompted to "fork this repository", please agree to do so.
|
||||||
|
2. Modify the Markdown source file content, check the accuracy of the content, and try to keep the formatting consistent.
|
||||||
|
3. Fill in the modification description at the bottom of the page, then click the "Propose file change" button. After the page redirects, click the "Create pull request" button to initiate the pull request.
|
||||||
|
|
||||||
|
![Edit page button](contribution.assets/edit_markdown.png)
|
||||||
|
|
||||||
|
Images cannot be directly modified and require the creation of a new [Issue](https://github.com/krahets/hello-algo/issues) or a comment to describe the problem. We will redraw and replace the images as soon as possible.
|
||||||
|
|
||||||
|
### Content creation
|
||||||
|
|
||||||
|
If you are interested in participating in this open-source project, including translating code into other programming languages or expanding article content, then the following Pull Request workflow needs to be implemented.
|
||||||
|
|
||||||
|
1. Log in to GitHub and Fork the [code repository](https://github.com/krahets/hello-algo) of this book to your personal account.
|
||||||
|
2. Go to your Forked repository web page and use the `git clone` command to clone the repository to your local machine.
|
||||||
|
3. Create content locally and perform complete tests to verify the correctness of the code.
|
||||||
|
4. Commit the changes made locally, then push them to the remote repository.
|
||||||
|
5. Refresh the repository webpage and click the "Create pull request" button to initiate the pull request.
|
||||||
|
|
||||||
|
### Docker deployment
|
||||||
|
|
||||||
|
In the `hello-algo` root directory, execute the following Docker script to access the project at `http://localhost:8000`:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
Use the following command to remove the deployment:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker-compose down
|
||||||
|
```
|
@ -0,0 +1,3 @@
|
|||||||
|
# Appendix
|
||||||
|
|
||||||
|
![Appendix](../assets/covers/chapter_appendix.jpg)
|
After Width: | Height: | Size: 124 KiB |
After Width: | Height: | Size: 103 KiB |
@ -0,0 +1,68 @@
|
|||||||
|
# Programming environment setup
|
||||||
|
|
||||||
|
## Install IDE
|
||||||
|
|
||||||
|
We recommend using the open-source, lightweight VS Code as your local Integrated Development Environment (IDE). Visit the [VS Code official website](https://code.visualstudio.com/) and choose the version of VS Code appropriate for your operating system to download and install.
|
||||||
|
|
||||||
|
![Download VS Code from the official website](installation.assets/vscode_installation.png)
|
||||||
|
|
||||||
|
VS Code has a powerful extension ecosystem, supporting the execution and debugging of most programming languages. For example, after installing the "Python Extension Pack," you can debug Python code. The installation steps are shown in the following figure.
|
||||||
|
|
||||||
|
![Install VS Code Extension Pack](installation.assets/vscode_extension_installation.png)
|
||||||
|
|
||||||
|
## Install language environments
|
||||||
|
|
||||||
|
### Python environment
|
||||||
|
|
||||||
|
1. Download and install [Miniconda3](https://docs.conda.io/en/latest/miniconda.html), requiring Python 3.10 or newer.
|
||||||
|
2. In the VS Code extension marketplace, search for `python` and install the Python Extension Pack.
|
||||||
|
3. (Optional) Enter `pip install black` in the command line to install the code formatting tool.
|
||||||
|
|
||||||
|
### C/C++ environment
|
||||||
|
|
||||||
|
1. Windows systems need to install [MinGW](https://sourceforge.net/projects/mingw-w64/files/) ([Configuration tutorial](https://blog.csdn.net/qq_33698226/article/details/129031241)); MacOS comes with Clang, so no installation is necessary.
|
||||||
|
2. In the VS Code extension marketplace, search for `c++` and install the C/C++ Extension Pack.
|
||||||
|
3. (Optional) Open the Settings page, search for the `Clang_format_fallback Style` code formatting option, and set it to `{ BasedOnStyle: Microsoft, BreakBeforeBraces: Attach }`.
|
||||||
|
|
||||||
|
### Java environment
|
||||||
|
|
||||||
|
1. Download and install [OpenJDK](https://jdk.java.net/18/) (version must be > JDK 9).
|
||||||
|
2. In the VS Code extension marketplace, search for `java` and install the Extension Pack for Java.
|
||||||
|
|
||||||
|
### C# environment
|
||||||
|
|
||||||
|
1. Download and install [.Net 8.0](https://dotnet.microsoft.com/en-us/download).
|
||||||
|
2. In the VS Code extension marketplace, search for `C# Dev Kit` and install the C# Dev Kit ([Configuration tutorial](https://code.visualstudio.com/docs/csharp/get-started)).
|
||||||
|
3. You can also use Visual Studio ([Installation tutorial](https://learn.microsoft.com/zh-cn/visualstudio/install/install-visual-studio?view=vs-2022)).
|
||||||
|
|
||||||
|
### Go environment
|
||||||
|
|
||||||
|
1. Download and install [go](https://go.dev/dl/).
|
||||||
|
2. In the VS Code extension marketplace, search for `go` and install Go.
|
||||||
|
3. Press `Ctrl + Shift + P` to call up the command bar, enter go, choose `Go: Install/Update Tools`, select all and install.
|
||||||
|
|
||||||
|
### Swift environment
|
||||||
|
|
||||||
|
1. Download and install [Swift](https://www.swift.org/download/).
|
||||||
|
2. In the VS Code extension marketplace, search for `swift` and install [Swift for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=sswg.swift-lang).
|
||||||
|
|
||||||
|
### JavaScript environment
|
||||||
|
|
||||||
|
1. Download and install [Node.js](https://nodejs.org/en/).
|
||||||
|
2. (Optional) In the VS Code extension marketplace, search for `Prettier` and install the code formatting tool.
|
||||||
|
|
||||||
|
### TypeScript environment
|
||||||
|
|
||||||
|
1. Follow the same installation steps as the JavaScript environment.
|
||||||
|
2. Install [TypeScript Execute (tsx)](https://github.com/privatenumber/tsx?tab=readme-ov-file#global-installation).
|
||||||
|
3. In the VS Code extension marketplace, search for `typescript` and install [Pretty TypeScript Errors](https://marketplace.visualstudio.com/items?itemName=yoavbls.pretty-ts-errors).
|
||||||
|
|
||||||
|
### Dart environment
|
||||||
|
|
||||||
|
1. Download and install [Dart](https://dart.dev/get-dart).
|
||||||
|
2. In the VS Code extension marketplace, search for `dart` and install [Dart](https://marketplace.visualstudio.com/items?itemName=Dart-Code.dart-code).
|
||||||
|
|
||||||
|
### Rust environment
|
||||||
|
|
||||||
|
1. Download and install [Rust](https://www.rust-lang.org/tools/install).
|
||||||
|
2. In the VS Code extension marketplace, search for `rust` and install [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer).
|
Loading…
Reference in new issue