- 博客(162)
- 收藏
- 关注
原创 PHP 生成模糊图片
$filename = "Uploads/card/card_poster.png"; //生成白色背景图 用于图片合成 $blank_bg_w = 375; // 背景图片宽度 $blank_bg_h = 553; // 背景图片高度 $blank_background = imagecreatetruecolor($blank_bg_w,$blank_bg_...
2022-05-27 15:16:05 302
原创 ubuntu 设置静态ip
sudo vi /etc/network/interfaces# The primary network interfaceauto ens33#iface ens33 inet dhcpiface ens33 inet staticaddress 192.168.0.35netmask 255.255.255.0gateway 192.168.0.1sudo /etc/init.d/networking restartping 114.114.114.114
2022-03-01 11:50:30 299
原创 golang float64比较大小
aa:= 2.55 bb:= 1.23 //比较float64 大小 if math.Max(aa, bb) == aa && math.Abs(aa-bb) > 0.000001 { fmt.Println(aa,bb) }
2022-02-26 14:30:30 2350
原创 docker build多个tag
docker build -t 192.168.0.18:5000/hello:latest -t 192.168.0.18:5000/hello:v1 -f service/hello/Dockerfile .
2021-12-27 16:26:02 2459
原创 go 解析xml文件,获取excel 指定工作表的索引
获取excel 指定工作表的索引go get github.com/beevik/etree// GetDefaultSheetIndex 获取数据源工作表索引func GetDefaultSheetIndex(workbookPath string, defaultSheetName string) (defaultSheetIndex int, err error) { doc := etree.NewDocument() if err = doc.ReadFromFile(work.
2021-12-16 11:52:45 345
原创 go 获取数据类型
package main import ( "fmt" "reflect" ) func main() { var a int typeOfA := reflect.TypeOf(a) fmt.Println(typeOfA.Name(), typeOfA.Kind()) }
2021-12-16 11:49:32 881
原创 vue 时间戳转日期
//时间戳转日期 formatStr(originVal) { let time = new Date(originVal * 1000); let y = time.getFullYear(); let m = time.getMonth() + 1; let d = time.getDate(); return y + '-' + this.add0(m) + '-' + this.add0(d); }, add0(m.
2021-12-08 12:01:18 913
原创 docker 基本使用
1. 搜索镜像docker search mysql2. 获取镜像docker pull mysql3.查看docker运行的容器(可以获取到这个容器的id) docker ps4.访问这个容器docker exec -it 73877e65c07d /bin/bash5.已拉取的镜像[root@localhost docker]# docker imagesREPOSITORY TAG IMAGE ID .
2021-11-25 16:44:58 619
原创 echarts 下载base64图片
let myChart = echarts.init(document.getElementById(_this.widgetId));myChart .getDataURL()
2021-10-26 17:23:51 162
原创 echarts vue
initEcharts(dataset, tooltipConfig) { //数据挂载更新完之后执行 this.$nextTick(() => { this.setEcharts(dataset, tooltipConfig) }) }, setEcharts(dataset, tooltipConfig) { let _this = this // 基于准备好的dom,初始化echarts实例 .
2021-09-25 15:17:47 105
原创 js 二维数组排序
let list = [ {id:1,name:"aa"}, {id:2,name:"bb"}, {id:3,name:"cc"}, ] //id从小到大排序 list.sort(function (a,b){ return a.id-b.id; })
2021-08-13 17:29:40 916
原创 carbon 2020-08-10 转时间戳
StartTime := carbon.ParseByFormat(search["StartTime"].(string), "Y-m-d").ToTimestamp()
2021-08-12 17:55:38 661
原创 vex-table 年选择器格式化返回值
<vxe-input v-model="formData.year" placeholder="请选择货品年份" type="year" clearable value-format="yyyy" style="width:100%"></vxe-input>
2021-07-30 13:40:02 483
原创 阿里云 oss The bucket POST must contain the specified ‘key‘. If it is specified, please check the order
https://help.aliyun.com/knowledge_detail/42976.html?spm=a2c4g.11186623.2.13.11cd1a210eyJOX
2021-07-30 13:35:17 4040
原创 vxe-table底部合计
<input value="" type="hidden" name="goods_table" id="goods_table"/> <div id="app" class=" am-u-sm-12 am-u-md-12 am-u-lg-12 am-margin-top-xs"> <inp.
2021-05-31 19:53:21 5181 2
原创 text/template select使用
<a href="javascript:void(0);" class="j-user-quit tpl-table-black-operation-del" data-id="<?= $item['clerk_id'] ?>"> 离职</a><script id="tpl-update-delivery" type="text/template"> <div class="am-padding-top-sm">.
2021-05-31 19:42:13 313 1
原创 hyperf 软删除
deleted_at 默认为null`delete_time` int(11) unsigned DEFAULT NULL COMMENT '软删除',
2021-05-13 09:27:08 1171
原创 php 添加snowflake扩展
雪花ID全家桶 https://gitee.com/yitter/idgeneratorphp扩展安装 https://gitee.com/yitter/idgenerator/tree/master/PHPgit clone https://gitee.com/yitter/idgenerator.gitcd idgenerator/PHPphpize./configure --with-php-config=/path/php-config//修改path地址//./configu
2021-05-08 14:07:36 427
原创 EasyDL使用
目录登录创建模型创建数据集导入数据手动标注训练模型发布模型体验H5easydl官网:https://ai.baidu.com/easydl/官方文档:https://ai.baidu.com/ai-doc/EASYDL/ok38n2w9h登录创建模型创建数据集导入数据图片最少要上传4张手动标注训练模型发布模型官方文档:https://ai.baidu.com/ai-doc/EASYDL/Yk38n3bj.
2021-04-30 10:46:11 3133 4
原创 Python小白逆袭大神 课节6 综合大作业
《青春有你2》评论调取、词频统计、绘制词云、评论情感分析'''pip install jieba#pip install wordcloudwordcloud安装https://blog.csdn.net/weixin_45735297/article/details/105509316'''from __future__ import print_functionimport requestsimport jsonimport re #正则匹配import time #时间处理模
2021-04-29 16:57:44 120
原创 Python小白逆袭大神 课节5选手识别
PaddleHub之《青春有你2》 课后作业项目地址:https://aistudio.baidu.com/aistudio/projectdetail/1869924?channelType=0&channel=0
2021-04-29 11:49:41 66
原创 tp5 Bootstrap分页 添加每页显示数量
萤火小程序商城后台需求:框架列表默认每页显示15条,添加一个输入框,输入每页显示数量改造前改造后\thinkphp\library\think\paginator\driver\Bootstrap.php 修改render函数,添加一个生成每页显示条数输入框函数 /** * 渲染分页html * @return mixed */ public function render() { if ($this-.
2021-04-24 15:28:44 1979
原创 Python小白逆袭大神 课节4 练习及作业代码
json数据来自 python 爬取百度百科中《青春有你2》中参赛选手信息直方图代码import matplotlib.pyplot as pltimport numpy as npimport jsonimport matplotlib.font_manager as font_manager#显示matplotlib生成的图形# %matplotlib inline work_path = 'D:/python/python/work/'with open(work_pat
2021-04-23 16:03:08 127 1
原创 python 爬取百度百科中《青春有你2》中参赛选手信息
import jsonimport reimport requestsimport datetimefrom bs4 import BeautifulSoupimport osimport urllib.parse #获取当天的日期,并进行格式化,用于后面文件命名,格式:20200420today = datetime.date.today().strftime('%Y%m%d') work_path = 'D:python/work/'def crawl_wiki_d...
2021-04-20 14:36:06 1250 2
原创 PHP tp5 读取csv文件、读取文件夹内容
$fileIdPath = ROOT_PATH . "/456.csv";$file = fopen($fileIdPath, "r");$playerData = [];while (!feof($file)) { $playerData[] = (fgetcsv($file));}fclose($file);$filePath = ROOT_PATH . "/goods_image";$img_list = scandir($filePath);unset($img_lis.
2021-04-16 17:54:00 426
原创 Grafika 使用
参考教程:https://blog.csdn.net/qq_34657922/article/details/79479892 // 实例化图像编辑器 $editor = Grafika::createEditor(['Gd']); // 字体文件路径 $priceFontPath = __DIR__ . '/fonts/Baloo2.ttf'; $strFontPath = __DIR__ . '/fonts/Regu.
2021-04-15 18:03:28 636
原创 PHP 二维数组重置索引
$list = array( 1 => array( 'title' => 'BELLE牛皮高帮及膝骑士靴', 'price' => 368.000, 'store' => 99 ), 10 => array( 'title' => 'CLINIQUE 倩碧 特效润肤乳液125ml', 'price' => 368.000, 'store' =&.
2021-04-15 17:55:00 1088
原创 微信小程序双引号字符串加密后传值 encodeURIComponent和decodeURIComponent
varstr='<p><imgsrc="https://*****.oss-cn-beijing.aliyuncs.com/2021012216344225e5c4833.png"/></p>'//父组件加密varencodeUrlParameter=encodeURIComponent(str)console.log(encodeUrlParameter);//子组件解密varurlParameter=decodeURICompo...
2021-04-10 15:27:03 777
原创 ddsort.js jQuery拖动排序插件
<div class="uploader-list am-cf"> <?php foreach ($model['image'] as $key => $item): ?> <div class="file-item"> .
2021-04-10 11:57:19 240
原创 python提取有道云笔记思维导图数据
找到有道云笔记本地数据文件夹查找思维导图文件,复制到一个新文件夹运行脚本import osimport jsonimport ast filePath = 'D:\\666\\min'file_list = []def get_week(index): week_list = { '1':'星期一', '2':'星期二', '3':'星期三', '4':'星期四', '5':'星期五'
2021-04-05 16:41:27 375 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人