1.  所有服务树数据

tree_list = [{'id': 1, 'pid': 0, 'name': '1211', 'path': '1211', 'leaf': 0, 'type': 0},
{'id': 2, 'pid': 1, 'name': 'a1', 'path': '1211.a1', 'leaf': 0, 'type': 0},
{'id': 3, 'pid': 1, 'name': 'a2', 'path': '1211.a2', 'leaf': 1, 'type': 0},
{'id': 16, 'pid': 0, 'name': 'ddssa', 'path': 'ddssa', 'leaf': 0, 'type': 0},
{'id': 17, 'pid': 16, 'name': '11', 'path': 'ddssa.11', 'leaf': 0, 'type': 0},
{'id': 18, 'pid': 17, 'name': '121ss1', 'path': 'ddssa.11.121ss1', 'leaf': 1, 'type': 0},
{'id': 19, 'pid': 17, 'name': '13', 'path': 'ddssa.11.13', 'leaf': 1, 'type': 0},
{'id': 22, 'pid': 17, 'name': 'tesee', 'path': 'ddssa.11.tesee', 'leaf': 1, 'type': 0},
{'id': 28, 'pid': 0, 'name': 'system', 'path': 'system', 'leaf': 0, 'type': 0},
{'id': 29, 'pid': 28, 'name': 'openstack', 'path': 'system.openstack', 'leaf': 0, 'type': 0},
{'id': 30, 'pid': 28, 'name': 'dstack', 'path': 'system.dstack', 'leaf': 0, 'type': 0},
{'id': 31, 'pid': 28, 'name': 'aws', 'path': 'system.aws', 'leaf': 0, 'type': 0},
{'id': 32, 'pid': 17, 'name': 'tese11e', 'path': 'ddssa.11.tese11e', 'leaf': 1, 'type': 0},
{'id': 33, 'pid': 0, 'name': 'coremap', 'path': 'coremap', 'leaf': 0, 'type': 0},
{'id': 37, 'pid': 33, 'name': 'mysql', 'path': 'coremap.mysql', 'leaf': 0, 'type': 0},
{'id': 38, 'pid': 0, 'name': 'cloud', 'path': 'cloud', 'leaf': 0, 'type': 0},
{'id': 39, 'pid': 37, 'name': '3306', 'path': 'coremap.mysql.3306', 'leaf': 1, 'type': 0},
{'id': 40, 'pid': 33, 'name': 'redis', 'path': 'coremap.redis', 'leaf': 0, 'type': 0},
{'id': 41, 'pid': 40, 'name': '6379', 'path': 'coremap.redis.6379', 'leaf': 1, 'type': 0},
{'id': 42, 'pid': 38, 'name': 'dbs', 'path': 'cloud.dbs', 'leaf': 1, 'type': 0},
{'id': 51, 'pid': 0, 'name': 'ceshi001', 'path': 'ceshi001', 'leaf': 0, 'type': 0},
{'id': 61, 'pid': 51, 'name': '110', 'path': 'ceshi001.110', 'leaf': 0, 'type': 0},
{'id': 62, 'pid': 61, 'name': '62', 'path': 'ceshi001.110.62', 'leaf': 1, 'type': 0},
{'id': 63, 'pid': 0, 'name': 'imp', 'path': 'imp', 'leaf': 0, 'type': 0},
{'id': 64, 'pid': 0, 'name': 'test', 'path': 'test', 'leaf': 0, 'type': 0},
{'id': 73, 'pid': 0, 'name': 'cheshi001', 'path': 'cheshi001', 'leaf': 0, 'type': 0},
{'id': 74, 'pid': 73, 'name': 'aaa', 'path': 'cheshi001.aaa', 'leaf': 0, 'type': 0},
{'id': 76, 'pid': 74, 'name': 'bbb', 'path': 'cheshi001.aaa.bbb', 'leaf': 1, 'type': 0},
{'id': 77, 'pid': 73, 'name': 'ccc', 'path': 'cheshi001.ccc', 'leaf': 0, 'type': 0},
{'id': 79, 'pid': 77, 'name': 'eee', 'path': 'cheshi001.ccc.eee', 'leaf': 1, 'type': 0},
{'id': 80, 'pid': 51, 'name': 'nginx', 'path': 'ceshi001.nginx', 'leaf': 0, 'type': 0},
{'id': 81, 'pid': 80, 'name': 'lb', 'path': 'ceshi001.nginx.lb', 'leaf': 0, 'type': 0},
{'id': 82, 'pid': 81, 'name': '443', 'path': 'ceshi001.nginx.lb.443', 'leaf': 1, 'type': 0}]

