自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 资源 (1)
  • 收藏
  • 关注

原创 移动端( H5 小程序)CSS 要点总结 ——持续更新

经常遇到坑…在W3C上学习了一段时间了,但是实际遇到的时候,细节多多。一一记录下来,温故而知新。1. CSS 截断字符串;{ /*指定字符串的宽度*/ width:300px; overflow: hidden; /* 当字符串超过规定长度,显示省略符*/ text-overflow:ellipsis; white-spac...

2018-08-15 16:30:20 422

原创 [JavaScript] 小练习 阶乘

使用递归来返回阶乘值;0的阶乘等于1;function factorialize(num) { return num>0? num * factorialize(num-1):1;}// test case;factorialize(5); 

2018-08-06 16:54:42 189

原创 [JavaScript] 小练习 Cash Register 找零钱

 原题:Design a cash register drawer function checkCashRegister()that accepts purchase price as the first argument (price), payment as the second argument (cash), and cash-in-drawer (cid) as the thir...

2018-08-05 16:42:30 942

翻译 [JavaScript] 小练习 US telephone number validator

function telephoneCheck(str) { // regular expression making up var reg = /^(1\s?)?(\(\d{3}\)|\d{3})[\-\s]?\d{3}[\-\s]?\d{4}$/; return reg.test(str);} //test casetelephoneCheck("555-555-5555"...

2018-08-05 09:53:21 213

翻译 [JavaScript] 小练习 Arguments Optional

function addTogether() { var args = Array.from(arguments); return args.some(arg => typeof(arg)!=='number')? undefined: args.length > 1 ? args.reduce((acc,n) => acc+=n, 0):...

2018-08-04 16:16:45 196

翻译 [JavaScript] 小练习 check if every object in list has the property

function(collection, pre){ return collection.every( (obj) => obj.hasOwnProperty(pre) && Boolean(obj[pre]))}//test case check if every object in the array has the property or...

2018-08-04 15:41:36 93

翻译 [JavaScript] 小练习 binary string transformation

function binaryAgent(str) { return String.fromCharCode(...str.split(" ").map((char) => parseInt(char,2)));}binaryAgent("01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010...

2018-08-04 15:18:31 304

翻译 [JavaScript] 小练习 Steamroller

function steamrollArray(arr) { let flattenedArray = []; //recursion function function flattenArray(arg){ //initialize an empty array if(!Array.isArray(arg)) flattenedArray.push(a...

2018-08-04 12:03:44 124

原创 [JavaScript] 小练习 给出小于 arg 的所有质数的总和

function sumPrimes(num) { // arg smaller than 2 is unnecessary.. if(num<2) return 'invalid input'; // create a full array.. var arr=[]; for (let iterator=2; iterator<=num; iterator++)...

2018-08-03 10:40:28 172

原创 [JavaScript] 小练习 生成斐波那契数列

function sumFibs(num) { if(num<2) return 1; //initialize an array with the first two numbers; var arr = [1,1]; //generate the array with While loop while((arr[arr.length-1] + arr[arr.len...

2018-08-02 17:37:01 295

常用DOS命令.doc

一些在dos界面或者Linux系统下

2013-05-17

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除