惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Last Watchdog
The Last Watchdog
K
Kaspersky official blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Spread Privacy
Spread Privacy
T
Threatpost
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
MongoDB | Blog
MongoDB | Blog
V
Vulnerabilities – Threatpost
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
Microsoft Azure Blog
Microsoft Azure Blog
GbyAI
GbyAI
小众软件
小众软件
Cloudbric
Cloudbric
The Hacker News
The Hacker News
阮一峰的网络日志
阮一峰的网络日志
Vercel News
Vercel News
人人都是产品经理
人人都是产品经理
Forbes - Security
Forbes - Security
Martin Fowler
Martin Fowler
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
AWS News Blog
AWS News Blog
Stack Overflow Blog
Stack Overflow Blog
N
News | PayPal Newsroom
P
Privacy & Cybersecurity Law Blog
TaoSecurity Blog
TaoSecurity Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园_首页
A
Arctic Wolf
www.infosecurity-magazine.com
www.infosecurity-magazine.com
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Scott Helme
Scott Helme
T
Tor Project blog
S
Secure Thoughts
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
M
MIT News - Artificial intelligence
博客园 - 司徒正美
T
Threat Research - Cisco Blogs
C
Cyber Attacks, Cyber Crime and Cyber Security
Schneier on Security
Schneier on Security
B
Blog RSS Feed
AI
AI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Attack and Defense Labs
Attack and Defense Labs
Webroot Blog
Webroot Blog
Google DeepMind News
Google DeepMind News
Project Zero
Project Zero
Hacker News: Ask HN
Hacker News: Ask HN

qubeijun的博客

言语理解与表达 父亲往事-我儿子叫冬冬 公务员行测答题顺序及用时及答题技巧 判断推理 数量关系 冬甜夫妇5-10-5-21日本蜜月行程安排回归总结篇(无图片) 冬甜夫妇5.10-5.21日本蜜月行程安排计划篇 5.1 小贝壳疫苗计划 100DAYS 父亲往事-猴牤大爷的“帽子” 父亲往事-姨妈家的葡萄架 父亲往事-十五的月饼 父亲往事-姑妈的压岁钱 父亲往事-母亲的缝纫机父亲的锯 父亲往事-家属来队 父亲往事-新兵连的生活 父亲往事-村北的槐树林 父亲往事-小贝壳 公务员面试 系统架构设计师 图形推理 数学运算 父亲往事-惊蛰 资料分析 父亲往事-偷吃西红柿有绝窍 父亲往事-毯子衣服 父亲往事-水壶煮鸡蛋 父亲往事-煎饼蘸香油 系统架构设计师论文 软件设计师 父亲往事-大哥 资料分析-旧 基于grafana的监控部署 mysql数据库定时备份&运行日志定时清理 Alibaba Cloud Toolkit的使用说明 Dojo简单入门 Angular简单入门 vue基础知识点总结 java正则表达式收集 java处理时间和日期api java常用的io,输入输出 java常见集合汇总 java调试代码不再用system.out.println(),用日志来调试程序 java常用工具类总结 java常用字符串操作总结 python之pymysql增删改查mysql数据库 词性标注集 python获取当前文件夹下的所有的文件名 mysql数据库操作总结 (翻译)Understanding LSTM Networks (翻译)Understanding Convolutional Neural Networks for NLP (翻译)传统和深度学习模型在文本分类中的应用综述与基准 小木虫论坛-学术科研互动平台爬虫 solr命令(持续更新) python json读写操作 python pip安装包镜像 python数字进度条 抓取维基百科分类索引下某一分类下的子分类及其分类下的页面(仅限词条) python3循环读取excel文件并写入json python3 requests动态网页post提交数据 python+selenium搜狗微信主页抓取 2017年5月25日 2017年5月18日 2017年5月17日 2017年5月15日 2017年5月16日 2017年5月14日 2017年5月13日 2017年5月12日 2017年5月11日 2017年5月10日 2017年5月9日 2017年5月8日 2017年5月7日 2017年5月6日 2017年5月5日 2017年5月4日 2017年5月3日 2017年5月2日 2017年5月1日 儿子的信-2013年7月9日 儿子的信-2013年7月8日 儿子的信-2011年11月26日 儿子的信-2010年8月16日 儿子的信-2010年1月2日
各种问题解决答案汇总
qubeijun · 2021-04-13 · via qubeijun的博客

