class Solution { public int maximalRectangle(char[][] matrix) { if(matrix.length==0||matrix[0].length==0) return 0; int[] heights=new int[matrix[0].le... ...
分类:
其他好文 时间:
2017-09-28 10:02:40
阅读次数:
121
class Solution { public int largestRectangleArea(int[] heights) { Stack stack=new Stack(); int maxArea=0; for(int i=0;i<=heights.length;i++) { int h=i... ...
分类:
其他好文 时间:
2017-09-28 09:50:47
阅读次数:
155
Cesium 相机控制场景中的视野。操作相机的方法有很多,如旋转,缩放,平移和飞到目的地。Cesium具有默认的鼠标和触摸事件处理程序与相机进行交互,还有一个API以编程方式操纵相机。 我们可以使用该setView功能设置相机的位置和方向。目的地可以是一个实例Cartesian3或Rectangle ...
分类:
Web程序 时间:
2017-09-27 20:47:32
阅读次数:
287
题意: 给定一个坐标系, 给出n个矩形的左下角坐标(bx,by)和右上角坐标(tx,ty) , 求矩形覆盖的面积, 有些区域会被多个矩形覆盖, 但只用算一次。 n <= 1000, 0 <= bx,by,tx,ty <= 1e6 分析: 如果这题坐标范围很小的话, 其实可以直接开二维数组填充就好。 ...
分类:
移动开发 时间:
2017-09-27 19:10:26
阅读次数:
221
Description Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 <= N <= 10 ...
分类:
其他好文 时间:
2017-09-25 13:20:46
阅读次数:
158
一、Dispatcher介绍 微软在WPF引入了Dispatcher,那么这个Dispatcher的主要作用是什么呢? 不管是WinForm应用程序还是WPF应用程序,实际上都是一个进程,一个进程可以包含多个线程,其中有一个是主线程,其余的是子线程。在WPF或WinForm应用程序中,主线程负责接收 ...
class Main extends egret.DisplayObjectContainer { /** * 入口文件, 最先执行的构造方法 * 这会实例化一个和手机屏幕一样大的舞台 */ public constructor() { super(); this.once( egret.Event... ...
分类:
移动开发 时间:
2017-09-21 18:05:58
阅读次数:
215
1. 立即执行函数 立即执行函数,即Immediately Invoked Function Expression (IIFE),正如它的名字,就是创建函数的同时立即执行。它没有绑定任何事件,也无需等待任何异步操作: function(){…}是一个匿名函数,包围它的一对括号将其转换为一个表达式,紧 ...
分类:
编程语言 时间:
2017-09-18 19:40:39
阅读次数:
207
Note: For square, the minimum size of topleft and top and left decides the square of the result. ...
分类:
其他好文 时间:
2017-09-18 14:44:37
阅读次数:
156
import com.sun.awt.AWTUtilities;import java.awt.Image;import java.awt.MediaTracker;import java.awt.Point;import java.awt.Rectangle;import java.awt.Sha ...
分类:
编程语言 时间:
2017-09-16 16:05:15
阅读次数:
254