2016年10月15日
摘要: There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle every 阅读全文
posted @ 2016-10-15 19:26 lazybone 阅读(100) 评论(0) 推荐(0) 编辑
  2016年10月13日
摘要: Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum pro 阅读全文
posted @ 2016-10-13 17:32 lazybone 阅读(126) 评论(0) 推荐(0) 编辑
  2016年4月7日
摘要: Paint Fence There is a fence with n posts, each post can be painted with one of the k colors.You have to paint all the posts such that no more than tw 阅读全文
posted @ 2016-04-07 13:15 lazybone 阅读(195) 评论(0) 推荐(0) 编辑
  2015年12月8日
摘要: 按照我的理解前端开发的框架可以分为三种类型:UI框架:这部分如bootstrap,定义了一套css样式风格,帮助布局,提供了若干可以直接使用的组件,我们可以只使用它提供的组件而不用自己设计 UI工具类框架:如jquery(pc端)/jquery mobile(移动端),虽然准确来说它们更是类库,... 阅读全文
posted @ 2015-12-08 22:46 lazybone 阅读(1298) 评论(0) 推荐(0) 编辑
  2015年11月2日
摘要: 1.splice与slice方法区别splice(start,howmany,element1,...elementx)数组从 start下标开始,删除deleteCount 个元素,并且可以在这个位置开始添加 n个元素当start值为负数时,会将数值替换为字符串/数组长度加上该负数,如-1,则为第... 阅读全文
posted @ 2015-11-02 23:43 lazybone 阅读(218) 评论(0) 推荐(0) 编辑
  2015年5月11日
摘要: 1.var box = new Object();2 var box = Object(); //可以省略关键字newbox.name="xiaoming"; box.age="12";3 var box = {}; //字面量方式创建对象4var box = { //字面量对象封装数据 name:... 阅读全文
posted @ 2015-05-11 17:17 lazybone 阅读(137) 评论(0) 推荐(0) 编辑
  2015年5月2日
摘要: 您的浏览器不支持canvas,请更换浏览器后尝试这行代码里的500,800是画布的实际大小使用或者通过jquerywidth(),height()设置的数值都是在页面里显示的宽高总之就是如果你写的是但是实际界面宽高是x2,y2他就会先按照宽高x,y生成x*y大小的图案,然后按照比例x2:y2画到ca... 阅读全文
posted @ 2015-05-02 00:55 lazybone 阅读(681) 评论(0) 推荐(0) 编辑
  2015年4月26日
摘要: html代码 这是父元素 这是子元素 line-height行高问题 之后效果在这里,子元素继承的是计算之后的px值,经测试,em与百分比效果相同,然而将line-height:150%改为line-height:1.5,效果如下这里将继承1.5这个值,然后根据子元素的font-size动态计... 阅读全文
posted @ 2015-04-26 23:47 lazybone 阅读(473) 评论(0) 推荐(0) 编辑
  2015年4月9日
摘要: “37”+7 //377“37”-7 //30巧用+/-规则变字符串x+''变数字x-0js里面的==是不严格等于“123” == 1230 == falsenul l== undefinednew Object() == new Object()[1,2]==[1,2]但是[1,2]===[1,2... 阅读全文
posted @ 2015-04-09 22:44 lazybone 阅读(162) 评论(0) 推荐(0) 编辑
  2015年4月8日
摘要: 首先,html属性中有两个方法,一个有参,一个无参 1. 无参html():取得第一个匹配元素的html内容。这个函数不能用于XML文档。但可以用于XHTML文档,返回的是一个String 例子: html页面代码:Hello jquery代码:$("div").html(); 结果:Hello 2... 阅读全文
posted @ 2015-04-08 01:28 lazybone 阅读(226) 评论(0) 推荐(0) 编辑