摘要: 1. 现有俩张表 表一 PL 为管道表 p1.p2 的xy坐标在坐标表里 p1,p2为开始点和结束点 表二为坐标表 PP 需求:根据开始点结束点坐标。算出所有管道距离 给出sql SELECT a.NAME name,SUM(a.s1) length FROM ( SELECT r1.id, r1. 阅读全文
posted @ 2020-04-29 11:09 丨Mars 阅读(494) 评论(0) 推荐(0) 编辑
摘要: 1. 图形验证码生成 依赖 "github.com/mojocn/base64Captcha" // 图形验证码 func CaptchaImage(c *gin.Context) { //config struct for digits //数字验证码配置 //var configD = base 阅读全文
posted @ 2020-04-29 10:59 丨Mars 阅读(2420) 评论(0) 推荐(0) 编辑
摘要: 1.rgb to 16进制 function colorRGBtoHex(color) { var rgb = color.split(','); var r = parseInt(rgb[0]); var g = parseInt(rgb[1]); var b = parseInt(rgb[2]) 阅读全文
posted @ 2020-04-27 16:54 丨Mars 阅读(1760) 评论(2) 推荐(1) 编辑
摘要: 1、环境准备 ​ 本文中的案例会有四台机器,他们的Host和IP地址如下 c1 -> 10.0.0.31 c2 -> 10.0.0.32 c3 -> 10.0.0.33 c4 -> 10.0.0.34 ​ 四台机器的host以c1为例: [root@c1 ~]# cat /etc/hosts 127 阅读全文
posted @ 2018-12-20 11:32 丨Mars 阅读(629) 评论(0) 推荐(0) 编辑
摘要: 1. go get github.com/gophercloud/gophercloud 阅读全文
posted @ 2018-11-15 12:07 丨Mars 阅读(1827) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "crypto/md5" "encoding/hex" "sort" "strings" "net/url" "bytes" "net/http" "io/ioutil" ) var urls = "http://www.sendcloud.net/smsapi/send" var token = "xxxxxx" ... 阅读全文
posted @ 2018-11-06 12:12 丨Mars 阅读(1186) 评论(0) 推荐(0) 编辑
摘要: 1.配置https https://github.com/goharbor/harbor/blob/master/docs/configure_https.md 2.harbor安装notary插件 ./install.sh --with-notary 3.复制证书到客户端 开启https后,客户端 阅读全文
posted @ 2018-08-30 14:54 丨Mars 阅读(4575) 评论(0) 推荐(0) 编辑
摘要: 先贴官方地址,我的做法差不多 https://github.com/goharbor/harbor/blob/master/docs/configure_swagger.md 1.下载对应资源 2.编辑prepare-swagger.sh 3.修改文件mode 4.执行脚本 5.将上级目录中src中 阅读全文
posted @ 2018-08-23 11:24 丨Mars 阅读(430) 评论(0) 推荐(0) 编辑
摘要: 先配主从同步,后将主库表老数据传输到从库 说明:api-server的数据库为主,其他harbor为从 1.master 配置文件更改 创建用户 查看master二进制文件信息,并记录file和position 2.slave 配置文件修改 进如msyql命令行模式 启动从模式 start slav 阅读全文
posted @ 2018-08-07 15:55 丨Mars 阅读(4985) 评论(0) 推荐(1) 编辑
摘要: 1.准备好HDFS(这里我是本机测试) 2.es 安装repository-hdfs插件 (如es为多节点需在每个节点都安装插件) 3. 重启ES 4.创建快照仓库 PUT /_snapshot/backup_hdfs 5.查看快照仓库 GET /_snapshot/_all 6.创建快照 PUT 阅读全文
posted @ 2018-08-07 15:50 丨Mars 阅读(3037) 评论(0) 推荐(0) 编辑