↓ 跳过正文
Starmap & Dust

文章 · Posts

星图与尘埃的全部文章:技术实践、Hugo 建站、自媒体与生活成长。

129 篇文章 · 持续更新中

Flask Tutorial

Flask Tutorial

·232 字·1 分钟
link: https://flask.palletsprojects.com/en/stable/ 快速开始 # from flask import Flask app = Flask(__name__) @app.route("/") def hello_world(): return "<p>Hello, World!</p>" 其他有用函数 # from flask import request, url_for, render_template, abort, redirect, make_response, session with app.test_request_context(): print(url_for('index')) print(url_for('login')) print(url_for('login', next='/')) print(url_for('profile', username='John Doe')) @app.route('/hello/') @app.route('/hello/<name>') def hello(name=None): return render_template('hello.html', person=name) @app.route('/') def index(): return redirect(url_for('login')) @app.route('/login') def login(): abort(401) this_is_never_executed() @app.errorhandler(404) def not_found(error): resp = make_response(render_template('error.html'), 404) resp.headers['X-Something'] = 'A value' return resp @app.route('/') def index(): if 'username' in session: return f'Logged in as {session["username"]}' return 'You are not logged in' app.config # https://flask.palletsprojects.com/en/stable/config/#configuration-basics
Browser

Browser

·137 字·1 分钟
快捷键 # 链接 https://support.google.com/chrome/answer/157179?sjid=2513882154096599191-NC https://support.microsoft.com/zh-cn/microsoft-edge/microsoft-edge-%E4%B8%AD%E7%9A%84%E9%94%AE%E7%9B%98%E5%BF%AB%E6%8D%B7%E6%96%B9%E5%BC%8F-50d3edab-30d9-c7e4-21ce-37fe2713cfad 操作 按键 类型 打开上次关闭的内容 ctrl,shift,t 日常 关闭当前网页 ctrl, w 切换下一网页 ctrl, tab 切换上一网页 ctrl, shift, tab 字体控制大 ctrl,+ 字体控制小 ctrl,- 保存 ctrl,p 刷新 ctrl,r 硬刷新 ctrl,shift,r 开发 开发者 f12 内存排查 # shift, esc 打开浏览器的管理器
Instruments

Instruments

·106 字·1 分钟
弦乐器 # 小提琴 古典风格 大提琴 吉他 现代风格 分类 民谣 古典 电吉他 竖琴 中提琴 古筝 琵琶 管乐器 # 长笛 萨克斯风 小号 大号 长号 单簧管 双簧管 键盘乐器 # 钢琴 电子琴 管风琴 手风琴 打击乐器 # 架子鼓 小鼓 大鼓 钟琴 马林巴琴 锣 镲 声乐器 # 人声(歌唱)
Markdown

Markdown

·310 字·1 分钟
参考链接 # https://markdown.com.cn/basic-syntax/headings.html https://mermaid.js.org/intro/ 基础 # 标题 title # 无序列表 # 分割线 有序列表 aaa bbb 取消 markdown 语法 代码块 多行代码 print('hello') 单行代码 cmd 转义 \ 字体 字体加粗 斜体 粗斜体 引用块 法斯蒂芬森地方 法斯蒂芬森地方 法斯蒂芬森地方
进击的巨人

进击的巨人

·1123 字·3 分钟
这不是一部「人类打巨人」的热血片。它真正的结构是:先让你以为是打怪,再告诉你怪物是人,最后告诉你敌人在海的另一边。 看懂三层,整部作品的骨架就清楚了。