摘要: js中list去重 uniq(array) { let temp = []; let index = []; let l = array.length; for(let i = 0; i < l; i++) { for(let j = i + 1; j < l; j++){ if (array[i] 阅读全文
posted @ 2020-12-29 10:49 GraceYang 阅读(4243) 评论(0) 推荐(0)
摘要: javascript中如果一个变量的值是字符串,且里面的值是数字类型的,你就可以直接用这个变量乘1,就可以将它 变成数值类型了. 例如 var str = "12.2365"; 你就可以用它乘1 var value = str*1; 这个value就是你要的数值类型的了 保留两位小数 toFixed 阅读全文
posted @ 2020-12-28 10:39 GraceYang 阅读(10013) 评论(0) 推荐(0)
摘要: vue-webSocket转码配置 const express = require("express"); const expressWebSocket = require("express-ws"); const ffmpeg = require("fluent-ffmpeg"); ffmpeg. 阅读全文
posted @ 2020-12-28 09:39 GraceYang 阅读(2536) 评论(1) 推荐(0)
摘要: axios等待同步请求 methods: { getLightList() { let that = this; return new Promise((resolve, reject) => { that.query.type = '0';// 灯光 getLightList(this.query 阅读全文
posted @ 2020-12-25 15:30 GraceYang 阅读(503) 评论(0) 推荐(0)
摘要: 1. 配置vue.config.js devServer: { host: '0.0.0.0', port: port, proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BA 阅读全文
posted @ 2020-12-25 14:32 GraceYang 阅读(636) 评论(0) 推荐(0)
摘要: /** * List去重 * @param list * @return */ public static List<String> removeDuplicate(List<String> list) { HashSet<String> h = new HashSet<String>(list); 阅读全文
posted @ 2020-12-25 14:30 GraceYang 阅读(536) 评论(0) 推荐(0)
摘要: pom配置 <!-- Mysql驱动包 --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <scope>runtime</scope> </dependency> <!-- 阅读全文
posted @ 2020-12-18 11:06 GraceYang 阅读(354) 评论(0) 推荐(0)
摘要: Vue 打包后,如果想修改整体的后台接口域名,或者图片文件的路径,就需要在源代码中修改后,再次进行build打包。这样很不灵活,先看一下vue打包后的文件结构,项目打包后会生成一个dist文件── dist ├── static // 外部静态资源文件夹,对应项目中的static文件夹 ,与inde 阅读全文
posted @ 2020-12-08 14:29 GraceYang 阅读(2434) 评论(0) 推荐(0)
摘要: public class TestHashMapCollections { public static void main(String[] args) { Map<String, Integer> map = new HashMap<>(); map.put("王二", 8); map.put(" 阅读全文
posted @ 2020-12-04 09:22 GraceYang 阅读(1222) 评论(0) 推荐(0)
摘要: input:focus{ outline: none; } button:focus{ outline: none; border-color: transparent; } select:focus{ outline: none; 阅读全文
posted @ 2020-12-03 10:13 GraceYang 阅读(339) 评论(0) 推荐(0)