其实这里已经说的很明白,通俗点说就是在canvas中定义width、height跟在style中定义width和height是不同的,canvas标签的width和height是画布实际宽度和高度,绘制的图形都是在这个上面。而style的width和height是canvas在浏览器中被渲染的高度和...
分类:
其他好文 时间:
2014-12-22 12:50:21
阅读次数:
173
一.获取屏幕宽高:
(1). WindowManager wm = (WindowManager)getSystemService(Context.WINDOW_SERVICE);
int width = wm.getDefaultDisplay().getWidth();
int height = wm.getDefaultDisplay().getHeight();
(2)....
分类:
移动开发 时间:
2014-12-22 11:16:02
阅读次数:
200
Ext.create('Ext.tree.Panel', { title: 'Simple Tree', width: 200, height: 150, store: store, rootVisible: false, //是否显示根节点 lines:fals...
分类:
Web程序 时间:
2014-12-21 21:53:34
阅读次数:
212
1、确认类名 2、类的属性 3、功能行为例子:类名:person 属性:height 行为:fight例子:坦克发射3颗炮弹打中2架飞机 类:坦克、炮弹、飞机把相同属性的对象抽象成一个类。
分类:
其他好文 时间:
2014-12-21 12:35:44
阅读次数:
161
常用css样式中属性的书写顺序一、position display float二、盒子模型的属性 width , height , border , margin , padding三、文字等相关属性 color, font, line-height, text-align, vertical-.....
分类:
Web程序 时间:
2014-12-20 19:32:08
阅读次数:
227
RatingBar评分条系统UI控件main.xml文件写:<RatingBarandroid:id="@+id/ratingbar"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginLeft="10dip"android:isIndicator="true"android:numStars="5"android:rating="5"></..
分类:
移动开发 时间:
2014-12-20 18:23:01
阅读次数:
221
...又是TLE,对于单组数据肯定TLE不了,问题是多组的时候就呵呵了...按height分组去搞,然后判一下是否不属于同一个串...const maxn=100419;var x,y,rank,sa,c,col,h,rec:array[0..maxn] of longint; pd:array[0...
分类:
其他好文 时间:
2014-12-20 15:33:45
阅读次数:
173
最长公共子串...两个字符串连在一起,中间放一个特殊字符隔开。求出height之后,枚举height,看两个后缀是不是分布于两段字符串..如果是,这个值就可以作为答案。取最大值即可。 1 const maxn=200419; 2 var 3 c,h,rank,sa,x,y:array[0.....
分类:
其他好文 时间:
2014-12-19 18:45:03
阅读次数:
188
htmlcss.select_box{ float: left;}.select_box input{ width: 160px; height: 30px; text-align: center; font-size: 18px; color: #444;}.select_ul{ f...
分类:
Web程序 时间:
2014-12-19 15:36:28
阅读次数:
126
思路:如果时间复杂度要求是O(n 2 )的话,解法比较多也比较好理解。比如可以遍历,对于当前 i 位置上的立柱,计算出以这个i 立柱结尾的最大矩形,然后求出总的最大矩形。
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, f...
分类:
编程语言 时间:
2014-12-18 22:18:58
阅读次数:
219