羅習五
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 大綱 >[如果你想要看到最新版的說明檔案,請點選此處的連結](https://hackmd.io/LRxysgs2TFK6gSd7R0LCig?both) * 程式開發環境簡介 * 擴充套件 * 支援的程式語言列表 * 內建的『範例程式碼』(內、外部說明) * VSCODE『基本』使用方式說明 * 基本畫面介紹! * 代碼一鍵運行 * 開始執行程式碼 * 停止程式的運行 * 自定義運行邏輯(進階) * 在VSCODE編譯與除錯 * 『編輯、除錯』C程式語言 * 『編輯、除錯』C++程式語言 * 『編輯、除錯』Python程式 * 『編輯』JAVA程式(無法支援圖形化除錯) * 查看文件 * man page(內、外部連結) * 看markdown文件 * Linux的使用簡介(外部連結) * 行程管理 * ps * kill * 家目錄 * .bashrc * .vimrc * .gdbinit * 常用的程式 * ls * vim * sftp * ssh * gcc、g++簡介(外部連結) * 編譯參數 * 如何傳參數給應用程式 * 與vscode的結\合 * 設定執行檔案的參數 * 設定環境變數 * 有用的資源 * markdown語法說明 [resource] * vscode的完整介紹 * 我們使用的套件的介紹 # 程式開發環境簡介 > ## 無法自行安裝extensions(擴充套件) > ## 如果需要安裝擴充套件,請聯絡學校的管管理員 1. 所有檔案請 ***自行備份*** (可以使用sftp),我們無法保證所有伺服器上的檔案都是完好的。 2. 無法使用 root 權限 3. 只可以使用 bash 4. 任何的修改『**幾乎**』(每一秒)立即更新到伺服器 5. 這個服務建立在Docker上,bash後面的『host id』就是『該docker的container id』,如果有任何錯誤請紀錄下這個ID。 6. 如果你使用的『服務』發生嚴重錯誤,可以要求重新啟動『服務』,大部分的資料都不會消失 7. 『家目錄』是 **『/linuxer』** 8. 請注意,只有在 **『/linuxer』** 內的資料會保存在檔案系統中。所有對『/linuxer』的修改會延續到下一次開啟瀏覽器。 9. 『/home』是指向『/linuxer』的『捷徑』(symbolic link) 10. **修改密碼**後可能需要一段時間才會生效 ![](https://i.imgur.com/zEguI04.png) # 支援的程式語言列表 1. C語言:clang gcc(版本 9) 2. C++:clang++ gcc++(版本 9) 3. Java: oracle java 13 4. python:python 2.7、3.6、3.8(預設3.8) 5. perl(v5.26.1) 6. node.js:nodejs (版本 12.13.1) 7. shell script:bash # vscode-server 使用方式說明 ## 基本畫面介紹! 剛進去的畫面 ![剛進去的畫面](https://i.imgur.com/IvUrDyk.png) 功能表說明 ![功能表說明一](https://i.imgur.com/QnyA6Au.png) ## 代碼一鍵運行 >『代碼一件運行的文章的出處』是:https://zhuanlan.zhihu.com/p/54861567 安裝好Code Runner之後,打開你所要運行的文件,有多種方式來快捷地運行你的代碼: > 注意:這個網站預設安裝好『Code Runner』 >> 如果你的網頁沒有安裝『Code Runner』。請自行安裝 * 鍵盤快捷鍵 Ctrl+Alt+N * 快捷鍵 F1 調出 命令面板, 然後輸入 Run Code * 在編輯區,右鍵選擇 Run Code * 在左側的文件管理器,右鍵選擇 Run Code * 右上角的運行小三角按鈕 有這麼多的運行方式,是不是非常地方便? ![](https://i.imgur.com/fEyoHME.png) --- >因為code runner不了解java的語法,而且java不是簡單的可執行檔案,請依照這個圖的方式去執行 > >![](https://i.imgur.com/FhD5U4D.png) > >可以參考『04-IntroductionToEclipse-FirstJavaProject』的設定方法 --- ### 停止代碼運行 如果要停止代碼運行,也有如下幾種方式: * 鍵盤快捷鍵 Ctrl+Alt+M * 快捷鍵 F1 調出 命令面板, 然後輸入 Stop Code Run * 在Output Channel,右鍵選擇 Stop Code Run ![](https://i.imgur.com/0GDS684.png) ### Run in Terminal 在 GitHub Issue 中,用戶問到最多的問題就是亂碼和怎麼支持輸入。通過設置,我們可以把代碼放到 VS Code 內置的 Terminal 來運行,這兩個問題就能迎刃而解了。 選擇 文件 -> 首選項 -> 設置,打開VS Code設置頁面,找到 Run Code configuration,勾上 Run In Terminal 選項。設置之後,代碼就會在 Terminal 中運行了。 ![](https://i.imgur.com/f0ZHMos.png) ### 自定義運行邏輯 對於一些語言,用戶希望能自定義代碼的運行邏輯。比如說,在 Code Runner 中,C++的默認編譯器用的是 g++,也許你希望使用 Clang。那麼你可以在 VS Code 設置頁面,找到 Executor Map 設置項,並且選擇 在settings.json中編輯。 在 settings.json 中,添加 code-runner.executorMap 設置,然後就可以對不同的語言設置自定義的運行邏輯了。下面就是對 Java 配置的一個例子: 如果你想自定義代碼運行邏輯,你可以用到下面的一些變量,在運行時,Code Runner會把相應的變量進行替換: * $workspaceRoot * $dir * $dirWithoutTrailingSlash * $fullFileName * $fileName * $fileNameWithoutExt ## 『編輯、除錯』C程式語言 C語言的視窗 ![](https://i.imgur.com/1EfBqcq.png) 編譯C程式碼 ![](https://i.imgur.com/tEIS24I.png) 除錯(設定中斷點) ![](https://i.imgur.com/8cFF70S.png) ## 『編輯、除錯』C++程式語言 ![](https://i.imgur.com/7YB0W7o.png) ## 編輯JAVA程式 目前只支援編輯和執行(透過code runner),如果要除錯請使用『jdb』 ![](https://i.imgur.com/bmhcOHI.png) ## 『編輯、除錯』Python程式 ![](https://i.imgur.com/48NiGEp.png) # 查看文件 ## man page ![](https://i.imgur.com/Dof9Fwx.png) ## 看markdown文件 ![](https://i.imgur.com/krGtwAt.png) ## 工具 1. man 2. vim 3. ssh 4. 各種壓縮、解壓縮

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully