背景 周末时开车走高速,导航经常提示前方n公里行驶缓慢,预计通行时间m分钟。听到这个真是烦,限速120的路,大家都在那里一点一点挪。 开车时就是“前进-变道-前进”,结果经常是变到哪个道,哪个道就变的很慢。 行车策略 在没有堵的时候,我觉得应该遵循“贪心算法”,前方哪条道空余距离长,就走哪条道。 堵 ...
分类:
其他好文 时间:
2019-08-20 22:17:00
阅读次数:
117
一、集合set的定义初始化 约定set翻译为集合,collection翻译为集合类型,是一个大概念;集合是可变的,无序的,不重复元素的集合 set() 定义一个空集合 set(iterable) 定义一个有元素的集合 set的元素要求必须可以hash,目前学过的不可hash的类型有list,set ...
分类:
编程语言 时间:
2019-08-19 21:24:59
阅读次数:
86
原文: http://blog.gqylpy.com/gqy/229 " 一、锁机制: multiprocess.Lock 上篇博客中,我们千方百计实现了程序的异步,让多个任务同时在几个进程中并发处理,但它们之间的运行没有顺序。尽管并发编程让我们能更加充分的利用io资源,但是也 ...
分类:
编程语言 时间:
2019-08-19 10:03:27
阅读次数:
134
N-COUNT 救护车An ambulance is a vehicle for taking people to and from hospital. very seriously 严重地 Their daughter was severely injured in a car accident. ...
分类:
其他好文 时间:
2019-08-18 11:30:09
阅读次数:
63
/** * Description: <MoveCarCustomThread><br> * Author: mxdl<br> * Date: 2019/7/10<br> * Version: V1.0.0<br> * Update: <br> */public class MoveCarSmoot ...
分类:
Windows程序 时间:
2019-08-17 20:06:01
阅读次数:
1762
当 display: flex 配合 justify-content: center 使用时可以让view水平居中 而配合 align-items: center 用时可以实现垂直居中效果 .card-image-container{ width: 40%; height: 90%; align-i ...
分类:
微信 时间:
2019-08-16 10:31:16
阅读次数:
2190
json.loads(json) 作用:把json格式的字符串转为Python数据类型 示例:html_json = json.loads(res.text) json.dumps(python) 作用:把 python 类型 转为 json 类型 示例: json.load(f) 作用:将json ...
分类:
Web程序 时间:
2019-08-15 21:14:54
阅读次数:
140
C++ Traits是什么? Think of a trait as a small object whose main purpose is to carry information used by another object or algorithm to determine "policy" ...
分类:
编程语言 时间:
2019-08-15 12:57:33
阅读次数:
103