上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 106 下一页
摘要: 1.介绍 它是进程或线程同步、互斥时遇到的问题,通过堆信号量进行PV操作来实现。 2.过程 消费者不能消费空的缓冲区,生产者不能向满的缓冲区产生数据。 那么在运行生产者代码的时候先P一下empty判断是否是满的,并且对缓冲区的访问也是互斥的,有一个互斥量;生产完之后就V一下通知缓冲区有内容。 消费者 阅读全文
posted @ 2021-02-01 22:13 lypbendlf 阅读(107) 评论(0) 推荐(0)
摘要: 1.添加元素的方式 queue<pair<int,int>> q; q.push({1,2}); q.push(make_pair(1,2)); q.emplace(1,2); 上面三种方法是ok的,emplace会直接构造,而push需要显式地调用一下。 q.push((1,2));//error 阅读全文
posted @ 2021-02-01 15:29 lypbendlf 阅读(2329) 评论(0) 推荐(1)
摘要: 转自:https://zhuanlan.zhihu.com/p/40338107 1.介绍 迪杰斯特拉(Dijkstra)算法是典型最短路径算法,用于计算一个节点到其他节点的最短路径。它的主要特点是以起始点为中心向外层层扩展(广度优先搜索思想),直到扩展到终点为止。 但它不能处理负权路径,如果先找到 阅读全文
posted @ 2021-02-01 14:15 lypbendlf 阅读(119) 评论(0) 推荐(0)
摘要: 转自:https://blog.csdn.net/hzhsan/article/details/44100215 https://www.cnblogs.com/milantgh/p/4075912.html https://blog.csdn.net/gatieme/article/details 阅读全文
posted @ 2021-02-01 13:11 lypbendlf 阅读(1741) 评论(0) 推荐(0)
摘要: 转自:https://blog.csdn.net/astx1596321/article/details/81188422 https://blog.csdn.net/u010585135/article/details/44515843 1.作业与进程 作业是用户提交给系统的一个任务,在用户向计算 阅读全文
posted @ 2021-01-30 23:09 lypbendlf 阅读(3540) 评论(0) 推荐(0)
摘要: 转自:https://blog.csdn.net/jared_zhu/article/details/51707468 https://www.cnblogs.com/lidp/archive/2009/04/05/1698070.html 1.直写 是SRAM也就是cache缓存写入主存的两种策略 阅读全文
posted @ 2021-01-29 21:36 lypbendlf 阅读(1370) 评论(0) 推荐(1)
摘要: 转自:https://blog.csdn.net/u013315650/article/details/56347793 知乎 https://www.zhihu.com/question/25142664/answer/154497286 1.时间局部性和空间局部性 在CPU访问寄存器时,无论是存 阅读全文
posted @ 2021-01-29 21:17 lypbendlf 阅读(371) 评论(0) 推荐(0)
摘要: 1.sc.pp.normalize_per_cell() https://scanpy.readthedocs.io/en/stable/api/scanpy.pp.normalize_per_cell.html Normalize each cell by total counts over al 阅读全文
posted @ 2021-01-29 14:09 lypbendlf 阅读(786) 评论(0) 推荐(0)
摘要: 1.定义+compile self.model = Model(inputs=[self.input_layer, self.sf_layer], outputs=output) #或 model = Sequential([ Dense(32, input_shape=(784,)), Activ 阅读全文
posted @ 2021-01-29 13:46 lypbendlf 阅读(147) 评论(0) 推荐(0)
摘要: 1.724. 寻找数组的中心索引,前缀和边计算边遍历,无需真的申请一个向量来保存。 2.1109. 航班预订统计,差分数组,【单点更新,范围查询,就用线段树。范围更新,单独查询,就用差分数组】更新一个范围,但单点查询每个的值,就用差分数组,diff[i]=res[i]-res[i-1],那么由差分数 阅读全文
posted @ 2021-01-28 19:36 lypbendlf 阅读(768) 评论(0) 推荐(1)
上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 106 下一页