2. 实现需求

### 要实现的工能思路
# 1. pid表示是当前的数据的父级节点
# 2. 如果当前数据的pid和所有的服务树数据的id相等表示,该数据是pid对应数据的子节点加入到children列表中
# {'id': 33, 'pid': 0, 'name': 'coremap', 'path': 'coremap', 'leaf': 0, 'type': 0, 'children': [{'id': 37, 'pid': 33, 'name': 'mysql', 'path': 'coremap.mysql', 'leaf': 0, 'type': 0, 'children': [{'id': 39, 'pid': 37, 'name': '3306', 'path': 'coremap.mysql.3306', 'leaf': 1, 'type': 0}]}, {'id': 40, 'pid': 33, 'name': 'redis', 'path': 'coremap.redis', 'leaf': 0, 'type': 0, 'children': [{'id': 41, 'pid': 40, 'name': '6379', 'path': 'coremap.redis.6379', 'leaf': 1, 'type': 0}]}]}

3. 代码剖析

### 先以pid做倒叙降序排序
sort_tree_list = sorted(tree_list, key=lambda e: e.__getitem__('pid'),reverse = True)
for st in sort_tree_list:
print(st)
"""
{'id': 82, 'pid': 81, 'name': '443', 'path': 'ceshi001.nginx.lb.443', 'leaf': 1, 'type': 0}
{'id': 81, 'pid': 80, 'name': 'lb', 'path': 'ceshi001.nginx.lb', 'leaf': 0, 'type': 0}
{'id': 79, 'pid': 77, 'name': 'eee', 'path': 'cheshi001.ccc.eee', 'leaf': 1, 'type': 0}
{'id': 76, 'pid': 74, 'name': 'bbb', 'path': 'cheshi001.aaa.bbb', 'leaf': 1, 'type': 0}
{'id': 74, 'pid': 73, 'name': 'aaa', 'path': 'cheshi001.aaa', 'leaf': 0, 'type': 0}
{'id': 77, 'pid': 73, 'name': 'ccc', 'path': 'cheshi001.ccc', 'leaf': 0, 'type': 0}
{'id': 62, 'pid': 61, 'name': '62', 'path': 'ceshi001.110.62', 'leaf': 1, 'type': 0}
{'id': 61, 'pid': 51, 'name': '110', 'path': 'ceshi001.110', 'leaf': 0, 'type': 0}
{'id': 80, 'pid': 51, 'name': 'nginx', 'path': 'ceshi001.nginx', 'leaf': 0, 'type': 0}
{'id': 41, 'pid': 40, 'name': '6379', 'path': 'coremap.redis.6379', 'leaf': 1, 'type': 0}
{'id': 42, 'pid': 38, 'name': 'dbs', 'path': 'cloud.dbs', 'leaf': 1, 'type': 0}
{'id': 39, 'pid': 37, 'name': '3306', 'path': 'coremap.mysql.3306', 'leaf': 1, 'type': 0}
{'id': 37, 'pid': 33, 'name': 'mysql', 'path': 'coremap.mysql', 'leaf': 0, 'type': 0}
{'id': 40, 'pid': 33, 'name': 'redis', 'path': 'coremap.redis', 'leaf': 0, 'type': 0}
{'id': 29, 'pid': 28, 'name': 'openstack', 'path': 'system.openstack', 'leaf': 0, 'type': 0}
{'id': 30, 'pid': 28, 'name': 'dstack', 'path': 'system.dstack', 'leaf': 0, 'type': 0}
{'id': 31, 'pid': 28, 'name': 'aws', 'path': 'system.aws', 'leaf': 0, 'type': 0}
{'id': 18, 'pid': 17, 'name': '121ss1', 'path': 'ddssa.11.121ss1', 'leaf': 1, 'type': 0}
{'id': 19, 'pid': 17, 'name': '13', 'path': 'ddssa.11.13', 'leaf': 1, 'type': 0}
{'id': 22, 'pid': 17, 'name': 'tesee', 'path': 'ddssa.11.tesee', 'leaf': 1, 'type': 0}
{'id': 32, 'pid': 17, 'name': 'tese11e', 'path': 'ddssa.11.tese11e', 'leaf': 1, 'type': 0}
{'id': 17, 'pid': 16, 'name': '11', 'path': 'ddssa.11', 'leaf': 0, 'type': 0}
{'id': 2, 'pid': 1, 'name': 'a1', 'path': '1211.a1', 'leaf': 0, 'type': 0}
{'id': 3, 'pid': 1, 'name': 'a2', 'path': '1211.a2', 'leaf': 1, 'type': 0}
{'id': 1, 'pid': 0, 'name': '1211', 'path': '1211', 'leaf': 0, 'type': 0}
{'id': 16, 'pid': 0, 'name': 'ddssa', 'path': 'ddssa', 'leaf': 0, 'type': 0}
{'id': 28, 'pid': 0, 'name': 'system', 'path': 'system', 'leaf': 0, 'type': 0}
{'id': 33, 'pid': 0, 'name': 'coremap', 'path': 'coremap', 'leaf': 0, 'type': 0}
{'id': 38, 'pid': 0, 'name': 'cloud', 'path': 'cloud', 'leaf': 0, 'type': 0}
{'id': 51, 'pid': 0, 'name': 'ceshi001', 'path': 'ceshi001', 'leaf': 0, 'type': 0}
{'id': 63, 'pid': 0, 'name': 'imp', 'path': 'imp', 'leaf': 0, 'type': 0}
{'id': 64, 'pid': 0, 'name': 'test', 'path': 'test', 'leaf': 0, 'type': 0}
{'id': 73, 'pid': 0, 'name': 'cheshi001', 'path': 'cheshi001', 'leaf': 0, 'type': 0}
"""

