使用electron打包静态页面
先到静态页面包外面安装electron-packager
123npm install electron
再安装electron-packager
12npm install electron-packager
到静态页面文件夹里面创建main.js 文件
12345678910111213141516171819202122232425262728293031const {app,BrowserWindow} = require('electron'); //引入electronlet win;let windowConfig = { width: 800, height: 600}; //窗口配置程序运行窗口的大小function createWindow() { win = new BrowserWindow(windowConfig); //创建一个窗口 win.loadURL(`file://${__dirname}/index.html`); ...
最详细的MySQL部署
rpm安装MySQL先下载所需的包分别下载 MySQL5.7的common 、libs、client、server4个RPM包:
1234567wget https://repo.huaweicloud.com/mysql/Downloads/MySQL-5.7/mysql-community-common-5.7.33-1.el6.x86_64.rpmwget https://repo.huaweicloud.com/mysql/Downloads/MySQL-5.7/mysql-community-libs-5.7.33-1.el6.x86_64.rpmwget https://repo.huaweicloud.com/mysql/Downloads/MySQL-5.7/mysql-community-client-5.7.33-1.el6.x86_64.rpmwget https://repo.huaweicloud.com/mysql/Downloads/MySQL-5.7/mysql-community-server-5.7.33-1.el6.x86_64.rpm
安装4个 ...
加密yml文件
1. 低版本2.x引入依赖12345<dependency> <groupId>com.github.ulisesbocchio</groupId> <artifactId>jasypt-spring-boot-starter</artifactId> <version>2.1.0</version></dependency>
手动引入依赖(内网环境)
12345678910<dependency> <groupId>org.jasypt</groupId> <artifactId>jasypt</artifactId> <version>1.9.2</version></dependency><dependency> <groupId>com.github.ulisesbocchio</groupId> < ...
Vue2设置通知提醒框
可自定义设置以下属性:
自动关闭的延时时长(duration),单位ms,默认4500ms
消息从顶部弹出时,距离顶部的位置(top),单位px,默认24px
消息从底部弹出时,距离底部的位置(bottom),单位px,默认24px
消息弹出位置(placement),可选:左上topLeft,右上topRight(默认),左下bottomLeft,右下bottomRight
调用时可选以下五个方法对应五种不同样式:
this.$refs.notification.open(notification) // 默认使用
this.$refs.notification.info(notification) // info调用
this.$refs.notification.success(notification) // success调用
this.$refs.notification.error(notification) // error调用
this.$refs.notification.warn ...
Layui实现放大图片的效果
需要在表格里面添加查看图片的模板
123<div style="width: 400px;height: 200px" onclick="showLarge('../images/lidong.jpg')"> <img height="100%" width="100%" src="../images/lidong.jpg" alt=""></div>
放大的function
123456789101112131415161718192021222324252627<script type="text/javascript" >//查看大图 function showLarge(src) { layer.photos({ photos: { "title&quo ...
镜像
npm
1npm config set registry https://registry.npmmirror.com
nvm
12node_mirror: https://npmmirror.com/mirrors/node/npm_mirror: https://npmmirror.com/mirrors/npm/
python
1pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
kali
1234567891011121314151617181920中科大 deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib 阿里云 deb http://mirrors.aliyun.com/kali kali-rolling main non-free cont ...
Vue2使用g2
标题其实vue2和vue3用法差不多,使用的g2也是5.x的预防,其中的区别就是script块的写法不太一样,vue3更简洁更方便
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 ...
跨域访问
问题使用Vue对后台的资源进行访问,发生跨域的请求,会产生如下的报错
Access to fetch at ‘http://localhost:8080/hdfs/read-csv?path=/output/hdfsJobByMonth/part-r-00000‘ from origin ‘http://localhost:9528‘ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.
这个错误表明前端应用(运行在 http://localhost:9528)试图通过 fetch API 访问后端服务(运行在 http://localhost:8080)的某个资源,但是由于跨域资源 ...
privateMap.get is not a function
问题G2图绘制过程中,在渲染过程中前端报错其中报错信息如下
tslib.es6.js:233 Uncaught (in promise) TypeError: privateMap.get is not a function
在GitHub上找到相应的解答
解决内部包缺少tslib
12npm install --save tslibnpm run start
GitHub原文链接
TypeError: privateMap.get is not a function
Can't find dependent libraries
问题在部署hadoop项目过程中,出现了这个报错Exception in thread “main” java.lang.UnsatisfiedLinkError: E:\winutils-master\hadoop-3.3.5\bin\hadoop.dll: Can’t find dependent libraries这个报错大概意思就是:dll缺所需的依赖
解决办法使用depends来查找所缺的依赖,该工具的下载地址:depends
使用的时候直接把dll文件拽进去等着搜索就行了 如图可以看到缺了哪些依赖,直接上网搜索添加即可只需要查看第一层即可
depends查找很慢
创建run_depends.txt文件
输入以下内容(两行)
12set PATH="""D:\Tools\depends\depends22_x64\depends.exe"
注意要讲上面的路径改成depends的路径
将run_depends.txt后缀名改为bat
然后直接启动这个bat文件就可以了,这样查找很快速