生而为人

程序员的自我修养

0%

[toc]

参考资料

全部数学符号 https://katex.org/docs/supported.html

https://www.cnblogs.com/caomingpei/p/9760652.html

数学公式

inline math:$x^{y^z}=(1+e^x)^{-2xy^w}$

block math:

1
\frac{7x+5}{1+y^2}

$$
\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \
\frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \
\frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \
\end{vmatrix}
${$tep1}{\style{visibility:hidden}{(x+1)(x+1)}}
$$

文本

上下标

  1. 上标:n^2^
  2. 下标:n~2~

颜色

Markdown文字添加颜色方法总结(珍藏)
MarkDown: 为字体添加颜色

包含rgb

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
方法一:
<font face="微软雅黑" >微软雅黑字体</font>
<font face="黑体" >黑体</font>
<font size=3 >3号字</font>
<font size=4 >4号字</font>
<font color=#FF0000 >红色</font>
<font color=#008000 >绿色</font>
<font color=#0000FF >蓝色</font>

方法二:
$\color{#FF3030}{红色文字}$

rgb:
红:255,0,0 #FF0000
橙: 255,125,0 #FF7D00
黄:255,255,0 #FFFF00
绿:0,255,0 #00FF00
蓝:0,0,255 #0000FF
靛: 0,255,255 #00FFFF
紫: 255,0,255 #FF00FF

背景色

1
2
<table><tr><td bgcolor=orange> 背景色是 1 orange</td></tr></table>
<table><tr><td bgcolor= BlueViolet > 背景色2 BlueViolet </td></tr></table>

表格

表头 表头
单元格 单元格
单元格 单元格

流程图

1
2
3
4
graph TD
a-->b
a-->c
d-->e

下面是通过html语法完成的,非markdown自带功能

改变文字样式

改变文字的大小、颜色和对齐方式

自定义表格样式

文件状态:
[√] 草稿
[√] 正在修改
[√] 正式发布
文件名称: LSGO股票交易策略分析软件 Use Case Model
当前版本: 1.0.0
作 者: 马燕鹏
创建日期: 2018-07-15
最后更新:
密 级: 开源系统
版权说明: 遵守 GPL V3协议

折叠内容

explode 与 lateral view 对比

select user_coupon_id, explode(split('0,1', ',')) as tag
from mart_waimai.aggr_act_ord_use_coupon_dd
where dt='20200920'
limit 10
## 支持html标签

html特殊字符及图标

后加";"生效

参考资料

通用

  1. 完整整理版
  2. 流程图详细教程
  3. 编辑数学公式
  4. Markdown 高级技巧
  5. markdown语法
  6. Markdown进阶(更改字体、颜色、大小,设置文字背景色,调整图片大小设置居中)
  7. Markdown 技巧:如何改变表格宽度(列宽)?

hexo

  1. Hexo下的Markdown语法
  2. 【hexo博客进阶】1.Markdown语法
  3. 如何让hexo使用流程图
  4. Hexo优化 — 利用 Markdown 语法画流程图

markdown工具

  1. Typora
  2. https://blog.csdn.net/wkd_007/article/details/124172389

规则引擎:

easyRule

[toc]

标准流程

  1. 添加暂存区git add .()

分支

克隆

1
2
3
4
5
git checkout -b dev(本地分支名称) origin/develop(远程分支名称)

error log:
fatal: 'origin/MTSparkMSNv2' is not a commit and a branch 'users/jingqicao/M2B_V2' cannot be created from it
need run git pull to update.

删除

Git 操作——如何删除本地分支和远程分支

新分支push到远端

1
2
3
git push --set-upstream origin users/jingqicao/performance-optimize
// 需要保证本地分支名称与指定的remote分支名称完全相同,否则
error: src refspec users/jingqicao/performance-optimize does not match any

本地关联远程分支

1
2
3
4
1. push同时关联
git push --set-upstream origin xxx
2. 关联已经存在的
git branch --set-upstream-to=origin/dev

本地切换远程已有分支

1
2
3
4
5
6
7
8
9
10
11
12
13
14
```





## 内容

### 撤销修改

```bash
// 这是一个危险的操作,会撤销指定文件或全部文件的所有本地修改
git checkout -- <file>
git checkout -- .

提交(commit)

1
2
3
4
5
6
7
git commit -m ""

git commit -am ""
追加commit注释,一次push不会生成多个commit节点

git commit --amend
可以修改最近一次commit的注释

查看当前commit

1
git log

对比两个commit(两个commit可以来自不同分支)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
hash2 在 hash1上的修改
git diff commit-hash1 commit-hash2 --stat

如果想进一步查看test修改了那些地方:
只需将 git diff hash1 hash2 --stat 中的 --stat改为具体的文件即可

如果想将两次提交的差异部分提取成补丁文件
git diff hash1 hash2 filename > patch_name

如果想将多个文件的差异生成到同一patch文件 则:
git diff hash1 hash2 filename1 filename2 > patch_name

使用工具(左右两个commit,对应了difftool的左右窗口):
git difftool 199b8598f422485e453f1e4e87aaa6176ff48ad0 4b97457217e29355ddeff0aec8562271c06ac6fe --stat

对比两个分支

1
2
3
4
git diff users/jingqicao/temp-master master --name-status
可以展示变更文件的全路径

git diff-tree
  1. Git 修改已提交的commit注释

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: POSSIBLE DNS SPOOFING DETECTED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The RSA host key for github.com has changed,
and the key for the corresponding IP address 20.205.243.166
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s.
Please contact your system administrator.
Add correct host key in /Users/cjq/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/cjq/.ssh/known_hosts:10
RSA host key for github.com has changed and you have requested strict checking.
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
1
2
3
>> ssh-keygen -R github.com			//更新know_hosts中的内容
>> 更新publickey(参考)
>> ssh -T git@github.com // 测试是否能正确连接

Reference:

  1. https://blog.csdn.net/helloasimo/article/details/123778112

编辑

删除工作区某个文件,或某个目录的改动

1
2
git checkout <file-name>
git checkout <path-name>

查看

#如何使用git比较两次commit之间的差异文件

1
2
3
git diff hash1 hash2
hash2是后提交的commit
即hash1是被对比commit,diff结果是hash2在hash1上的改动

查看本地分支关联的远端分支

1
git branch -vv