Library Search
结果页所有权与借用——文件统计工具
在 技术栈 中找到 8 个匹配结果。
技术栈
技术栈
8 个 SQLAlchemy author: Mapped["User"] = relationship(back_populates="posts")
# === 3. 建表 ===
Base.metadata.create_all(engine)
# === 4. CRUD 操作 ===
with Session(engine) as session:
# CREATE
alice = User(nam… 2% MariaDB ```sql
CREATE DATABASE library CHARACTER SET utf8mb4;
USE library;
-- 读者表
CREATE TABLE readers (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50) NOT NULL,
card_no VARCHAR(20) UNIQUE N… 2% Rust # Rust 例程:所有权与借用初体验
## 目标
通过一个命令行程序展示 Rust 核心概念:所有权、借用、模式匹配、Result 错误处理。
## 完整代码
```rust
use std::fs;
use std::io::{self, Write};
/// 统计文件中的单词数
fn count_words(text: &str) -> usize {
text.split… 2% Tailwind CSS <!-- 特性对比表 -->
<section class="max-w-3xl mx-auto mt-12">
<h2 class="text-2xl font-bold text-gray-900 mb-4 text-center">断点系统</h2>
<div class="overflow-hidden rounded-xl border border-gray-200… 2% React {/* 计数器 */}
<div style={styles.card}>
<h2>计数器: {count}</h2>
<div style={styles.buttons}>
<button onClick={() => setCount(c => c - 1)} style={styles.btn}>-1</button>… 2% Solid.js // 副作用:统计已读数量
createEffect(() => {
const readCount = books().filter(b => b.read).length;
console.log(`已读: ${readCount}/${books().length}`);
});
const addBook = (e) => {
e.preventDef… 2% SEGGER J-Link # 常用命令
J-Link> connect
J-Link> mem32 0x08000000, 16 # 读 Flash 前 64 字节
J-Link> mem32 0x20000000, 16 # 读 SRAM
J-Link> regs # 读 CPU 寄存器
J-Link> setpc 0x08000400… 1% GraphQL // ── Resolver ──
const resolvers = {
Query: {
books: () => books,
book: (_, { id }) => books.find(b => b.id === id),
authors: () => authors,
author: (_, { id }) => authors.find(a =>… 1%