摘要: 题目描述 找出对象 obj 不在原型链上的属性(注意这题测试例子的冒号后面也有一个空格~)1、返回数组,格式为 key: value2、结果数组不要求顺序 输入例子: var C = function() {this.foo = 'bar'; this.baz = 'bim';}; C.protot 阅读全文
posted @ 2017-05-05 10:24 123默小白 阅读(213) 评论(0) 推荐(0) 编辑
摘要: var x, y,areaWidth,areaHeight; var down;//闪光的判断标准,很好 addEvent(canvas,'mousedown',function(e){ // console.log(e.offsetX + ' '+e.offsetY) down = true; x = e.offsetX; ... 阅读全文
posted @ 2017-04-27 23:00 123默小白 阅读(435) 评论(0) 推荐(0) 编辑
摘要: File读取和FileReader() HTML canvas clip() 方法 从画布中剪切 200*120 像素的矩形区域。然后,绘制一个红色矩形。只有被剪切区域内的红色矩形部分是可见的: 实现代码如下: clip()这个函数在使用的时候出现问题: 注释掉context.save()和cont 阅读全文
posted @ 2017-04-25 22:09 123默小白 阅读(1518) 评论(0) 推荐(0) 编辑
摘要: 一、圆的坐标表达式 for(var i = 0;i < len;i++){ degree = (2*(k+1)-1)/len - 1;a = Math.acos(degree);//这样取得弧度数生成的点在球体上式均匀分布的b = a*Math.sqrt(len*Math.PI); x = radi 阅读全文
posted @ 2017-04-18 22:01 123默小白 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 总之很悲催也很浪费时间,这款软件很喜欢,不想卸载 图片中的style.css使得style.css一直是文本形式 将style.css删除就恢复正常了,这个错误弄了半天才搞定,心累。 阅读全文
posted @ 2017-04-12 19:12 123默小白 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexi 阅读全文
posted @ 2017-04-07 22:50 123默小白 阅读(190) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr 阅读全文
posted @ 2017-04-06 22:47 123默小白 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear twi 阅读全文
posted @ 2017-04-06 21:46 123默小白 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 一、效果如下 https://momoxiaobai.github.io/xiaolu/3Dcirculatrion/index.html(demo地址) 二、代码如下 我的方法比较笨,总是用最直接的方法,看大神的代码,恍然大悟,自己太笨了,可以让容器转,照片不转,代码就很少,但是怎么着也是自己辛苦 阅读全文
posted @ 2017-04-06 15:58 123默小白 阅读(1018) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] 阅读全文
posted @ 2017-03-30 15:08 123默小白 阅读(122) 评论(0) 推荐(0) 编辑