精选分类
编程
其他
工作
人力资源管理
文章列表
JavaScript日期格式化
# JavaScript 代码
1234567891011121314151617Date.prototype.Format = function (fmt) { var o = { "M+": this.getMonth() + 1, //月份 "d+": this.getDate(), //日 "H+": this.getHours(), //小时 "m+": this.getMinutes(), //分...
more...
JavaScript复制文本
# JavaScript 代码
12345678910111213141516function copy() { var input = document.createElement('input'); input.setAttribute('readonly', 'readonly'); // 防止手机上弹出软键盘 input.setAttribute('value',...
more...
XMLHttpRequest 异步下载
# 原文链接 https://www.jianshu.com/p/1e189c14aa98
# 网络请求
123456789101112131415161718192021222324252627282930313233343536373839function get() { var xhr = new XMLHttpRequest(); var url = "请求地址"; xhr.open("POST", url);...
more...
Excel导出
# 后端代码
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849//Excel 生成代码 // -------------------------------// 发送到前端ByteArrayOutputStream os = new ByteArrayOutputStream(); ServletOutputStream sout = null; BufferedInputStream bis = null; BufferedOutputStream bos =...
more...
CompletableFuture 异步任务
# 异步任务学习笔记
123456789101112131415161718192021222324252627282930313233343536373839404142@SpringBootTestclass Demo3ApplicationTests { @Test void contextLoads() { run(); } private void run() { CompletableFuture<Void> f1 = CompletableFuture.runAsync(()...
more...
git 拉取远程仓库全部分支
# 拉取远程仓库全部分支
git clone // 拉取仓库
git branch -a // 列出远程仓库所有分支
git checkout -b 本地分支名 origin/远程分支名 // 切换分支
more...
springboot 集成redis缓存
# pom 文件
12345678<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-cache</artifactId></dependency><dependency>...
more...