4.  最后处理逻辑

### 从上往下将子节点往父级节点的children列表中追加
for tree in sort_tree_list:
for tree_s in tree_list:
if tree['pid'] == tree_s['id']:
if tree_s.get('children',''):
tree_s['children'].append(tree)
else:
tree_s['children'] = []
tree_s['children'].append(tree)
tree_list.remove(tree)

5. 结果

for s in tree_list:
print(s) """
{'id': 1, 'pid': 0, 'name': '1211', 'path': '1211', 'leaf': 0, 'type': 0, 'children': [{'id': 2, 'pid': 1, 'name': 'a1', 'path': '1211.a1', 'leaf': 0, 'type': 0}, {'id': 3, 'pid': 1, 'name': 'a2', 'path': '1211.a2', 'leaf': 1, 'type': 0}]}
{'id': 16, 'pid': 0, 'name': 'ddssa', 'path': 'ddssa', 'leaf': 0, 'type': 0, 'children': [{'id': 17, 'pid': 16, 'name': '11', 'path': 'ddssa.11', 'leaf': 0, 'type': 0, 'children': [{'id': 18, 'pid': 17, 'name': '121ss1', 'path': 'ddssa.11.121ss1', 'leaf': 1, 'type': 0}, {'id': 19, 'pid': 17, 'name': '13', 'path': 'ddssa.11.13', 'leaf': 1, 'type': 0}, {'id': 22, 'pid': 17, 'name': 'tesee', 'path': 'ddssa.11.tesee', 'leaf': 1, 'type': 0}, {'id': 32, 'pid': 17, 'name': 'tese11e', 'path': 'ddssa.11.tese11e', 'leaf': 1, 'type': 0}]}]}
{'id': 28, 'pid': 0, 'name': 'system', 'path': 'system', 'leaf': 0, 'type': 0, 'children': [{'id': 29, 'pid': 28, 'name': 'openstack', 'path': 'system.openstack', 'leaf': 0, 'type': 0}, {'id': 30, 'pid': 28, 'name': 'dstack', 'path': 'system.dstack', 'leaf': 0, 'type': 0}, {'id': 31, 'pid': 28, 'name': 'aws', 'path': 'system.aws', 'leaf': 0, 'type': 0}]}
{'id': 33, 'pid': 0, 'name': 'coremap', 'path': 'coremap', 'leaf': 0, 'type': 0, 'children': [{'id': 37, 'pid': 33, 'name': 'mysql', 'path': 'coremap.mysql', 'leaf': 0, 'type': 0, 'children': [{'id': 39, 'pid': 37, 'name': '3306', 'path': 'coremap.mysql.3306', 'leaf': 1, 'type': 0}]}, {'id': 40, 'pid': 33, 'name': 'redis', 'path': 'coremap.redis', 'leaf': 0, 'type': 0, 'children': [{'id': 41, 'pid': 40, 'name': '6379', 'path': 'coremap.redis.6379', 'leaf': 1, 'type': 0}]}]}
{'id': 38, 'pid': 0, 'name': 'cloud', 'path': 'cloud', 'leaf': 0, 'type': 0, 'children': [{'id': 42, 'pid': 38, 'name': 'dbs', 'path': 'cloud.dbs', 'leaf': 1, 'type': 0}]}
{'id': 51, 'pid': 0, 'name': 'ceshi001', 'path': 'ceshi001', 'leaf': 0, 'type': 0, 'children': [{'id': 61, 'pid': 51, 'name': '110', 'path': 'ceshi001.110', 'leaf': 0, 'type': 0, 'children': [{'id': 62, 'pid': 61, 'name': '62', 'path': 'ceshi001.110.62', 'leaf': 1, 'type': 0}]}, {'id': 80, 'pid': 51, 'name': 'nginx', 'path': 'ceshi001.nginx', 'leaf': 0, 'type': 0, 'children': [{'id': 81, 'pid': 80, 'name': 'lb', 'path': 'ceshi001.nginx.lb', 'leaf': 0, 'type': 0, 'children': [{'id': 82, 'pid': 81, 'name': '443', 'path': 'ceshi001.nginx.lb.443', 'leaf': 1, 'type': 0}]}]}]}
{'id': 63, 'pid': 0, 'name': 'imp', 'path': 'imp', 'leaf': 0, 'type': 0}
{'id': 64, 'pid': 0, 'name': 'test', 'path': 'test', 'leaf': 0, 'type': 0}
{'id': 73, 'pid': 0, 'name': 'cheshi001', 'path': 'cheshi001', 'leaf': 0, 'type': 0, 'children': [{'id': 74, 'pid': 73, 'name': 'aaa', 'path': 'cheshi001.aaa', 'leaf': 0, 'type': 0, 'children': [{'id': 76, 'pid': 74, 'name': 'bbb', 'path': 'cheshi001.aaa.bbb', 'leaf': 1, 'type': 0}]}, {'id': 77, 'pid': 73, 'name': 'ccc', 'path': 'cheshi001.ccc', 'leaf': 0, 'type': 0, 'children': [{'id': 79, 'pid': 77, 'name': 'eee', 'path': 'cheshi001.ccc.eee', 'leaf': 1, 'type': 0}]}]}
"""

