- 博客(51)
- 收藏
- 关注
原创 判断多边形是否自相交的算法
function segmentsIntr(a, b, c, d) { /** 1 解线性方程组, 求线段交点. **/ // 如果分母为0 则平行或共线, 不相交 let denominator = (b.y - a.y) * (d.x - c.x) - (a.x - b.x) * (c.y - d.y); if (denominator == 0) { return false; } // 线段所在直线的交点坐标 (x , y) let x = ((b.x ...
2022-01-20 10:00:46
2287
1
原创 分享Canvas画横断面图的vue源码
<template> <div class="qieMianTu"> <canvas id="canvas" width="900" height="800"></canvas> <div style="border: 1px solid; width: 80px; padding: 5px" class="tuli"> <div :key="key" style="display: flex" v-for=.
2022-01-20 09:51:25
1112
3
转载 element ui Cascader 级联选择器 关闭tag时报错 :cannot read ‘level‘ of null cascader
https://www.cnblogs.com/xiaorong-9/p/14103564.html
2021-03-10 09:16:11
348
原创 Arcgis for javascript配置代理 权限控制
1、下载github代理包:https://github.com/Esri/resource-proxy/releases2、将JAVA程序放到tomcat的webapps根目录下面3、开始配置相关的服务地址,找到proxy.confifg4、启动tomcat测试成不成功,敲如下地址:...
2020-12-21 15:18:25
243
原创 element-ui el-dialog拉伸
import Vue from ‘vue’;Vue.directive(‘dialogDrag’, {bind(el, binding, vnode, oldVnode) {//弹框可拉伸最小宽高let minWidth = 400;let minHeight = 300;//初始非全屏let isFullScreen = false;//当前宽高let nowWidth = 0;let nowHight = 0;//当前顶部高度let nowMarginTop = 0;//获取弹
2020-12-21 09:16:38
1121
原创 nginx匹配规则优先级问题
当有多条 location 规则时,nginx 有一套比较复杂的规则,优先级如下:精确匹配 = 前缀匹配 ^~(立刻停止后续的正则搜索) 按文件中顺序的正则匹配 ~或~* 匹配不带任何修饰的前缀匹配。这个规则大体的思路是先精确匹配,没有则查找带有 ^~的前缀匹配,没有则进行正则匹配,最后才返回前缀匹配的结果(如果有的话)...
2020-11-24 13:37:57
844
转载 nignx:maximum number of descriptors supported by select() is 1024 while connecting to upstream
文章目录 背景问题解决方式 背景 测试在用jmeter进行压力测试,在并发量高的时候,出现接口时而正常时而失败的情况。并发量低没有问题。 版本:window 问题 nginx log报错: maximum number of descriptors supported by select() is 1024 w...
2020-10-22 10:12:27
4167
原创 Linux安装node环境并部署项目
备注:我这边由于项目部署在内网,因此不能直接命令安装,只能通过离线包安装,同时我这边是koa2项目,所以启动的是app.js
2020-09-18 08:40:16
305
原创 Vue-cli3 Pc端 px转rem 自适应
1、安装lib-flexibleyarn add lib-flexible2、安装px2rem-loaderpx2rem-loader3、修改flexible.js 将540改为width4、在main.js中引入lib-flexible5、配置vue.config.jschainWebpack: (config) => { config.module .rule('scss') .oneOf(.
2020-07-27 15:19:47
1123
原创 windows server 2012 R2 nginx配置负载均衡
#user nobody;worker_processes 4;#error_log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info;#pid logs/nginx.pid;events { worker_connections 10240;}http { include mime.types; def..
2020-07-24 08:12:44
880
原创 docker部署tomcat集群共享存储卷
1、首先拉取镜像docker search tomcat2、拉取完之后、查看镜像 docker images3、启动一个tomcat t1docker run -id --name=t1 -p 8080:8080 tomcat4、敲地址后会发现页面显示4045、究竟是什么原因呢 进入里面看个究竟docker exec -it 75 /bin/bash会发现多了个webapps.dist文件夹 进入会发现 webapps里面是空 webapps.dist才应该是we..
2020-06-17 17:39:45
392
原创 使用apache jmeter进行压力测试
1、官网下载zip包 解压到当前文件夹2、汉化 改成zh_cn3、开始进行压力测试 建立线程组、建立http请求、建立察看结果树、建立查看聚合报告4、建立线程组,右击测试计划5、建立http请求,右击线程组,输入ip,端口和接口或页面地址6、建立察看结果树7、建立查看聚合报告8、最终主要看一下聚合报告字段说明如下#Samples:本次测试共运行多少线程;Average:平均响应时间;Median:统计意义上的响应时间中值;90% lin...
2020-06-17 15:17:02
370
原创 uniapp关于image与cover-image
image可以根据设置mode来设置等比例缩放cover-image是浮在dom上面的图片一般情况下 使用image标签,如果想让你的图片不缩放,保持原图大小,使用cover-image。
2020-06-01 14:45:46
2641
转载 linux在线安装nginx
https://blog.youkuaiyun.com/sinat_23490433/article/details/89682252
2020-04-24 16:26:26
342
转载 VMware安装Centos7超详细过程(图文)
https://blog.youkuaiyun.com/babyxue/article/details/80970526
2020-04-24 15:48:00
279
原创 nginx解决前端开发跨域问题
1、首先你需要拥有一台nginx服务器(在此不具体讲nginx)2、在nginx.config里面进行反向代理的配置,具体代码如下:##前端开发环境配置代理 server { listen 9898; server_name 192.168.1.222; # 配置前端页面代理 location / { ...
2020-04-24 15:23:45
384
原创 Vue-router部署采用history方式部署
打包之前:1、将router里面的mode修改成history,将base修改成部署的前端工程名称即可2、修改tomcat配置,将web.xml里面添加一行<error-page> <error-code>404</error-code> <location>/index.html</location> &l...
2020-04-24 10:58:32
960
原创 vue2,vue3打包看到源码问题
vue2.0把config文件夹下面的index.js中的productionSourceMap设置为falsevue3.0把vue.config.js中的productionSourceMap设置为false
2020-01-10 16:13:08
707
原创 axios直接下载文件
1、axios请求需要设置responseType:"blob"2、按照下面进行请求读取即可(以下为示例代码)。let data = { screenProjectDto: JSON.stringify(param), countName: "项目列表", rowsName: rowsName.join(","), order: _this.sorte...
2019-12-14 09:58:03
1273
原创 Vue2,Vue3打包加时间戳问题
Vue2const Timestamp = new Date().getTime(); output: { path: config.build.assetsRoot, filename: utils.assetsPath("js/[name].[chunkhash]" + Timestamp + ".js"), chunkFilename: utils.as...
2019-12-12 09:09:52
8594
2
原创 git回退到某个版本并提交到服务器
1、查看历史分支git log2、找到对应的 commit的版本号3、执行回退版本命令:git reset --hardabe021834592f0f2ced42ac29d10a992f15d80074、执行查看当前版本的命令,看是否已经回退成功到需要的版本:git rev-parse HEAD5、提交到服务器 git push -f...
2019-11-12 09:00:59
1198
原创 postgresql数据库导入和导出
postgresql备份命令:pg_dump.exe-h192.168.1.222(ip)-Upostgres(用户名)-p5432-fD:\test.dump(保存的本地目录和文件名)-Eutf8-Ft test(数据库名)postgresql恢复命令:pg_restore.exe-h192.168.1.222(ip)-Upostgres(用户名)...
2019-09-27 10:05:57
798
原创 小程序(mpvue)设置navigationBarBackgroundColor 为透明的方法
"navigationStyle": "custom",
2019-09-05 16:38:50
5874
原创 activiti之核心表详解
虽然activiti提供了很多现成的接口,但是一旦业务复杂的时候,你就得自己写sql了,因此,就得对数据库表有更多的掌握,才能更好的适应业务。1、资源库流程规则表act_re_deployment 部署信息表 act_re_model 流程设计模型部署表 act_re_procdef 流程定义数据表2、运行时数据库表...
2019-05-11 08:43:08
847
原创 nodejs之koa-session
1、安装 npm installkoa-session2、引用const Koa = require('koa');const session = require('koa-session');/**session配置 */const sessionConfig = { key: 'koa:sess', // cookie key (默认koa:sess) maxA...
2019-05-10 14:09:27
885
1
原创 nodejs之mysql【创建连接池,查询,增删改事务处理】
话不多说,直接给大家贴代码/** * @author OceanCheung * @description mysql */const mysql = require('promise-mysql');const Promise = require("bluebird");const {databaseConfig,codeConfig} = require('../confi...
2019-05-10 14:03:11
1917
原创 vue-cli3.x打包找不到文件
在vue.config.js下面配置baseUrl3.2.0之前3.2.0之后 官方推荐使用publicPath代替baseUrl重新打包即可
2019-04-11 11:20:06
2159
3
原创 flutter之列表上拉下拉刷新
1、使用第三方包flutter_refresh2、在有状态控件里面导入import 'package:flutter_refresh/flutter_refresh.dart';3、定义私有变量int _itemCount;4、自定义WigetWidget getRefreshList() { return new SafeArea( ch...
2019-03-20 07:45:40
1047
原创 flutter之自定义图标
1、第一步 咱们要先确定一下自定义图标的网站,网站地址如下:http://fluttericon.com/。2、第二步 选择咱们需要的图标,然后点击download。3、第三步 首先将咱们下载下来的ttf文件放到fonts的目录(其中fonts目录是本人自建)下,其次将.dart文件放到config的目录下面(其中config目录是本人自建)。4、第四步 在pubspec.ya...
2019-03-18 13:40:03
3318
原创 GitLab配置之server.httpBindInterface参数为公网ip启动报错问题
解决办法如下:由于服务器本身具有公网映射,因此只需要在default.properties将server.httpBindInterface改成本机的ip,注意,此ip并不是localhost也不是127.0.0.1,windows打开cmd运行ipconfig,linux输入命令ifconfig。...
2019-03-06 09:17:20
1287
原创 element-ui之el-table的简单导出excel
第一步,依赖两个node包npm install --save xlsx file-saver第二步,引入两个包import FileSaver from 'file-saver'import XLSX from 'xlsx'第三步,按钮绑定该函数 exportExcel(domId, fileName) { let wb = XLSX.utils....
2019-03-06 09:16:30
567
原创 mui设置沉浸式
manifest.json->plus节点下"statusbar": { "immersed": true //开启沉浸式状态栏 } "launchwebview": { "statusbar": { "background": "#FF3333" } } ...
2019-02-12 09:21:33
716
原创 GitLab配置之server.httpBindInterface参数为公网Ip启动报错问题
解决办法:1、windows->cmd->ipconfig,linux->终端->ifconfig2、将得到的ip配置到server.httpBindInterface后面即可
2018-07-27 08:42:16
1610
原创 分享一些在学习Vue的时候常用链接
Vue开发常用链接Vue通用Vue环境搭建https://blog.youkuaiyun.com/u013182762/article/details/53021374Vue使用Lesshttps://blog.youkuaiyun.com/user_bin/article/details/64938043Vue使用背景图片https://blog.youkuaiyun.com/woyidingshijingcheng/articl...
2018-06-14 11:22:32
384
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人