随笔- 310  文章- 1  评论- 0  阅读- 85655 
04 2023 档案
mysql时间格式化
摘要:SELECT UNIX_TIMESTAMP(); SELECT NOW(); SELECT DATE_FORMAT(NOW(),'%Y-%m-%d %H:%i:%s') AS TIME; select FROM_UNIXTIME(UNIX_TIMESTAMP(),'%Y-%m-%d %H:%i:%S 阅读全文
posted @ 2023-04-21 09:38 boye169 阅读(172) 评论(0) 推荐(0) 编辑
mysql给查询加序号
摘要:SELECT * FROM student; SELECT `name`,`subject`,`score`,(@i:=@i+1) AS '序号' FROM student,(SELECT @i:=0) AS itable; 阅读全文
posted @ 2023-04-21 09:31 boye169 阅读(25) 评论(0) 推荐(0) 编辑
mysql 字符串数字排序
摘要:MySQL字符串排序的很奇怪的问题,在数据里面定义的是varchar类型,实际存放的是Int类型的数据,按一下查询语句进行排序:将字段*1或者+0可以将MySQL字符串字段按数值排序 select * from table where 1 order by id+0 desc; 阅读全文
posted @ 2023-04-12 17:52 boye169 阅读(82) 评论(0) 推荐(0) 编辑
MySQL替换回车、换行符、空格
摘要:char(9) 表示水平制表符 (tab键 \t)char(10) 表示换行键 (\n)char(13) 表示回车键 (\r) UPDATE table_name SET column= REPLACE(column,CHAR(13),'');//将回车符号替换为空 UPDATE table_nam 阅读全文
posted @ 2023-04-12 16:41 boye169 阅读(488) 评论(0) 推荐(0) 编辑
linux date显示指定时区时间
摘要:显示北京时间 export TZ='Asia/Shanghai' date +"%F %T" 显示指定时区时间 utc0time=`date -u "+%Y-%m-%d %H:%M"` utc8time=`date -u "+%Y-%m-%d %H:%M" -d "8 hour"` 时间运算部分 d 阅读全文
posted @ 2023-04-10 11:13 boye169 阅读(332) 评论(0) 推荐(0) 编辑
window设置开机启动脚本
摘要:设置后台启动 新建run.bat文件 @echo off if "%1"=="h" goto begin start mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit :begi 阅读全文
posted @ 2023-04-10 10:06 boye169 阅读(343) 评论(0) 推荐(0) 编辑
windows查看端口被占用程序和停止占用端口程序
摘要:打开cmd命令行窗口 快捷键:Win+R 查看系统所有被占用的端口 netstat -ano 查看指定端口是否被占用 netstat -ano |findstr "8888" 进入windows命令窗口之后,通过命令查找某一特定端口,在命令窗口中输入命令中输入netstat -ano |findst 阅读全文
posted @ 2023-04-10 09:57 boye169 阅读(203) 评论(0) 推荐(0) 编辑
python操作git
摘要:安装模块 pip3 install gitpython #coding:utf-8 import os from git.repo import Repo from git.repo.fun import is_git_dir #pip3 install gitpython class GitRep 阅读全文
posted @ 2023-04-07 15:57 boye169 阅读(47) 评论(0) 推荐(0) 编辑
python requests-html
摘要:#pip install requests-html ''' 目标网站: https://pic.netbian.com ''' from requests_html import HTMLSession import re,os import requests from tqdm import t 阅读全文
posted @ 2023-04-06 17:51 boye169 阅读(28) 评论(0) 推荐(0) 编辑
awk if else用法
摘要:awk '{if ($1==1) print "A"; else if ($1==2) print "B"; else print "C"}' awk中也支持++或者+=运算符 grep '接口耗时:' test.log|cut -d "m" -f 1 |cut -d ":" -f 2|awk 'B 阅读全文
posted @ 2023-04-06 15:09 boye169 阅读(144) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示