6. 完整代码

tree_list = [{'id': 1, 'pid': 0, 'name': '', 'path': '', 'leaf': 0, 'type': 0},
{'id': 2, 'pid': 1, 'name': 'a1', 'path': '1211.a1', 'leaf': 0, 'type': 0},
{'id': 3, 'pid': 1, 'name': 'a2', 'path': '1211.a2', 'leaf': 1, 'type': 0},
{'id': 16, 'pid': 0, 'name': 'ddssa', 'path': 'ddssa', 'leaf': 0, 'type': 0},
{'id': 17, 'pid': 16, 'name': '', 'path': 'ddssa.11', 'leaf': 0, 'type': 0},
{'id': 18, 'pid': 17, 'name': '121ss1', 'path': 'ddssa.11.121ss1', 'leaf': 1, 'type': 0},
{'id': 19, 'pid': 17, 'name': '', 'path': 'ddssa.11.13', 'leaf': 1, 'type': 0},
{'id': 22, 'pid': 17, 'name': 'tesee', 'path': 'ddssa.11.tesee', 'leaf': 1, 'type': 0},
{'id': 28, 'pid': 0, 'name': 'system', 'path': 'system', 'leaf': 0, 'type': 0},
{'id': 29, 'pid': 28, 'name': 'openstack', 'path': 'system.openstack', 'leaf': 0, 'type': 0},
{'id': 30, 'pid': 28, 'name': 'dstack', 'path': 'system.dstack', 'leaf': 0, 'type': 0},
{'id': 31, 'pid': 28, 'name': 'aws', 'path': 'system.aws', 'leaf': 0, 'type': 0},
{'id': 32, 'pid': 17, 'name': 'tese11e', 'path': 'ddssa.11.tese11e', 'leaf': 1, 'type': 0},
{'id': 33, 'pid': 0, 'name': 'coremap', 'path': 'coremap', 'leaf': 0, 'type': 0},
{'id': 37, 'pid': 33, 'name': 'mysql', 'path': 'coremap.mysql', 'leaf': 0, 'type': 0},
{'id': 38, 'pid': 0, 'name': 'cloud', 'path': 'cloud', 'leaf': 0, 'type': 0},
{'id': 39, 'pid': 37, 'name': '', 'path': 'coremap.mysql.3306', 'leaf': 1, 'type': 0},
{'id': 40, 'pid': 33, 'name': 'redis', 'path': 'coremap.redis', 'leaf': 0, 'type': 0},
{'id': 41, 'pid': 40, 'name': '', 'path': 'coremap.redis.6379', 'leaf': 1, 'type': 0},
{'id': 42, 'pid': 38, 'name': 'dbs', 'path': 'cloud.dbs', 'leaf': 1, 'type': 0},
{'id': 51, 'pid': 0, 'name': 'ceshi001', 'path': 'ceshi001', 'leaf': 0, 'type': 0},
{'id': 61, 'pid': 51, 'name': '', 'path': 'ceshi001.110', 'leaf': 0, 'type': 0},
{'id': 62, 'pid': 61, 'name': '', 'path': 'ceshi001.110.62', 'leaf': 1, 'type': 0},
{'id': 63, 'pid': 0, 'name': 'imp', 'path': 'imp', 'leaf': 0, 'type': 0},
{'id': 64, 'pid': 0, 'name': 'test', 'path': 'test', 'leaf': 0, 'type': 0},
{'id': 73, 'pid': 0, 'name': 'cheshi001', 'path': 'cheshi001', 'leaf': 0, 'type': 0},
{'id': 74, 'pid': 73, 'name': 'aaa', 'path': 'cheshi001.aaa', 'leaf': 0, 'type': 0},
{'id': 76, 'pid': 74, 'name': 'bbb', 'path': 'cheshi001.aaa.bbb', 'leaf': 1, 'type': 0},
{'id': 77, 'pid': 73, 'name': 'ccc', 'path': 'cheshi001.ccc', 'leaf': 0, 'type': 0},
{'id': 79, 'pid': 77, 'name': 'eee', 'path': 'cheshi001.ccc.eee', 'leaf': 1, 'type': 0},
{'id': 80, 'pid': 51, 'name': 'nginx', 'path': 'ceshi001.nginx', 'leaf': 0, 'type': 0},
{'id': 81, 'pid': 80, 'name': 'lb', 'path': 'ceshi001.nginx.lb', 'leaf': 0, 'type': 0},
{'id': 82, 'pid': 81, 'name': '', 'path': 'ceshi001.nginx.lb.443', 'leaf': 1, 'type': 0}] ### 要实现的工能
# 1. pid表示是当前的数据的父级节点
# 2. 如果当前数据的pid和所有的服务树数据的id相等表示,该数据是pid对应数据的子节点加入到children列表中
# {'id': 33, 'pid': 0, 'name': 'coremap', 'path': 'coremap', 'leaf': 0, 'type': 0, 'children': [{'id': 37, 'pid': 33, 'name': 'mysql', 'path': 'coremap.mysql', 'leaf': 0, 'type': 0, 'children': [{'id': 39, 'pid': 37, 'name': '3306', 'path': 'coremap.mysql.3306', 'leaf': 1, 'type': 0}]}, {'id': 40, 'pid': 33, 'name': 'redis', 'path': 'coremap.redis', 'leaf': 0, 'type': 0, 'children': [{'id': 41, 'pid': 40, 'name': '6379', 'path': 'coremap.redis.6379', 'leaf': 1, 'type': 0}]}]} ### 实现思路
### 先以pid做倒叙降序排序
sort_tree_list = sorted(tree_list, key=lambda e: e.__getitem__('pid'),reverse = True) ### 从上往下将子节点往父级节点的children列表中追加
for tree in sort_tree_list:
for tree_s in tree_list:
if tree['pid'] == tree_s['id']:
if tree_s.get('children',''):
tree_s['children'].append(tree)
else:
tree_s['children'] = []
tree_s['children'].append(tree)
tree_list.remove(tree)

