首页
壁纸
留言
友链
关于
统计
Search
1
武汉理工刷课,武汉理工大学刷课,刷在线作业程序
913 阅读
2
Linux下Golang编译程序在后台运行及开机启动
740 阅读
3
抖音userid怎么获取
621 阅读
4
破解Typora1.1.5最新版
499 阅读
5
[必看]Go语言配置代理
388 阅读
技术
php
Mysql
wechat公众号
git
前端
前端大杂烩
vue2
vue3
Golang
gorm
golang配置
韩昊杰的软件
工具
VMware
其他
docker
kafka
nginx
openwrt
登录
Search
韩昊杰
累计撰写
65
篇文章
累计收到
52
条评论
首页
栏目
技术
php
Mysql
wechat公众号
git
前端
前端大杂烩
vue2
vue3
Golang
gorm
golang配置
韩昊杰的软件
工具
VMware
其他
docker
kafka
nginx
openwrt
页面
壁纸
留言
友链
关于
统计
搜索到
65
篇与
的结果
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日
364 阅读
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日
83 阅读
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日
63 阅读
0 评论
0 点赞
2022-06-09
php远程请求CURL案例(爬虫、保存登录状态)
php远程请求CURL案例
2022年06月09日
44 阅读
0 评论
0 点赞
2022-05-20
[go语言]抖音获取用户详细信息
下面直接贴代码,附带源码和成品,请自行下载package main import ( "bufio" "encoding/json" "fmt" "io/ioutil" "net/http" "os" "strings" "time" ) type structureData struct { StatusCode int `json:"status_code"` UserInfo struct { AwemeCount int `json:"aweme_count"` FollowingCount int `json:"following_count"` SecUID string `json:"sec_uid"` EnterpriseVerifyReason string `json:"enterprise_verify_reason"` IsMixUser bool `json:"is_mix_user"` UID string `json:"uid"` Nickname string `json:"nickname"` AvatarLarger struct { URI string `json:"uri"` URLList []string `json:"url_list"` } `json:"avatar_larger"` OriginalMusician struct { MusicCount int `json:"music_count"` MusicUsedCount int `json:"music_used_count"` DiggCount int `json:"digg_count"` } `json:"original_musician"` Signature string `json:"signature"` FavoritingCount int `json:"favoriting_count"` UniqueID string `json:"unique_id"` MixInfo interface{} `json:"mix_info"` AvatarMedium struct { URI string `json:"uri"` URLList []string `json:"url_list"` } `json:"avatar_medium"` VerificationType int `json:"verification_type"` TypeLabel interface{} `json:"type_label"` TotalFavorited string `json:"total_favorited"` MplatformFollowersCount int `json:"mplatform_followers_count"` IsGovMediaVip bool `json:"is_gov_media_vip"` ShowFavoriteList bool `json:"show_favorite_list"` CardEntries []interface{} `json:"card_entries"` ShortID string `json:"short_id"` FollowStatus int `json:"follow_status"` FollowerCount int `json:"follower_count"` Secret int `json:"secret"` Geofencing interface{} `json:"geofencing"` PolicyVersion interface{} `json:"policy_version"` AvatarThumb struct { URI string `json:"uri"` URLList []string `json:"url_list"` } `json:"avatar_thumb"` CustomVerify string `json:"custom_verify"` PlatformSyncInfo []interface{} `json:"platform_sync_info"` FollowersDetail interface{} `json:"followers_detail"` MixCount int `json:"mix_count"` } `json:"user_info"` Extra struct { Now int64 `json:"now"` Logid string `json:"logid"` } `json:"extra"` } func main() { for { fmt.Println(` 韩昊杰go语言软件 查询抖音信息工具 输入quit即可退出 `) var scan string fmt.Print("请输入你要查询用户的ID:") reader := bufio.NewReader(os.Stdin) // 标准输入输出 scan, _ = reader.ReadString('\n') // 回车结束 scan = strings.TrimSpace(scan) // 去除最后一个空格 if scan == "quit" { os.Exit(1) } fmt.Println("------------------------------下面是结果------------------------------") fmt.Println("") returnData := request(scan) fmt.Printf("账号昵称:%v\n", returnData.UserInfo.Nickname) fmt.Printf("短位id:%v\n", returnData.UserInfo.UID) fmt.Printf("获赞数量:%v\n", returnData.UserInfo.TotalFavorited) fmt.Printf("粉丝:%v\n", returnData.UserInfo.FollowerCount) fmt.Printf("关注:%v\n", returnData.UserInfo.FollowingCount) fmt.Printf("签名:%v\n", returnData.UserInfo.Signature) fmt.Printf("头像链接:%v\n", returnData.UserInfo.AvatarLarger.URLList[0]) fmt.Println("") fmt.Println("------------------------------上面面是结果------------------------------") time.Sleep(time.Second * 4) fmt.Println("再次输入内容即可再次查询") } } func request(data string) structureData { resp, err := http.Get("https://www.iesdouyin.com/web/api/v2/user/info/?unique_id=" + data) if err != nil { fmt.Print("http faild err data:", err) } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { fmt.Print("ioutil faile") } var returnData structureData json.Unmarshal([]byte(body), &returnData) return returnData }
2022年05月20日
280 阅读
1 评论
0 点赞
1
...
9
10
11
...
13