各种问题解决答案汇总

发表于|更新于|技术

|总字数:1.3k|阅读时长:6分钟|浏览量:|

目录

1、mysql添加字段并且设置默认值

2、一键部署工具

3、MySQL命令行导出数据库表

4、vue导出word

5、Failed to convert value of type 'java.lang.String' to required type 'java.util.Date';

6、jsonArray中按某字段排序

7、关于element ui里的多选反选表格的问题(toggleRowSelection)

8、真正有效解决ONLY_FULL_GROUP_BY的问题

9、java遍历map

10、es时间范围小于等于查询

11、es模糊查询

12、判断字符串是否包含中文(也可以说是否为纯英文)

13、mysql创建只读用户读取指定数据表 

14、linux查看IP端口是否连通

15、数据库的备份和还原(整库) 

16、 java打包后获取resource文件,并转成流

17、linux之间传文件 

18、vim 转换为 Unix 换行

19、linux系统mysql8单机多实例+主从复制部署

20、主从复制出错解决办法

2021-04-13

1、mysql添加字段并且设置默认值

1
alter table t_acceptance_fund add is_complete varchar(2) default '0' comment '完成状态';

2、一键部署工具

帮助中心 - 阿里云

2021-04-14

3、MySQL命令行导出数据库表

1、首先进入mysql的bin文件

2、mysqldump -uroot -proot neu_tyjr_base t_personnel_information > C:\Users\qu\Desktop\t_personnel_information.sql

4、vue导出word

Vue项目导出word文档_Lik1024-CSDN博客_vue导出word文档

2021-04-21

5、Failed to convert value of type 'java.lang.String' to required type 'java.util.Date';

局部转换

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
@Controller
public class UserController{
@RequestMapping(value="/login.do")
public String login(String username,Date birthday){
System.out.println("________");
return "";
}
//只需要加上下面这段即可,注意不能忘记注解
@InitBinder
public void initBinder(WebDataBinder binder, WebRequest request) {
//转换日期 注意这里的转化要和传进来的字符串的格式一直 如2015-9-9 就应该为yyyy-MM-dd
DateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));// CustomDateEditor为自定义日期编辑器
}
}

2021-04-25

6、jsonArray中按某字段排序

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
* 对json数组排序,
* @param jsonArr
* @param sortKey 排序关键字
* @param is_desc is_desc-false升序列 is_desc-true降序 (排序字段为字符串)
* @return
*/
public static String jsonArraySort(JSONArray jsonArr,String sortKey,boolean is_desc) {
//存放排序结果json数组
JSONArray sortedJsonArray = new JSONArray();
//用于排序的list
List<JSONObject> jsonValues = new ArrayList<JSONObject>();
//将参数json数组每一项取出,放入list
for (int i = 0; i < jsonArr.size(); i++) {
jsonValues.add(JSONObject.fromObject(jsonArr.getJSONObject(i)));
}
//快速排序,重写compare方法,完成按指定字段比较,完成排序
Collections.sort(jsonValues, new Comparator<JSONObject>() {
//排序字段
private final String KEY_NAME = sortKey;
//重写compare方法
@Override
public int compare(JSONObject a, JSONObject b) {
String valA = new String();
String valB = new String();
try {
valA = a.getString(KEY_NAME);
valB = b.getString(KEY_NAME);
} catch (JSONException e) {
e.printStackTrace();
}
//是升序还是降序
if (is_desc){
return -valA.compareTo(valB);
} else {
return -valB.compareTo(valA);
}
}
});
//将排序后结果放入结果jsonArray
for (int i = 0; i < jsonArr.size(); i++) {
sortedJsonArray.add(jsonValues.get(i));
}
return sortedJsonArray.toString();
}

