我在 powershell 中为我的 Rust 项目运行这个:
cargo build --target thumbv7em-none-eabihf
当我尝试执行此命令后,它会产生此错误:
error: failed to parse manifest at C:\Users\PC\Downloads\Blizzard\Cargo.toml Caused by: virtual manifests must be configured with [workspace]
这是我的 Cargo.toml 文件:
[package]
name = "my-project"
version = "0.1.0"
authors = ["runner"]
edition = "2021"
[profile.dev]
panic = "abort"
[profile.release]
panic = "abort"
Run Code Online (Sandbox Code Playgroud)
如果需要的话,这是我的 Rust 文件:
#![no_std]
#![no_main]
use core::panic::PanicInfo;
#[no_mangle]
pub extern "C" fn _start() -> ! {
loop {}
}
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
loop {}
}
Run Code Online (Sandbox Code Playgroud)
我的文件路径如下所示: …
我正在制作一个基于 HTML 的游戏。在这个游戏中,5 个单词是完全随机选择的。一切都很好,代码随机选择 5 个单词,并将其显示在屏幕上,对吧?
嗯,我不喜欢这些词最终的风格,它看起来像这样:
所以目标是最终使文本看起来像这样。
到目前为止,我还没有尝试过任何东西,因为我真的不知道该怎么做,但是唯一尝试使用的是内联块,它有点帮助,但没有达到我想要的全部程度。这是当前的源代码:
<body>
<div class="content" id="content">
<div class="wordBank" id="wordBank">
</div>
</div>
<script src="script.js"></script>
</body>
Run Code Online (Sandbox Code Playgroud)
var wordBank = document.getElementById("wordBank")
// sparing you some of the unneeded stuff, this is just the word array
for (let i = 0; i < 5; i++) {
wordBank.innerHTML += "<p>" + words[Math.floor(Math.random()*words.length)] + "</p>"
}
Run Code Online (Sandbox Code Playgroud)
body {
margin: 0px;
}
.content {
width: 512px;
height: 512px;
margin-left: auto;
margin-right: auto;
font-family: Arial;
}
.wordBank {
border: 2.5px solid …
Run Code Online (Sandbox Code Playgroud)