DNS Over Https
Windows
模板 |
查看DoH模板:
netsh dns show encryption |
# 模板 |
查看DoH模板:
$ netsh dns show encryption |
我要编写一个名为“学习笔记”的 Web 应用程序,让用户能够记录感兴趣的主题,并在学习每个主题的过程中添加日志条目。“学习笔记”的主页对这个网站进行描述,并邀请用户注册或登录。用户登录后,可以创建新主题、添加新条目以及阅读既有的条目。
目录 ll_project 包含 4 个文件, 其中最重要的是 settings.py、urls.py 和 wsgi.py。文件 settings.py 指定 Django 如何与系统交互以及如何管理项目。
在开发项目的过程中,我们将修改其中的一些设置,并添加一些设置。
文件 urls.py 告诉 Django,应创建哪些网页来响应浏览器请求。
文件 wsgi.py 帮助 Django 提供它创建的文件,名称是 web server gateway interface(Web 服务器网关接口)的首字母缩写。
在独立的项目文件夹下运行
python -m venv ll_env |
将会创造一个ll_env
文件夹
可以使用下面的命令激活虚拟环境。激活虚拟环境后,安装的模组将只在虚拟环境中生效,而不干扰到电脑上Python的模组
source ll_env/bin/activate # Linux系统 |
使用deactive
取消激活虚拟环境
pip install --upgrade pip # 更新pip |
Django手册: https://docs.djangoproject.com/en/4.1/ref/models/fields/
WIN+R, taskschd.msc
在这里可以设置定时任务、登录任务。
有些软件的开机自启动就设置在这里。比起组策略有更多的可选项(延迟启动,网络和电源要求等)
WIN+R, gpedit.msc
在这里可以设置一些开关机时执行的任务
Computer Configuration -> Windows settings -> Scripts -> Shutdown -> Properties -> Add |
Task Scheduler没有办法隐藏窗口
在Task Scheduler运行该vbs脚本,目标脚本路径作为参数即可实现静默运行。
' minRun.vbs |
code <Folder>
打开工作区;相当于 CTRL+K, CTRL+O
code -diff file1 file2
对比两个文件(颜色标注)code <File>
打开文件CTRL + ←/→
逐词跳转CTRL+K
清理终端CTRL+P: >Tasks
新建任务,用 CTRL+P: >run
运行;相当于 make
CTRL+P
打开Panel
@
符号:寻找symbol,如函数名、变量名;相当于CRTL+SHIFT+.
# <String>
符号:全局搜索字符串>join line
选中多行合并为一行CTRL+G <Line_Number>
跳到指定行CTRL + ←/→
逐词跳转;相当于vim的 w
ALT + ↑/↓
移动某行代码ALT + SHIGT+ ↑/↓
复制某行代码CTRL+P: >Snippets
创建代码模板SHIFT+ALT+F12
找到某个命名的全部引用(而不是简单的搜索)SHIFT+ALT+F
格式化代码,相当于 >Format Document
关闭 Search: Use Ignore Files
,或
"search.useIgnoreFiles": false |
"terminal.integrated.defaultProfile.windows": "MSYS2-UCRT64", |
说明:%%是注释%%
<view class="class_name"></view>
来结构化设计;每个class
对应一个css
样式<view class="container"> |
css
中放样式信息,写法如下;全局样式可以放app.css
/* 示范写法 */ |
*
:匹配前面的字符0+次
+
:匹配前面的字符1+次
?
:匹配前面的字符0/1次
[a-z_]
:匹配中括号内字符1次,示例是匹配小写字母或下划线
^
:表示开头处
$
:表示结尾处
\b
:匹配单词间的空格处
\d
:匹配数字
\w
:匹配字母、数字、下划线
\s
:匹配不可见字符
\D
:匹配非数字
\W
:匹配非字母、数字、下划线
\S
:匹配非空白字符
by Sandra Henry-Stocker, Unix Dweeb, from NetWorkWorld 945870
tags: Data Center, Linux, Open Source
难度:EASY
First of all, it’s a power of 2. That’s undoubtedly not the most obvious thing unless you’re some kind of mathematical genius. And, to be exact, it’s 2^31. That’s significant — as you’ll see in a minute.
In binary, 2147483647 is 01111111111111111111111111111111 and it’s the biggest positive number that will fit in 32 bits when using the “two’s complement” notation (补码) — the way of representing numbers that allows for negative values. If we could use that leftmost (high order) bit, the largest possible number would be twice as large since every extra bit doubles the range of numbers that a binary number can represent.
And 2147483648 just happens to be the number you’d get if you multiplied 256 * 256 * 256 * 256 and then divided the result by 2. Not excited yet? Give me a moment.
hello.c
hello:hello.c |
CC=gcc |
SOURCE = $(wildcard *.c) |
[廖雪峰](http://ruanyifeng.com/blog/2015/02/make.html)
Makefile文件由一系列规则(rules)构成。每条规则的形式如下。
<target>: <prerequisites> |
上面第一行冒号前面的部分,叫做"目标"(target),冒号后面的部分叫做"前置条件"(prerequisites);第二行必须由一个tab键起首,后面跟着"命令"(commands)。
make -nB
, 它会让make
程序以"只输出命令但不执行"的方式强制构建目标。%.o: %.c # 所有.o/.c结尾的文件 |
txt = Hello World |