上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 16 下一页
摘要: escape不编码字符有69个:*,+,-,.,/,@,_,0-9,a-z,A-ZencodeURI不编码字符有82个:!,#,$,&,’,(,),*,+,,,-,.,/,:,;,=,?,@,_,~,0-9,a-z,A-ZencodeURIComponent不编码字符有71个:!, ‘,(,),*,... 阅读全文
posted @ 2016-01-05 14:36 很好玩 阅读(2136) 评论(0) 推荐(1) 编辑
摘要: 题目:Given a collection of integers that might contain duplicates,nums, return all possible subsets.Note:Elements in a subset must be in non-descending ... 阅读全文
posted @ 2016-01-04 22:43 很好玩 阅读(262) 评论(0) 推荐(0) 编辑
摘要: varfunc=function和functionfunc()在意义上没有任何不同,但其解释优先级不同:后者会先于同一语句级的其他语句。即:{ var k = xx(); function xx(){return 5;}}不会出错,而{ var k = xx(); var xx = function... 阅读全文
posted @ 2016-01-04 22:04 很好玩 阅读(1991) 评论(1) 推荐(0) 编辑
摘要: 题目:Given a set of distinct integers,nums, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must ... 阅读全文
posted @ 2016-01-04 21:53 很好玩 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the ... 阅读全文
posted @ 2016-01-04 16:53 很好玩 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 题目:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two... 阅读全文
posted @ 2016-01-04 16:26 很好玩 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 题目:Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty spac... 阅读全文
posted @ 2016-01-04 15:36 很好玩 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 题目:A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at any poi... 阅读全文
posted @ 2016-01-04 15:08 很好玩 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adj... 阅读全文
posted @ 2016-01-03 15:53 很好玩 阅读(322) 评论(0) 推荐(0) 编辑
摘要: html: 练习1 Account Sign In Register Buyers Guide About Blog Co... 阅读全文
posted @ 2016-01-02 21:44 很好玩 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 1.转换成字符串多数的JavaScript宿主环境(比如Node.js和Chrome)都提供了全局函数toString; 与此同时Object.prototype也定义了toString方法,使得所有对象都拥有转换为字符串的能力。比如一个Number转换为String:var n = 1;n.toS... 阅读全文
posted @ 2016-01-02 21:39 很好玩 阅读(1543) 评论(0) 推荐(0) 编辑
摘要: 如果你要判断的是基本数据类型或JavaScript内置对象,使用toString; 如果要判断的时自定义类型,请使用instanceof。1.typeoftypeof操作符返回的是类型字符串,它的返回值有6种取值:typeof 3 // "number"typeof "abc" // "stri... 阅读全文
posted @ 2016-01-02 13:54 很好玩 阅读(410) 评论(0) 推荐(0) 编辑
摘要: 众所周知,JavaScript是单线程的编程,什么是单线程,就是说同一时间JavaScript只能执行一段代码,如果这段代码要执行很长时间,那么之后的代码只能尽情地等待它执行完才能有机会执行,不像人一样,人是多线程的,所以你可以一边观看某岛国动作片,一边尽情挥洒汗水。JavaScript单线程机... 阅读全文
posted @ 2015-12-31 15:21 很好玩 阅读(589) 评论(0) 推荐(0) 编辑
摘要: 如果你以前没了解过类似的坑,乍一看似乎觉得不可思议。但是某些语言下事实确实如此(比如 Javascript):再看个例子,+1 后居然等于原数,没天理啊!如果你不知道原因,跟着楼主一起来探究下精度丢失的过程吧。事实上不仅仅是 Javascript,在很多语言中 0.1 + 0.2 都会得到 0.30... 阅读全文
posted @ 2015-12-31 14:17 很好玩 阅读(2603) 评论(0) 推荐(0) 编辑
摘要: 我们要说的到底是什么? 在javascript中,每一个函数在被调用的时候都会创建一个执行上下文,在该函数内部定义的变量和函数只能在该函数内部被使用,而正是因为这个上下文,使得我们在调用函数的时候能创建一些私有变量。// makeCounter函数返回的是一个新的函数,该函数对makeCounte... 阅读全文
posted @ 2015-12-31 13:44 很好玩 阅读(388) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 16 下一页