写在前面 仅供自用 ... Iterable 接口 在我的理解里面,如果数据结构实现了 Iterable 接口 那么 这个数据结构就是可迭代对象 当然实现这个的方法 就是 写一个迭代器工厂函数 [Symbol.iterator] 来生成一个含有 next(){} 和 return(){} 两个属性方 ...
分类:
编程语言 时间:
2021-03-06 14:36:01
阅读次数:
0
from __future__ import print_function import numpy as np import cv2 as cv def main(): def decode_fourcc(v): v = int(v) return "".join([chr((v >> 8 * i ...
分类:
其他好文 时间:
2021-03-06 14:32:36
阅读次数:
0
python中允许在函数内定义另一个函数,这种函数称为内嵌函数或者内部函数。 1、 >>> def a(): ## 外层函数 print("hello world!") def b(): ## 内层函数 print("xxxxxxx!") return b() >>> a() hello world ...
分类:
编程语言 时间:
2021-03-06 14:22:06
阅读次数:
0
1 def list_of_groups(init_list, childern_list_len): 2 ''' 3 :param init_list: 4 :param childern_list_len: 5 :return: 6 ''' 7 list_of_group = zip(*(ite ...
分类:
编程语言 时间:
2021-03-05 13:23:08
阅读次数:
0
我发现平面图转对偶图经常和最小割在一起。 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long int ll; 4 typedef long double ld; 5 typedef pair<int,int> pi ...
分类:
其他好文 时间:
2021-03-05 13:00:48
阅读次数:
0
题目描述 判断给定的链表中是否有环。如果有环则返回true,否则返回false。 你能给出空间复杂度的解法么? public class Solution { public boolean hasCycle(ListNode head) { /* 链表有环思路:如果有环,设置一个快指针,设置一个慢指 ...
分类:
其他好文 时间:
2021-03-05 13:00:21
阅读次数:
0
(1)同步标记任务失败 //标记失败任务 module.exports = grunt => { grunt.registerTask('bad',()=>{ console.log('bad working~'); return false; }); grunt.registerTask('foo ...
分类:
其他好文 时间:
2021-03-04 13:12:25
阅读次数:
0
GNU C提供了大量内建函数,其中大部分是标准C库函数的GNU C编译器内建版本,例如memcpy()等,它们与对应的C库函数功能相同。 不属于库函数的其它内建函数的命名通常以__builtin开始,如下所示: 内建函数__builtin_return_address(LEVEL)返回当前函数或其调 ...
分类:
系统相关 时间:
2021-03-04 12:54:42
阅读次数:
0
Given an array of integers nums and an integer target. Return the number of non-empty subsequences of nums such that the sum of the minimum and maximu ...
分类:
其他好文 时间:
2021-03-03 12:23:05
阅读次数:
0
地址 https://leetcode-cn.com/problems/route-between-nodes-lcci/ 节点间通路。给定有向图,设计一个算法,找出两个节点之间是否存在一条路径。 示例1: 输入:n = 3, graph = [[0, 1], [0, 2], [1, 2], [1, ...
分类:
其他好文 时间:
2021-03-03 12:10:18
阅读次数:
0