Kartikey Porwal
    • 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
    # Recording Offset Corrections --- <details><summary>References</summary> <p> ### Discussion Offset Correction: https://www.notion.so/pupillabs/2024-Roadmap-aba2fb2987074af28ed40da7452e1cf9?p=770140ff8eee428ebc5ec043393e43b7&pm=c - Recording hash is computed based on columns in recordings table - Recording hash - logic for recording hash - store recording hash in db - All new recordings will have recording hash - gaze mapper function should apply bias - get_gaze function will apply bias - Affected tables: recording_gazepoints, recording_fixations_scanpath, recording_gaze_on_aoi - do research in code and make changes --- ### Related code - `get_gaze_data(` being used in - Markerless post processing - Apriltag post processing - Raw Data Export - Face Mapper Export - /<uuid:recording_id>/gaze.<format> - Table `recording_gazepoints` being used - `def raw_densified_files` Other Details - Patch on `/<uuid:recording_id>` already supports update of gaze_bias_x, gaze_bias_y --- - Websocket events for all the changed recordings - Specific event to reload the project when there is change in recording offset --- </p> </details> ___ <details><summary>Iteration 1</summary> <p> ## Potential candidates for discussion and changes - Gaze offset in info.json (from app) is added to the `distorted` gaze which is later used to get the `undistorted` gaze, this is done in gaze pipeline (`process_recording`)[https://github.com/pupil-labs/pupil-cloud-pipeline/blob/b11da1cca33fae3a3d32aec587994f2a6ee9ec40/process_recording.py#L400-L405] - `/gaze.json` endpoint which is used to show gaze on recording in UI - (uses distorted coordinates)[https://gitlab.com/pupil-labs/pupil-cloud/pupil-api/-/blob/05a73bac73f9d845ea66a89b944ad0b444449e74/pupilcloud/apis/v2/namespaces/recordings.py#L1068-1069] - When exporting recording's `Timeseries Data` - Is fixations, blinks, imu, saccades also affected? - imu is not affected, the rest are, but they are read from recording_gazepoints table - Gaze Mapper - `get_gaze_data(` - `__get_gaze_data_from_clickhouse(` adds bias to undistorted coordinates, then distort coordinates - https://gitlab.com/pupil-labs/pupil-cloud/pupil-api/-/blob/05a73bac73f9d845ea66a89b944ad0b444449e74/pupilcloud/models/recording_gazepoints.py#L141-153 - Enrichments display and export - Marker Mapper - Uses distorted coordinates - https://gitlab.com/pupil-labs/pupil-cloud/pupil-api/-/blob/05a73bac73f9d845ea66a89b944ad0b444449e74/pupilcloud/processing/surfaces.py#L171 - Slam Mapper - Uses distorted coordinates - https://gitlab.com/pupil-labs/pupil-cloud/pupil-api/-/blob/05a73bac73f9d845ea66a89b944ad0b444449e74/pupilcloud/processing/enrichments/markerless_enrichment.py#L88 - Face Mapper Export - Uses distorted coordinates - https://gitlab.com/pupil-labs/pupil-cloud/pupil-api/-/blob/05a73bac73f9d845ea66a89b944ad0b444449e74/pupilcloud/models/project_enrichment_wrapper/face_mapper_wrapper.py#L399-425 - Render - Manual Mapper - Raw Data Export - Uses distorted coordinates - https://gitlab.com/pupil-labs/pupil-cloud/pupil-api/-/blob/05a73bac73f9d845ea66a89b944ad0b444449e74/pupilcloud/models/project_enrichment_wrapper/raw_data_export_wrapper.py#L506-514 - How fixations data will be affected when gaze bias is changed? - Add gaze bias to fixations as well? - In enrichments like marker mapper and slam mapper, we already have mapped data, with gaze_bias already added in gaze mapper, do we need to consider the addition of gaze bias in mapped data as well? --- - Cloud export csv with two new columns? - Need to write new 200hz? - Bias need to be applied as normalized or as pixel? - offset applied in distorted, bias applied in undistorted, undistorted in -1.2 to + 1.2 --- </p> </details> ___ # Discussion Points > We should go with constant distorted offset similar to how android does it rather than apply the offset in undistorted space, since it's easier all around for people to understand. > > We should rename the gaze_bias_x/gaze_bias_y to gaze_offset_x/gaze_offset_y, and the migration step should populate the value from info.json into there as a default value, ie. if a recording was made with offset `[10, 20]` then the db should have `[10, 20]` for that recording. > > This means that the offset will show up as `[10, 20]` in cloud, and then the user can change that to eg. `[0, 50]` > > We can keep the db as undistorted values, but when applying gaze offset we will need to apply it *after* the distortion step, and also subtract the original android gaze offset, ie. in the previous case: > > Assuming distorted gaze from db = [600, 700] > > If the gaze offset in db is [10,20] we return 600,700 > If the gaze offset is [0, 50] we return 590, 730 > > This means we will need to: > > 1. read the undistorted gaze from db > 2. distort the gaze > 3. subtract the original android gaze offset (from info.json) > 4. add the cloud gaze offset Unlike having two different offset (from android and from cloud), we now have only one offset that is added during gaze pipeline and can be changed in cloud. ___ ### CSV Files that are exported **AOI Common CSVs** - aoi_metrics.csv - using `recording_gaze_on_aoi`, which has data ingested after applying offset in gaze mapper during post processing - aoi_fixations.csv - using `recording_gazepoints`, no offset is being applied **Face Mapper Export** - face_detections.csv - Uses `face_detections` - gaze_on_face.csv - Uses `face_detections` - Uses `recording_gazepoints`, which uses `__get_gaze_data_from_clickhouse(` where offset is being applied in online fashion - fixations_on_face.csv - Uses `face_detections` - Uses `recording_gazepoints`, no offset is being applied **Raw Data Export** - gaze.csv - Uses `recording_gazepoints`, which uses `__get_gaze_data_from_clickhouse(` where offset is being applied in online fashion - events.csv - N/A - imu.csv - N/A - fixations.csv - Uses `recording_gazepoints`, no offset is being applied - saccades.csv - Uses `fixations.json` - blinks.csv - N/A - Uses `recording_gazepoints` but don't use the coordinates - world_timestamps.csv - N/A - 3d_eye_states.csv - N/A - Uses `recording_gazepoints` but don't use the coordinates - sections.csv - N/A **Render Export** - section.csv - N/A **Static Image Mapper Export** - fixations.csv - Uses `recording_gaze_on_aoi`, but no need to update it anywhere OR do we want to apply the gaze offset when mapping gaze on UI? **Marker Mapper Export** - gaze.csv - using `recording_gaze_on_aoi`, which has data ingested after applying offset in gaze mapper during post processing - fixations.csv - using `recording_gaze_on_aoi`, which has data ingested after applying offset in gaze mapper during post processing - surface_positions.csv - N/A - Uses `apriltag_detections` **Common CSVs** - sections.csv - N/A **Slam Mapper** - gaze.csv - using `recording_gaze_on_aoi`, which has data ingested after applying offset in gaze mapper during post processing - fixations.csv - using `recording_gaze_on_aoi`, which has data ingested after applying offset in gaze mapper during post processing ___ ### Apart from the suggested changes quoted above, few things won't require any other changes: - Getting `/gaze.json`: https://gitlab.com/pupil-labs/pupil-cloud/pupil-api/-/blob/05a73bac73f9d845ea66a89b944ad0b444449e74/pupilcloud/apis/v2/namespaces/recordings.py#L1068-1069 - `gaze.csv` in face mapper export: https://gitlab.com/pupil-labs/pupil-cloud/pupil-api/-/blob/05a73bac73f9d845ea66a89b944ad0b444449e74/pupilcloud/models/project_enrichment_wrapper/face_mapper_wrapper.py#L399-425 - `gaze.csv` in raw data export: https://gitlab.com/pupil-labs/pupil-cloud/pupil-api/-/blob/05a73bac73f9d845ea66a89b944ad0b444449e74/pupilcloud/models/project_enrichment_wrapper/raw_data_export_wrapper.py#L506-514 ### Few implementations that require additional changes: - **Marker Mapper post processing** - Uses distorted coordinates - https://gitlab.com/pupil-labs/pupil-cloud/pupil-api/-/blob/05a73bac73f9d845ea66a89b944ad0b444449e74/pupilcloud/processing/surfaces.py#L171 - **Slam Mapper post processing** - Uses distorted coordinates - https://gitlab.com/pupil-labs/pupil-cloud/pupil-api/-/blob/05a73bac73f9d845ea66a89b944ad0b444449e74/pupilcloud/processing/enrichments/markerless_enrichment.py#L88 - Should we automatically run the postprocessing for that enrichment recording whenever a gaze offset is changed? (show in UI as processing with note that this is because of changed offset) - Or should we make the enrichment computable and (show in UI as processing with note that this is because of changed offset), and on pressing the run button, we launch the postprocessing for that enrichment recording? (this to me looks a valid approach since we won't need to run postprocessing for all the enrichments but only those user is interested in) - Or should we completely make the computed enrichment invalid? - Or can we somehow apply the gaze offset once the gaze is mapped to surface or image when retrieving - gaze data (https://gitlab.com/pupil-labs/pupil-cloud/pupil-api/-/blob/05a73bac73f9d845ea66a89b944ad0b444449e74/pupilcloud/models/recording_gaze_on_aoi.py#L359) - and fixation data (https://gitlab.com/pupil-labs/pupil-cloud/pupil-api/-/blob/05a73bac73f9d845ea66a89b944ad0b444449e74/pupilcloud/models/recording_gaze_on_aoi.py#L481) ***Decided to allow to run the enrichment again which will launch post-processing for those slices in marker-mapper or slam-mapper enrichment*** - Generate recording hash using `recording_id`, `gaze_offset_x` and `gaze_offset_y` - `recording_hash = json.dumps({"recording_id":"8c560ba3-fb82-4ba8-8ad5-b7cbdb1f2bf2","gaze_offset_x":0,"gaze_offset_y":0}).encode("UTF-8")` - Create a new column `recording_hash` in `slices` table - When creating a slice, update the value of `recording_hash` - For existing `slices`, ingest `recoding_hash` column in migration using its value generated from `recording_id`, `gaze_offset_x` and `gaze_offset_y` - When retreving slices, check if the `recording_hash` value retrieved from db matches the current `recording_hash` value - Create a new slice status `STALE` in `slices` table for running the postprocessing step - If the value of `recording_hash` differs, then update the slice as `STALE` and add queue for post processing - **Render enrichment compute**: I think we need to make change in pikit's - `GazeCircleBurner` (https://gitlab.com/pupil-labs/pupil-cloud/pupil-invisible-toolkit/-/blob/3e3701d59ab7918558893859d1d58d143d83cf93/src/pikit/lib/tools/video/frame_processors.py#L34) or at `get_gaze_data` (https://gitlab.com/pupil-labs/pupil-cloud/pupil-invisible-toolkit/-/blob/3e3701d59ab7918558893859d1d58d143d83cf93/src/pikit/lib/clickhouse_db.py#L57) - and `FixationScanpathBurner` - which uses scanpath.json, so we also need to apply the gaze offset to the scanpath data as well when reading? (https://gitlab.com/pupil-labs/pupil-cloud/pupil-invisible-toolkit/-/blob/3e3701d59ab7918558893859d1d58d143d83cf93/src/pikit/lib/tools/video/frame_processors.py#L169) to add support of gaze offset when rendering gaze and/or fixations (https://gitlab.com/pupil-labs/pupil-cloud/pupil-api/-/blob/05a73bac73f9d845ea66a89b944ad0b444449e74/enrichment_containers/render/render_and_upload.py#L212), as there is seemingly no such option in pikit! - **Gaze pipeline result files** that are affected as they the derived from `filtered_offset_gaze_distorted` (after applying device's offset in the distorted gaze): - fixations.json - scanpath.json - **DB tables** that can get affected: - `recording_gazepoints`: we can apply the changes, you mentioned earlier, at https://gitlab.com/pupil-labs/pupil-cloud/pupil-api/-/blob/05a73bac73f9d845ea66a89b944ad0b444449e74/pupilcloud/models/recording_gazepoints.py#L141-153 to always get the gaze data with applied gaze offset - `recording_fixations_scanpath`: this can get tricky as `recording_fixations_scanpath` is ingested from `scanpath.json` (https://gitlab.com/pupil-labs/pupil-cloud/pupil-api/-/blob/05a73bac73f9d845ea66a89b944ad0b444449e74/enrichment_containers/gaze-pipeline/gazepipeline_runner.py#L248) - so we would have to update it everytime? - Or can we somehow apply gaze offset in online fashion when retrieving data from table like we are doing with `recording_gazepoints`? - `recording_gaze_on_aoi`: This is being used in `marker-mapper` (data is ingested during post processing), `slam-mapper` (data is ingested during post processing), `manual-mapper` (only time and fixation data is used) - `manual-mapper` does not need any changes - `marker-mapper` and `slam-mapper` can allow user to launch post processing and ingest with new gaze offset applied - `recordings`: it has column `gaze_offset_x` and `gaze_offset_y` - Allow `gaze_offset_x` and `gaze_offset_y` value set when a recording is uploaded and using `PATCH` request - ref: `https://gitlab.com/pupil-labs/pupil-cloud/pupil-api/-/merge_requests/373/` - Migration or script to ingest `gaze_offset_x` and `gaze_offset_y` from `info.json` of all the recordings - **CSV files from export** that can get affected: - **AOI Common CSVs** - aoi_metrics.csv - using `recording_gaze_on_aoi`, which has data ingested after applying offset in gaze mapper during post processing - aoi_fixations.csv - using `recording_gazepoints`, no offset is being applied - **Face Mapper Export** - fixations_on_face.csv - Uses `face_detections` - Uses `recording_gazepoints`, no offset is being applied - **Raw Data Export** - fixations.csv - Uses `recording_gazepoints`, no offset is being applied - saccades.csv - Uses `fixations.json` - **Static Image Mapper Export** - fixations.csv - Uses `recording_gaze_on_aoi`, but no need to update it anywhere OR do we want to apply the gaze offset when mapping gaze on UI? - **Marker Mapper Export** - gaze.csv - using `recording_gaze_on_aoi`, which has data ingested after applying offset in gaze mapper during post processing - fixations.csv - using `recording_gaze_on_aoi`, which has data ingested after applying offset in gaze mapper during post processing - **Slam Mapper** - gaze.csv - using `recording_gaze_on_aoi`, which has data ingested after applying offset in gaze mapper during post processing - fixations.csv - using `recording_gaze_on_aoi`, which has data ingested after applying offset in gaze mapper during post processing - **Other things** that get affected: - `/scanpath.json` (https://gitlab.com/pupil-labs/pupil-cloud/pupil-api/-/blob/05a73bac73f9d845ea66a89b944ad0b444449e74/pupilcloud/apis/v2/namespaces/recordings.py#L1125) uses table `recording_fixations_scanpath` in `get_scanpath_data(` (https://gitlab.com/pupil-labs/pupil-cloud/pupil-api/-/blob/05a73bac73f9d845ea66a89b944ad0b444449e74/pupilcloud/models/recording_gazepoints.py#L635) ### Implementation that does not require any changes - Manual Mapper: as we don't use fixation coordinates at all OR do we want to apply the gaze offset when mapping gaze on UI? - Gaze pipeline result files that are not affected: - gaze_offline.npy - headset_on_off_predictions.npy - gaze_offline_timestamps.npy - blinks.json - eye_states.npy ___ What can get tricky? - Apply gaze offset on `scanpath.json` which is being used in pikit to render fixations on the video - Apply gaze offset on the `fixations.json` - Apply gaze offset on the `recording_fixations_scanpath` in online fashion without ingesting it with new data - We insert into `recording_gazepoints`, `recording_fixations_scanpath`, update `fixations.json`, `scanpath.json`, and insert into `recording_gaze_on_aoi` (ondemand) everytime gaze offset is updated - OR apply gaze offset every where `recording_gazepoints` is being used (e.g., `get_gaze_data(`) in online fashion and apply gaze offset every where `recording_fixations_scanpath` being used in online fashion and update `fixations.json`, `scanpath.json` ___ ## Subtasks for gaze offset correction implementation - Add support at recording's level - [x] Add columns `gaze_offset_x` and `gaze_offset_y` - [x] Update existing `gaze_offset_x` and `gaze_offset_y` with the data from `info.json` - [x] Update `gaze_offset_x` and `gaze_offset_y` when a recording is uploaded - [x] Update `PATCH` endpoint to update `gaze_offst_x` and `gaze_offst_y` - [x] Add support at data export level when using gaze data from `recording_gazepoints` - read the undistorted gaze from db - distort the gaze - subtract the original android gaze offset (from info.json) - add the cloud gaze offset - Recording hash implementation - [x] Add new column `recording_hash` in `slices` table - [x] Add new enum `STALE` in `status` in `slices` table - [x] Migration to update existing rows value in `recording_hash` in `slices` with the hash or default hash or None - [x] Update `recording_hash` when an enrichment slice is created - [x] `slam-mapper` - Add support to check the `recording_hash` on every `GET` and show slice as `STALE`, and update it as `STALE` in db, if not updated - [x] `marker-mapper` - Add support to check the `recording_hash` on every `GET` and show slice as `STALE`, and update it as `STALE` in db, if not updated - [x] On enrichment compute, if a slice's `status` is `STALE`, schedule postprocessing job and set `status` to `PROCESSING` - [ ] Behaviour of enrichment like `slam-mapper` and `marker-mapper` when a recording's `gaze_offset_x` and `gaze_offset_y` is changed - When recording's gaze offset is changed, it will send `Recording` model ws event, can UI make use of it to reload the enrichment if that recording is part of the enrichment and display those recording slice as stale and ask for recompute, which will add slice in postprocessing queue and set status to `Processing` in backend? - Render enrichment fix - [x] Add support in pikit to read gaze data with offset applied - [x] Add support in pikit to read fixations data with offset applied - [x] Ensure that render is done with gaze and fixations with latest offset applied - [x] Make command changes in local compute repo to support gaze offset - [ ] Make command changes in `pupil-cloud-terraform` repo to support gaze offset - [ ] Add, test and verify gaze offset correction support for every exported CSV when downloading enrichment - Other changes: - [ ] Ensure that `fixations.json` is always read at all places with latest gaze offset applied - [ ] Ensure that `scanpath.json` is always read at all places with latest gaze offset applied - [x] Change in pikit is done - [x] Ensure that retrieve on table `recording_fixations_scanpath` should always apply the latest gaze offset - [x] Fix endpoint `/scanpath.json` to have latest gaze offset applied - [x] Fix retrieval of fixations when retrieving fixations in aois, face mapper export and raw data export - [ ] Ensure that `manual-mapper` also has latest gaze offset applied ? - [ ] Add gaze offset support in implementation of `get_fixation_seek_timestamps` ? - [ ] Behaviour when a slice is in post-processing and during that gaze offset is changed ? - [x] Fix upload script to update info.json with the correct recording id or use the recording id from info.json when uploading a recording, that was leading to failure in accessing gaze data from db when computing render enrichment of the recordings uploaded using the script as `info.json` had different recording id than the newly generated recording --- UI Changes: - PATCH request on `/recording` to update gaze, new gaze offset should consider gaze without the current gaze offset - After patch, enrichments will have slices with `STALE` status - Enrichments can be run once we have `STALE` slices for postprocessing ---

    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