class Rectangle: '这是一个矩形类' def __init__(self,length,width): if isinstance(length,(int,float)) and isinstance(width,(int,float)): self.length = length ... ...
分类:
编程语言 时间:
2017-07-01 09:54:26
阅读次数:
125
在drawable文件夹中创建一个shape的资源文件,其中shape有四个属性(rectangle、oval、line、ring) 这四个属性是用来定义图形的形状对应(矩形、椭圆、线、圆环) 除了ring属性外,别的三个属性直接定义就可以得到对应的图形。但使用ring属性,需要定义一些属性参数,才 ...
分类:
其他好文 时间:
2017-06-26 20:03:27
阅读次数:
198
Maximal Square Total Accepted: 1312 Total Submissions: 6388 Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1 ...
分类:
其他好文 时间:
2017-06-26 19:08:38
阅读次数:
142
Billboard Time Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 14337 Accepted Submission(s): 6148 Pr ...
分类:
其他好文 时间:
2017-06-24 20:57:14
阅读次数:
240
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the hist ...
分类:
其他好文 时间:
2017-06-23 23:48:06
阅读次数:
223
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area. PS:将其化解为柱状图求最大体积的问题。先用动态规划的思路,将矩 ...
分类:
其他好文 时间:
2017-06-23 23:44:45
阅读次数:
160
绘制点和圆 img:图像。 center:圆心坐标。 radius:圆形的半径。 color:线条的颜色。 thickness:如果是正数,表示组成圆的线条的粗细程度。否则,表示圆是否被填充。 line_type:线条的类型。见 cvLine 的描述 shift:圆心坐标点和半径值的小数点位数。 画 ...
分类:
其他好文 时间:
2017-06-21 18:23:16
阅读次数:
216
转载请注明出处!!!http://blog.csdn.net/zhonghuan1992 目标跟踪--CamShift CamShift全称是ContinuouslyAdaptive Mean Shift,即连续自适应的MeanShift算法。而MeanShift算法,首先得对MeanShift算法 ...
分类:
其他好文 时间:
2017-06-21 09:36:57
阅读次数:
215
昨天看岛娘直播解题,看到很经典的一题Largest Rectangle in Histogram 题目地址:https://leetcode.com/problems/largest-rectangle-in-histogram/#/description 解法: 从左向右扫描矩形柱,当右边高于左边 ...
分类:
其他好文 时间:
2017-06-20 18:12:00
阅读次数:
137
题目大意:给定H,W,h,w四个数,求是否满足矩阵的全部数之和和正数,h行w列之和为负数 如果h和w恰好是H,W的约数,则肯定不存在 否则肯定存在 只需要把h,w内每个元素填的足够大,然后小矩形的最后一个元素为负,且保持整个小矩形为负即可(可用不等式证明) ...
分类:
其他好文 时间:
2017-06-19 20:55:18
阅读次数:
145