2021-04-27

7、关于element ui里的多选反选表格的问题(toggleRowSelection)

关于element ui里的多选反选表格的问题(toggleRowSelection)_小胡仙的博客-CSDN博客_element table 反选

2021-04-28

8、真正有效解决ONLY_FULL_GROUP_BY的问题

真正有效解决ONLY_FULL_GROUP_BY的问题_索隆有几把刀的博客-CSDN博客_onlyfullgroupby意义

2021-05-24

9、java遍历map

1
2
3
4
Map<Integer, Integer> map = new HashMap<Integer, Integer>();
for (Map.Entry<Integer, Integer> entry : map.entrySet()) {
System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue());
}

2021-05-25

10、es时间范围小于等于查询

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
"query": {
"bool": {
"must": [
{
"range": {
"createTime": {
"lte": "2020-12-01 00:00:00"
}
}
}
]
}
}
}

11、es模糊查询

1
2
3
4
5
{
"query": {
"wildcard" : { "search_word" : "*中国*" }
}
}

2021-06-27

12、判断字符串是否包含中文(也可以说是否为纯英文)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/**
* 字符串是否包含中文
*
* @param str 待校验字符串
* @return true 包含中文字符 false 不包含中文字符
* @throws EmptyException
*/
public static boolean isContainChinese(String str) throws EmptyException {
if (StringUtils.isEmpty(str)) {
throw new EmptyException("sms context is empty!");
}
Pattern p = Pattern.compile("[\u4E00-\u9FA5|\\!|\\,|\\。|\\(|\\)|\\《|\\》|\\“|\\”|\\?|\\:|\\;|\\【|\\】]");
Matcher m = p.matcher(str);
return m.find();
}

2021-07-14

13、mysql创建只读用户读取指定数据表

1
GRANT SELECT ON 表名 TO 'username'@'%' IDENTIFIED BY '';

2021-12-10

14、linux查看IP端口是否连通

1
ssh -v -p port username@ip

2021-12-16

15、数据库的备份和还原(整库)

1
2
备份:mysqldump -uroot -proot --all-databases > /path/data.sql
还原:mysql -uroot -proot  --default-character-set=utf8 > /path/data.sql

2023-06-14

16、java打包后获取resource文件,并转成流

1
2
ClassLoader classLoader = QRCodeUtils(类名).class.getClassLoader();
InputStream inputStream = classLoader.getClass().getClassLoader().getResourceAsStream("weixin.png");

17、linux之间传文件

1
2
scp /home/pocean-cloud-api-zuul-server.jar root@10.1.3.208://ticket/apps/
(之后会提示输入密码)

2023-06-24 

18、vim 转换为 Unix 换行

1
2
3
4
// 转换为 Unix 换行
$ vim windows.sh
:set ff=unix
:wq

2024-11-13 

19、linux系统mysql8单机多实例+主从复制部署

linux系统mysql8单机多实例+主从复制部署

20、主从复制出错解决办法

1
2
3
4
5
6
7
8
9
10
11
// 查看从库状态
show slave status;
// 如果salve同步出错
stop slave; # 停止同步线程
Set @@SESSION.GTID_NEXT='ANONYMOUS'; #跳过事务
Begin;
Commit;
Set @@SESSION.GTID_NEXT = AUTOMATIC; #设置事务继续向下一个运行
start slave;
show slave status;
select * from performance_schema.replication_applier_status_by_worker # 查看错误

持续更新......

版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 qubeijun的博客

赞助

  • 微信

    微信

  • 支付宝

    支付宝