7. 前端实现效果

python 实现服务树结构化的更多相关文章

  1. Python服务Dokcer化并k8s部署实例

    这篇文章记录了我试验将一个基于python的服务docker化并k8s部署的过程. 服务介绍Docker化设计业务代码改造创建docker镜像K8S部署设计yaml文件运行服务介绍这是一个用 pyth ...

  2. Docker+Kubernetes(k8s)微服务容器化实践

    第1章 初识微服务微服务的入门,我们从传统的单体架构入手,看看在什么样的环境和需求下一步步走到微服务的,然后再具体了解一下什么才是微服务,让大家对微服务的概念有深入的理解.然后我们一起画一个微服务的架 ...

  3. Python Web 服务开发者: 第 1 部分

    Python Web 服务开发者: 第 1 部分 Python Web 服务世界 Python 的座右铭一向是“装备齐全”,这是指在安装该语言时会附带一大套标准库和功能程序.本文概述了在 Python ...

  4. 阿里云slb和ucloud负载均衡ulb添加ssl证书将http服务https化的配置详解

    阿里云和ucloud服务器配置ssl证书将http服务https化的配置详解 项目背景: 苹果App于2017年1月1日将启用App Transport Security安全功能,即强制App通过HT ...

  5. Python队列服务 Python RQ Functions from the __main__ module cannot be processed by workers.

    在使用Python队列服务 Python RQ 时候的报错: Functions from the __main__ module cannot be processed by workers. 原因 ...

  6. 戏说WSGI(Python Web服务网关接口)--[转载]

    戏说WSGI(Python Web服务网关接口) 当你在Python的世界中冒险,突然遭遇一只Web怪兽,你会选择什么武器对付它?在兵器谱上,下列兵器可谓名列前茅: Zope,厚重的长枪.较早出现的武 ...

  7. 写一个python的服务监控程序

    写一个python的服务监控程序 前言: Redhat下安装Python2.7 rhel6.4自带的是2.6, 发现有的机器是python2.4. 到python网站下载源代码,解压到Redhat上, ...

  8. Python之数据规整化:清理、转换、合并、重塑

    Python之数据规整化:清理.转换.合并.重塑 1. 合并数据集 pandas.merge可根据一个或者多个不同DataFrame中的行连接起来. pandas.concat可以沿着一条轴将多个对象 ...

  9. windows中实现python,redis服务自动重启(任务计划程序+bat脚本)

    需求:银行电脑无法自动开机,只能 通过 应用相关服务每天自动重启的方式实现 服务更新并且防止服务假死,内存过大 等情况 相关工具:win10系统中,使用windows自带的任务计划程序 和 bat脚本 ...

