谷歌浏览器Google Chrome怎么长截图 发表于 2021-11-04 本文字数: 131 步骤 调试模式:打开浏览器按F12进入调试模式 命令窗口:按ctrl+shift+p打开命令窗口 局部截图:命令窗口输入“Capture full size screenshot ”,选取要截的图 当前网页截图:命令窗口输入“Capture full size screenshot ”
匿名类简化多业务场景下处理相同逻辑的封装 发表于 2021-10-22 本文字数: 2.8k 前言在平时开发中,经常会遇到很多业务都有相同的处理逻辑;但是具体的处理规则又各不相同。 那我们就可以把相同的方法提取出来,规则可由调用者自己编写。 其实说到这里,用Thread跑过线程的同学就知道了;run方法里编写自己要用的业务,最后调用start方法 最简单的线程使用示例 1234567new Thread(new Runnable() { @Override public void run() { // 编写自己的业务 System.out.println("线程测试"); }}).start(); 但其实在阿里规约中不建议这样显式创建线程,建议使用线程池创建; 阅读全文 »
踩坑-使用iframe加载网页报Refused to display 'URL' in a frame because it set 'X-Frame-Options' 发表于 2021-10-13 本文字数: 500 如果想要允许某个网站加载该网页,可以在nginx中配置 还可以防止点击劫持,阻止页面被其他页面嵌入 12345678910111213141516171819202122server { 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; }
mysql修改注释时出现Comment for field 'xx' is too long(max=1024) 发表于 2021-09-27 本文字数: 298 踩坑日记 在修改MySQL字段注释时,出现Comment for field ‘xx’ is too long(max=1024)这异常,其实就是字段注释超过1024,要注意精简哦。 阅读全文 »