Git学习笔记
参考https://learngitbranching.js.org/
基础git init:初始化
git add <filename>:提交文件到暂存区git add -A,提交所有变化
git commit -m "注释",
git status 查看状态--short 或 -s 可以以更简洁的方式呈现
git diff <filename>:工作目录中的文件与暂存区文件的差异--staged:已暂存文件和最后一次提交文件的差异
.gitignore可以让某些文件不让git管理,就是也不会让它们出现在untrack files里。
列举暂存区文件git ls-files
移除文件git rm <file>:将文件从暂存区移除。
然而刚添加到暂存区的或已在暂存区中被修改的文件不会被删除,防止误删未添加到快照的数据。选项-f可以强制删除。
如果直接用rm <file>,只会把文件从目录中删除,然而在暂存区中它还是存在,还要执行git add把这次删除记录提交到暂存区里。然而用git rm可以让其变简洁。
将文件从gi ...
Javascript学习笔记
Math对象提供了一些数学函数Math.EMath.PIMath.round(x)
随机数Math.random() 给出一个[0,1)的随机数
条件语句1234567if (条件) {} else if (条件) {} else {}
三目运算符也是和C类似。switch也是一样。
123456789101112switch (东西) { case 情况1: 语句; break; case 情况2: ... break; default 默认: ... break;}
12345== 值相等=== 值相等且数据类型相等!= 不相等!== 值不相等或数据类型不相等
循环1234while一样for (let i = 0; i <= 10; i++) {}
checkedelement.checked
获取复选框或单选按钮是否被选中
设置复选框或单选按钮的状态
选择chec ...
新博客
123456789>>> print(type(3.1415926))<class 'float'>>>> print(type('Learn Python in imoc'))<class 'str'>>>> print(type(100))<class 'int'>>>> print(type(0b1101))<class 'int'>>>>
在Python里面,一个变量可以先后存储多种不同类型的数据。
1234//向下取整10//4 # ==> 210//2.5 # ==> 4.010//3 # ==> 3
12//保留两位小数round(num, 2) # ==> 3.33
1234567//我直接转义a = r'\(~_~)/ \(~_~)/'b = r'''Pyt ...
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment
