影落离风

The shadow falls away from the wind

0%

步骤

  1. 调试模式:打开浏览器按F12进入调试模式
  2. 命令窗口:按ctrl+shift+p打开命令窗口
  3. 局部截图:命令窗口输入“Capture full size screenshot ”,选取要截的图
  4. 当前网页截图:命令窗口输入“Capture full size screenshot ”

前言

在平时开发中,经常会遇到很多业务都有相同的处理逻辑;但是具体的处理规则又各不相同。

那我们就可以把相同的方法提取出来,规则可由调用者自己编写。

其实说到这里,用Thread跑过线程的同学就知道了;run方法里编写自己要用的业务,最后调用start方法

最简单的线程使用示例

1
2
3
4
5
6
7
new Thread(new Runnable() {
@Override
public void run() {
// 编写自己的业务
System.out.println("线程测试");
}
}).start();

但其实在阿里规约中不建议这样显式创建线程,建议使用线程池创建;

阅读全文 »

  1. 如果想要允许某个网站加载该网页,可以在nginx中配置
  2. 还可以防止点击劫持,阻止页面被其他页面嵌入
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
server {
listen 80;
server_name localhost;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
# 允许该域名加载网页,允许多个网站时加载时可用","分隔
# add_header X-Frame-Options ALLOW-FROM https://minwk.top,https://game.minwk.top;
add_header X-Frame-Options ALLOW-FROM https://minwk.top;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}