随笔分类 -  JavaScript

1 2 3 下一页

分片上传
摘要:test 阅读全文

posted @ 2018-09-16 02:29 carlyin 阅读(183) 评论(0) 推荐(0)

网易app滚动页面图片不动
摘要:向下滚动页面,首页有个方框图片显示上方内容,给人感觉是一个长图作为背景,中间是个透明方框,创意不错 阅读全文

posted @ 2018-06-06 17:13 carlyin 阅读(131) 评论(0) 推荐(0)

质数
摘要: 阅读全文

posted @ 2018-05-15 15:33 carlyin 阅读(90) 评论(0) 推荐(0)

input files 图片==>base64 ==>blob
只有注册用户登录后才能阅读该文。

posted @ 2018-05-15 14:47 carlyin

Math.random红包
摘要:10元红包,分给5个人: 最小单位是0.01元 随机 将10元分成10×100分(最小的单位)共1000份 然后分配5个盒子(5人分) 每一份都随机往5个盒子里添加(共1000份) 此方法证明Math.random在多次以后区域平均,不适合多次分配 阅读全文

posted @ 2017-10-27 13:56 carlyin 阅读(204) 评论(0) 推荐(0)

华为2016校招:字符集合
摘要:题目描述 输入一个字符串,求出该字符串包含的字符集合 输入描述: 每组数据输入一个字符串,字符串最大长度为100,且只包含字母,不可能为空串,区分大小写。 输出描述: 每组数据一行,按字符串原有的字符顺序,输出字符集合,即重复出现并靠后的字母不输出。 输入例子: abcqweracb 输出例子: a 阅读全文

posted @ 2017-05-08 15:36 carlyin 阅读(178) 评论(0) 推荐(0)

2016京东招聘笔试:抛小球
摘要:题目描述 小东和三个朋友一起在楼上抛小球,他们站在楼房的不同层,假设小东站的楼层距离地面N米,球从他手里自由落下,每次落地后反跳回上次下落高度的一半,并以此类推知道全部落到地面不跳,求4个小球一共经过了多少米?(数字都为整数)给定四个整数A,B,C,D,请返回所求结果。 测试样例: 100,90,8 阅读全文

posted @ 2017-05-08 15:20 carlyin 阅读(125) 评论(0) 推荐(0)

canvas 水波
摘要:水波背景 阅读全文

posted @ 2017-04-27 15:31 carlyin 阅读(105) 评论(0) 推荐(0)

sort.js
摘要:function CArray(numElements) { this.dataStore = []; this.pos = 0; this.numElements = numElements; this.insert = insert; this.toString = toString; this.clear = clear; this.setData = setData; t... 阅读全文

posted @ 2017-04-17 14:00 carlyin 阅读(103) 评论(0) 推荐(0)

binaryTree.js
摘要:function Node(data, left, right) { this.data = data; this.left = left; this.right = right; this.show = show; } function show() { return this.data; } function BST() { this.root = null; this.i... 阅读全文

posted @ 2017-04-01 10:23 carlyin 阅读(114) 评论(0) 推荐(0)

set.js
摘要:function Set() { this.dataStore = []; this.add = add; this.remove = remove; this.size = size; this.union = union; this.intersect = intersect; this.subset = subset; this.difference = differenc... 阅读全文

posted @ 2017-04-01 10:21 carlyin 阅读(113) 评论(0) 推荐(0)

Stack.js
摘要:function Stack() { this.dataStore = []; this.top = 0; this.push = push; this.pop = pop; this.clear = clear; this.peek = peek; this.length = length; } function push(element) { this.dataStore[... 阅读全文

posted @ 2017-04-01 10:20 carlyin 阅读(114) 评论(0) 推荐(0)

Queue.js
摘要:var fs=require('fs'); function Queue() { this.dataStore = []; this.enqueue = enqueue; this.dequeue = dequeue; this.front = front; this.back = back; this.toString = toString; this.empty = empt... 阅读全文

posted @ 2017-04-01 10:19 carlyin 阅读(144) 评论(0) 推荐(0)

hash.js
摘要:function HashTable() { this.table = new Array(137); this.simpleHash = simpleHash; this.showDistro = showDistro; this.put = put; //this.get = get; } function put(data) { var pos = this.simpleHa... 阅读全文

posted @ 2017-04-01 10:18 carlyin 阅读(153) 评论(0) 推荐(0)

dictionary.js
摘要:function Dictionary(){ this.datastore={}; this.add=add; this.find=find; this.remove=remove; this.showAll=showAll; } function add(key,value){ this.datastore[key]=value; } function find(key){ ... 阅读全文

posted @ 2017-04-01 10:17 carlyin 阅读(91) 评论(0) 推荐(0)

arraylist.js
摘要:function List() { this.listSize = 0; this.pos = 0; this.dataStore = []; // 初始化一个空数组来保存列表元素 this.clear = clear; this.find = find; this.toString = toStri... 阅读全文

posted @ 2017-04-01 10:16 carlyin 阅读(381) 评论(0) 推荐(0)

bank.js
摘要:function Checking(amount){ if(amount){ this.banlance=amount; }else{ this.banlance=0; }; this.deposit=function(dep){ this.banlance+=dep; }; this.withdraw=func... 阅读全文

posted @ 2017-04-01 10:16 carlyin 阅读(206) 评论(0) 推荐(0)

print()源生方法调用打印功能
摘要:aaa 阅读全文

posted @ 2017-03-30 10:40 carlyin 阅读(180) 评论(0) 推荐(0)

下拉刷新
摘要:1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 ... 阅读全文

posted @ 2017-03-20 15:40 carlyin 阅读(102) 评论(0) 推荐(0)

App封面广告
摘要:ES6 5S跳过 container message... container message... container message... container message... container message... container m... 阅读全文

posted @ 2017-02-20 15:08 carlyin 阅读(289) 评论(0) 推荐(0)

1 2 3 下一页

导航