generated from LearningOS/24A-template
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8cb9d67
Showing
182 changed files
with
14,515 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"image": "mcr.microsoft.com/devcontainers/universal:2-linux", | ||
"waitFor": "onCreateCommand", | ||
"onCreateCommand": ".devcontainer/setup.sh", | ||
"updateContentCommand": "cargo build", | ||
"postCreateCommand": "", | ||
"postAttachCommand": { | ||
"server": "rustlings watch" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"rust-lang.rust-analyzer" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
|
||
# Update current shell environment variables after install to find rustup | ||
. "$HOME/.cargo/env" | ||
rustup install stable | ||
cargo install --force --path . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
root = true | ||
|
||
[*.rs] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// TODO 判断文件是否存在 | ||
|
||
function judge(outputFile) { | ||
try { | ||
let jsonResult = JSON.parse(outputFile); | ||
let points = {}; | ||
jsonResult.exercises.forEach(({ name, result }) => { | ||
if (result) { | ||
points[name] = [1,1] | ||
} else { | ||
points[name] = [0,1] | ||
} | ||
}) | ||
return points; | ||
} catch(e) { | ||
return {}; | ||
} | ||
} | ||
|
||
module.exports.judge = judge; |
Oops, something went wrong.