GUID在线生成工具

https://www.guidgenerator.com/online-guid-generator.aspx

What is a GUID?

GUID (or UUID) is an acronym for ‘Globally Unique Identifier’ (or ‘Universally Unique Identifier’). It is a 128-bit integer number used to identify resources. The term GUID is generally used by developers working with Microsoft technologies, while UUID is used everywhere else.

How unique is a GUID?

128-bits is big enough and the generation algorithm is unique enough that if 1,000,000,000 GUIDs per second were generated for 1 year the probability of a duplicate would be only 50%. Or if every human on Earth generated 600,000,000 GUIDs there would only be a 50% probability of a duplicate.

How are GUIDs used?

GUIDs are used in enterprise software development in C#, Java, and C++ as database keys, component identifiers, or just about anywhere else a truly unique identifier is required. GUIDs are also used to identify all interfaces and objects in COM programming.

markdown插入图片的方法

1
![avatar](data:image/png;base64,iVBORw0......)
1
2
3
![avatar][str]

[str]:data:image/png;base64,iVBORw0......

图片转化为base64字符串

1
2
3
4
5
import base64
f=open('th.png','rb') #二进制方式打开图文件
ls_f=base64.b64encode(f.read()) #读取文件内容,转换为base64编码
f.close()
print(ls_f)

base64字符串转化为图片

1
2
3
4
5
6
import base64
bs='iVBORw0KGgoAAAANSUhEUg....' # 此处省略
imgdata=base64.b64decode(bs)
file=open('t1.jpg','wb')
file.write(imgdata)
file.close()

另外,还有两种方法:

插入本地图片

1
![avatar](/home/picture/1.png)

插入网络图片

1
![avatar](http://baidu.com/pic/doge.png)

插图最基础的格式就是:

1
![Alt text](图片链接 "optional title")

Alt text:图片的Alt标签,用来描述图片的关键词,可以不写。最初的本意是当图片因为某种原因不能被显示时而出现的替代文字,后来又被用于SEO,可以方便搜索引擎根据Alt text里面的关键词搜索到图片。 图片链接:可以是图片的本地地址或者是网址。”optional title”:鼠标悬置于图片上会出现的标题文字,可以不写。

hexo本地预览与发布不一致

hexo博客更改主题配置后,在localhost上预览的效果十分完美,然而在github.io上却没有任何更新。原因是需要在部署之前清除缓存。

1
2
hexo clean
hexo d -g

然后就好了。