public class HeightDemo { /** * 题目:一球从100米高度自由落下,每次落地后反跳回原高度的一半: * 再落下,求它在第10次落地时,共经过多少米?第10次反弹多高? */ public static void main(String[] args) { double h = 100; double total = 0; for (int i = 0; i < 10; i++) { if (i == 0) { total = total + h; } else {…
问题:IE8/9不支持Array.indexOf 解决方案 if (!Array.prototype.indexOf) { Array.prototype.indexOf = function(elt /*, from*/) { var len = this.length >>> 0; var from = Number(arguments[1]) || 0; from = (from < 0) ? Math.ceil(from) : Math.floor(from); if (f…
前言 一直听说line-height是指两行文本的基线间的距离,然后又说行高等于行距,最近还听说有个叫行间距的家伙,@张鑫旭还说line-height和vertical-align基情四射,贵圈真乱啊......于是通过本篇来一探究竟:) line-height到底有多height? 行距.行间距傻傻分不清 首先看看"有道词典"的解析! Leading = Line Space + Font Size(即是 行距 = 行间距 + 字体大小) Leading: 指相邻文本行间上一个文本…
2015-07-28 17:23:20 本篇是关于LayoutParams相关 ViewGroup.LayoutParams文档解释如下: LayoutParams are used by views to tell their parents how they want to be laid out. See ViewGroup Layout Attributes for a list of all child view attributes that this class supports.…
九. 集合映射 1. Set 2. List a) @OrderBy 注意:List与Set注解是一样的,就是把Set更改为List就可以了 private List<User>users = new ArrayList<User>(); @OneToMany(mappedBy="group", cascade={CascadeType.ALL} ) @OrderBy("name ASC")//使用@OrderBy注…
html5 laboratory - drawing in the canvas Creating a bar chart with canvas 21st February 2010 The experiment The new <canvas> element is one of the new goodies that comes along with HTML5. The <canvas> element allows you to programmatically dra…
剪切具有CornerRadius的RectangleGeometry(可能在Ripple中用到) 1.新建Converter public class BorderClipConverter : IMultiValueConverter { public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { && values[] ] ] is CornerRadi…
2.创建一个stu表,字段有:自增主键id,不为空姓名,默认值性别(枚举类型),无限制身高 create table stu( id int primary key auto_increment, name char not null, gender enum('男','女') default '男', height float ); 3.为stu表依次插入以下三条数据 i)插入一条包含id,name,gender,height四个信息的数据 insert into stu values('…