随机推荐

  1. MediaPlayer 播放视频的方法

    MediaPlayer mediaPlayer = new MediaPlayer(); mediaPlayer.reset();//重置为初始状态 mediaPlayer.setAudioStrea ...

  2. 基于Python使用scrapy-redis框架实现分布式爬虫

    1.首先介绍一下:scrapy-redis框架 scrapy-redis:一个三方的基于redis的分布式爬虫框架,配合scrapy使用,让爬虫具有了分布式爬取的功能.github地址: https: ...

  3. C# 打包安装部署 属性中找不到 查找目标或打开文件位置

    用第三方工具OrcaMis (一个可以修改msi文件的工具)来实现的 最后我又试了几次,以为是再程序打包的时候设置有问题,结果都没有找到原因,没有办法只有需求网络资源,网络上有朋友说VS创建的快捷方式 ...

  4. selenium 常见事件操作

    1.文本框输入内容 from selenium import webdriverdriver = webdriver.Chrome(r"C:\Users\Administrator\Desk ...

  5. centos7操作

    一.安装系统 1.下载(Minimal ISO)http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1 ...

  6. 在java开发环境中,快捷键的使用及用法

    (1)Ctrl+M切换窗口的大小 (2)Ctrl+Q跳到最后一次的编辑处 (3)F2当鼠标放在一个标记处出现Tooltip时候按F2则把鼠标移开时Tooltip还会显示即Show Tooltip De ...

  7. 【Flink】flink执行jar报错:java.io.IOException: Error opening the Input Split file 或者 java.io.FileNotFoundException

    报错内容 flink执行jar时,报如下错误: org.apache.flink.client.program.ProgramInvocationException: Job failed. (Job ...

  8. Chrome浏览器界面截图

    常常出现这么一个场景: 网页比较长,需要滚动屏幕才能看完整.这时候如需截屏,则比较麻烦. 如下为解决方法: 推荐Chrome浏览器: 按F12打开调试页面,同时按下ctrl + shift + p, ...

  9. ZOJ Problem Set - 1007

    1.参考这个吧,一道数学公式题,还没看懂...好像需要把公式变形出来,先略过. http://dengbaoleng.iteye.com/blog/1504940

  10. idea的spring整合基于xml文件配置的mybatis报Invalid bound statement (not found): com.music.dao.MusicDao.findAll的问题

    一. 题主当时就是自己尝试整合spring和mybatis的时候遇到了这个问题,当时题主只看到了用注解的方式配置的dao层,题主用的是xml文件配置的形式, 而且坑爹的是题主的两个文件的路径写的也不一 ...