首页
壁纸
留言
友链
关于
统计
Search
1
武汉理工刷课,武汉理工大学刷课,刷在线作业程序
992 阅读
2
Linux下Golang编译程序在后台运行及开机启动
799 阅读
3
抖音userid怎么获取
692 阅读
4
破解Typora1.1.5最新版
568 阅读
5
[必看]Go语言配置代理
437 阅读
技术
php
Mysql
wechat公众号
git
前端
前端大杂烩
vue2
vue3
Golang
gorm
golang配置
韩昊杰的软件
工具
VMware
其他
docker
kafka
nginx
openwrt
登录
Search
韩昊杰
累计撰写
66
篇文章
累计收到
52
条评论
首页
栏目
技术
php
Mysql
wechat公众号
git
前端
前端大杂烩
vue2
vue3
Golang
gorm
golang配置
韩昊杰的软件
工具
VMware
其他
docker
kafka
nginx
openwrt
页面
壁纸
留言
友链
关于
统计
搜索到
66
篇与
的结果
2022-08-21
Linux下Golang编译程序在后台运行及开机启动
Linux下Golang编译程序在后台运行及开机启动编译需要在项目根目录设置GOPATH为amd64set GOPACH=amd64设置GOOS为linuxset GOOS=linux指定输出文件名go build test.go指定输出文件名go build -o custom_name修改可执行权限chmod 777 程序名称程序后台运行nohup ./custom_name &不输出错误信息nohup ./custom_name >/dev/null 2>&1 &关闭程序查询进程号ps aux|grep custom_name关闭进程kill 进程编号开机启动golangvi /etc/rc.local
2022年08月21日
799 阅读
11 评论
0 点赞
2022-07-21
Vue 银行卡号 每4位补一个空格
vue 隔四个字符加一个空格效果图输入方式进行格式化代码: <el-form-item label="测试" prop="test"> <el-input v-model="queryParams.test" placeholder="测试" clearable :maxlength="23" size="small" /> </el-form-item>watch监听 watch: { ['queryParams.test'](val) { this.$nextTick(() => { this.queryParams.test = val.replace(/\D/g,'').replace(/....(?!$)/g,'$& '); console.log('数字是多少:', this.queryParams.test,val) }); } },展示直接格式化{{ item.name.replace(/(\d{4})(?=\d)/g, '$1 ') }}
2022年07月21日
395 阅读
0 评论
0 点赞
2022-06-19
mysql怎么获取不重复的数据?
mysql怎么获取不重复的数据?mysql获取不重复的数据的方法:在查询语句中添加distinct关键字来过滤重复的记录select distinct 字段名 from 数据表;使用方法对单个字段进行去重sql:select distinct age from user;对多个字段进行去重sql:select distinct name,age from user;对多个字段进行去重并求count的sql:select count(distinct name,age) as total from user;也可以对select * 进行去重select distinct * from user;
2022年06月19日
107 阅读
0 评论
0 点赞
2022-06-18
使用SQL语句来判断数据库中时间,是否为当日时间
使用SQL语句来判断数据库中时间,是否为当日时间可直接使用select count(*) from history_visitor where date_format(visit_time,'%Y-%m-%d')= date_format(now(),'%Y-%m-%d') 直接在sql中实现了将create_time和当前时间按年月日格式比较,若处在一条相同的·,则说明该用户今日已签到。mysql判断时间是否是当天,昨天今天 select * from 表名 where to_days(时间字段名) = to_days(now()); 昨天 SELECT * FROM 表名 WHERE TO_DAYS( NOW( ) ) - TO_DAYS( 时间字段名) <= 1 7天 SELECT * FROM 表名 where DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= date(时间字段名) 近30天 SELECT * FROM 表名 where DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(时间字段名) 本月 SELECT * FROM 表名 WHERE DATE_FORMAT( 时间字段名, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' ) 上一月 SELECT * FROM 表名 WHERE PERIOD_DIFF( date_format( now( ) , '%Y%m' ) , date_format( 时间字段名, '%Y%m' ) ) =1 #查询本季度数据 select * from `ht_invoice_information` where QUARTER(create_date)=QUARTER(now()); #查询上季度数据 select * from `ht_invoice_information` where QUARTER(create_date)=QUARTER(DATE_SUB(now(),interval 1 QUARTER)); #查询本年数据 select * from `ht_invoice_information` where YEAR(create_date)=YEAR(NOW()); #查询上年数据 select * from `ht_invoice_information` where year(create_date)=year(date_sub(now(),interval 1 year)); 查询当前这周的数据 SELECT name,submittime FROM enterprise WHERE YEARWEEK(date_format(submittime,'%Y-%m-%d')) = YEARWEEK(now()); 查询上周的数据 SELECT name,submittime FROM enterprise WHERE YEARWEEK(date_format(submittime,'%Y-%m-%d')) = YEARWEEK(now())-1; 查询当前月份的数据 select name,submittime from enterprise where date_format(submittime,'%Y-%m')=date_format(now(),'%Y-%m') 查询距离当前现在6个月的数据 select name,submittime from enterprise where submittime between date_sub(now(),interval 6 month) and now(); 查询上个月的数据 select name,submittime from enterprise where date_format(submittime,'%Y-%m')=date_format(DATE_SUB(curdate(), INTERVAL 1 MONTH),'%Y-%m') select * from ` user ` where DATE_FORMAT(pudate, ' %Y%m ' ) = DATE_FORMAT(CURDATE(), ' %Y%m ' ) ; select * from user where WEEKOFYEAR(FROM_UNIXTIME(pudate,'%y-%m-%d')) = WEEKOFYEAR(now()) select * from user where MONTH (FROM_UNIXTIME(pudate, ' %y-%m-%d ' )) = MONTH (now()) select * from [ user ] where YEAR (FROM_UNIXTIME(pudate, ' %y-%m-%d ' )) = YEAR (now()) and MONTH (FROM_UNIXTIME(pudate, ' %y-%m-%d ' )) = MONTH (now()) select * from [ user ] where pudate between 上月最后一天 and 下月第一天 where date(regdate) = curdate(); select * from test where year(regdate)=year(now()) and month(regdate)=month(now()) and day(regdate)=day(now()) SELECT date( c_instime ) ,curdate( ) FROM `t_score` WHERE 1 LIMIT 0 , 30
2022年06月18日
68 阅读
0 评论
0 点赞
2022-06-09
php远程请求CURL案例(爬虫、保存登录状态)
php远程请求CURL案例
2022年06月09日
50 阅读
0 评论
0 点赞
1
...
9
10
11
...
14