1.判断是否有汉字
varmsg=/[^/x00-/xff]/g.test(str)?"有汉字":"无汉字"
2.screen对象的属性解释
screen.availHeight(availWidth)获取系统屏幕的工作区域高度(宽度),排除Microsoft;Windows任务栏。
screen.height(width)获取屏幕的垂直(水平)分辨率
screen.updateInterva..
分类:
Web程序 时间:
2014-12-07 06:39:55
阅读次数:
324
在Android开发中,需要用到PopupWindow这个类。在初始化完成,显示之前,都需要获得这个对象的width,height去计算popupWindow弹出的位置。这个时候会发现取得的width和height都是-2;使用popupWindow.getContentView().getMe.....
分类:
移动开发 时间:
2014-12-06 22:53:18
阅读次数:
616
CSS技巧1.div的垂直居中问题vertical-align:middle; 将行距增加到和整个DIV一样高 line-height:200px; 然后插入文字,就垂直居中了。缺点是要控制内容不要换行2. margin加倍的问题设置为float的div在ie下设置的margin会加倍。这是一个ie...
分类:
Web程序 时间:
2014-12-06 22:42:12
阅读次数:
417
#"bootstrap iframe height 100%"The iframe, and any of it's containers must be 100% height..body,html,.main-display-area,.col-md-7 { height:100%;}htt.....
分类:
Web程序 时间:
2014-12-06 21:27:33
阅读次数:
154
batchUpload.html
批量上传
.tableStyle {
border: 1px solid blue;
padding: 1px;
height: 45px;
vertical-align: middle;
}
.tableStyle .tdStyle { /* 派生选择器+类选择器 */
border: 1px solid gr...
分类:
Web程序 时间:
2014-12-06 19:32:43
阅读次数:
194
Largest Rectangle in HistogramGivennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of l...
分类:
其他好文 时间:
2014-12-06 16:39:46
阅读次数:
139
AreaLight方法根据设置灯光的颜属性color, 强度属性intensity 创建平面光(面光,区域光).AreaLight对象的功能函数采用
定义构造的函数原型对象来实现,区域光和其他光源不同,是一种二维面积光源,他的亮度不仅和强度有关,而且还和他的面积大小有关.
通过变换灯光的width,height,normal属性,区域光可以模拟窗户射入光线. TODO: AreaLight类型灯光在这个版本内还没有实现阴影.???
Example:
var light = new THREE...
分类:
Web程序 时间:
2014-12-06 15:27:39
阅读次数:
212
1.width=device-width //应用程序的宽度和屏幕的宽度是一样的2.height=device-height //应用程序的高度和屏幕的高是一样的3.initial-scale=1.0 //应用程序启动时候的缩放尺度(1.0表示不缩放)4.minimum-scale=1.0 //用户...
分类:
移动开发 时间:
2014-12-06 13:59:57
阅读次数:
244
1,@Html.TextBox("txt","hello",new{style="width:1000px;height:1000px;"})生成标签:<inputid="txt"name="txt"style="width:1000px;height:1000px;"type="text"value="hello"/>2,特殊属性(class:c#保留关键字)@Html.TextBox("txt","hello",new{style="width:1000p..
分类:
Web程序 时间:
2014-12-05 19:34:44
阅读次数:
283
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.
深搜+递归
/**
* Definition for binary tree
* public class TreeNode {
* int val;
* Tree...
分类:
其他好文 时间:
2014-12-05 17:34:59
阅读次数:
169