JAVA: public final boolean isHappy(int n) { int next = next(n); while (n != 1 && n != next) { n = next(n); next = next(next(next)); } return n == 1; } ...
分类:
其他好文 时间:
2020-08-12 15:41:43
阅读次数:
51
SpringMVC学习记录 1、HelloWorld 1、新建web工程,添加jar包 2、配置web.xml配置springmvc核心控制器(DispatcherServlet):作用是加载springmvc的配置文件,核心控制器自动加载默认位置配置文件,默认位置为web-inf下,默认名称为** ...
分类:
编程语言 时间:
2020-08-12 15:40:55
阅读次数:
62
笔者在进行压测过程中,用shell编写怎么采集heap和io的性能数据,现分享如下:loop_count=1count=1#sleep3echo-n"Pleaseinputpid:"readcmd1cmd2cmd3echo"">heap${cmd1}.logecho"">heap${cmd2}.logecho"&qu
分类:
其他好文 时间:
2020-08-12 15:38:19
阅读次数:
55
public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") .allowedOrigins("*") .allowedMethods("POST", "GET", "PUT", "OPTIONS", ...
分类:
移动开发 时间:
2020-08-11 15:49:47
阅读次数:
106
一 字符串扩展 let str='wyyw'; srt.startsWith('w') true 以w开头 srt.endsWith('w') true 以w结尾 str.includes('e') false e是否存在 == indexOf str.repeat(2) wyywwyyw 重复次数 ...
分类:
其他好文 时间:
2020-08-11 09:15:31
阅读次数:
74
hex2Rgb(hex) { //十六进制转为RGB var rgb = [] // 定义rgb数组 if (/^\#[0-9A-F]{3}$/i.test(hex)) { //判断传入是否为#三位十六进制数 let sixHex = '#' hex.replace(/[0-9A-F]/gi, fu ...
分类:
其他好文 时间:
2020-08-10 21:02:05
阅读次数:
72
acme.sh 快速实现 https 证书颁发与自动续期 借助acem.sh来迅速实现 let's encrypt 的泛域名 ssl 证书颁发与续期,基本上五分钟就可以解决战斗 本文主要内容来自 acme.sh 的官方 wiki,一切以官方说明为准: acme wiki I. 安装步骤 1. 登录服 ...
分类:
Web程序 时间:
2020-08-10 10:51:51
阅读次数:
83
ES6新增了俩JavaScript关键字let和const,你知道吗?划重点ES2015(ES6)新增加了两个重要的JavaScript关键字:let和const。let声明的变量只在let命令所在的代码块内有效,const声明一个只读的常量,一旦声明,常量的值就不能改变。一、let命令let命令有以下特点:(1)代码块内有效ES2015(ES6)新增加了两个重要的JavaScript关键字:le
分类:
编程语言 时间:
2020-08-10 09:30:58
阅读次数:
81
<div id="app"> <p>{{getFullName()}}</p> <p>{{fullName}}</p> </div> <script src="js/vue.js"></script> <script> let vue = new Vue({ el: '#app', data: { ...
分类:
其他好文 时间:
2020-08-09 19:10:22
阅读次数:
67
Array、Object、Map、Set的遍历一直记得不太清楚,为了方便查找,做一个总结 一.Array 1.for 1 for(let i = 0; i < arr.length; i++){ 2 ... 3 } 2.for in i表示数组的索引 1 for(let i in arr) { 2 ...
分类:
其他好文 时间:
2020-08-09 19:09:27
阅读次数:
76