自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Beyond The Sky

Just Fly !

  • 博客(177)
  • 资源 (2)
  • 收藏
  • 关注

原创 atom安装 JsHint

Jshint 是一个好用的js语法检测器,可以按照你自己的意图检测出意外的错误。他的官网在这里:http://jshint.com/install/里面讲了他的安装方法,以及对应各个平台上的插件。有些平台他都出了好几个插件,我用的时atom,安装的第一个插件。我的安装:1、在atom中安装 linter-jshint 插件,可在设置中安装,也可以使用atm2、配

2016-08-03 16:21:17 3429

转载 atom插件推荐

介绍一些适用于 Web 开发者的 Atom 编辑器插件转载自: http://notes.iissnan.com/2015/atom-packages-for-web-developers/作者: IIssNan本文地址:https://linux.cn/article-6871-1.html2016-1-10 10:23    评论: 3 收藏: 5    

2016-07-28 21:24:23 942

原创 ubuntu 安装atom编辑器

在你的Ubuntu/Linux Mint上安装AtomPPA安装,打开终端使用以下命令安装:sudo add-apt-repository ppa:webupd8team/atomsudo apt-get updatesudo apt-get install atom卸载Atomsudo apt-get remove atomsudo add-apt-reposit

2016-07-28 15:59:52 10448

转载 Mocha 实例教程 - ruanyf

测试框架 Mocha 实例教程作者: 阮一峰日期: 2015年12月 3日Mocha(发音"摩卡")诞生于2011年,是现在最流行的JavaScript测试框架之一,在浏览器和Node环境都可以使用。所谓"测试框架",就是运行测试的工具。通过它,可以为JavaScript应用添加测试,从而保证代码的质量。本文全面介绍如

2016-07-27 12:08:10 1656

原创 es6 chapter4 字符串的扩展

1、includes(), startsWith(),endsWith()includes():返回布尔值,表示是否找到了参数字符串。startsWith():返回布尔值,表示参数字符串是否在源字符串的头部。endsWith():返回布尔值,表示参数字符串是否在源字符串的尾部。var s = 'Hello world!';s.startsWith('Hello') // tru

2016-07-25 22:32:32 309

原创 es6 chapter3 解构赋值

1、数组结构赋值let [foo, [[bar], baz]] = [1, [[2], 3]];foo // 1bar // 2baz // 3let [ , , third] = ["foo", "bar", "baz"];third // "baz"let [x, , y] = [1, 2, 3];x // 1y // 3let [head, ...tail] =

2016-07-24 12:26:50 335

原创 chapter 1 let 和 const

1、let命令(1)不存在变量提升console.log(foo); // 输出undefinedconsole.log(bar); // 报错ReferenceErrorvar foo = 2;let bar = 2;(2)不允许重复声明let不允许在相同作用域内,重复声明同一个变量。// 报错function () { let a = 10; var

2016-07-24 11:45:43 321

原创 考察一下你对js继承链的理解

请深入理解下面的程序,并解释输出结果运行环境: maxOS,node v6.3.1,  非严格模式运行var print = function(input){ console.log(input);}function Foo(){ getName = function() { print(1)} return this;}Foo.getName = function(){

2016-07-22 14:41:31 377

原创 ES6 对象的扩展 简单测试

测试环境:max oS,node v6.3.1  , 不使用严格模式,2016/7/221、属性的简洁表示法(支持)function get(){ var x=1, y=2; return {x,y};}console.log(get());2、属性名表达式(支持)var b = 'age';var a = { [b]:20, ['name']:'To

2016-07-22 14:23:20 3993

原创 自定义 directive ay-box

工作过程中需要做一个类似下面图上的2行4列的导航栏,遂自己谢了directive,方便工作中用,还不是很美观。他支持 3列、4列、5列。directive.js /** * ay-box * html: * * js: * var obj = [ * {icon:'ion-heart', title:'a', state:'main'}, * {icon

2016-07-19 18:00:07 387

原创 ionic项目phoneNumber显示问题

在ionic项目中,电话号码在手机中,自动显示为蓝色的链接文字,影响显示效果。其原因是webVew 会自动检测类似手机的数字长串显示为链接。那么如何去掉这个显示效果呢?在stackFlow中找到了如下解决方法:Add this, I think it is what you're looking for: name = "format-detection" content =

2016-07-12 10:37:55 563

原创 重装ubuntu16.04后配置本地git服务器

确保机器上安装有git,通过git --version 测试生成本地公钥。命令:ssh-keygen,回车,回车,显示创建公钥成功,并显示有存放的路径,记下路径名备用,一般路径是/home/user1/.ssh 目录下,id_rsa.pub 文件就是我们要使用的公钥复制公钥到git服务器。远程登录机器。ssh [email protected].××进入目录:/home/cochona/g

2016-07-05 16:02:50 1304

原创 自定义directive,简单实例

//一个自定义指令的简单例子,自定义directive Angular JS Custom Directives AngularJS Sample Application var mainApp = angular.module("mainApp", []); mainApp.directive('s

2016-07-04 16:36:17 445

原创 node版本管理 n和nvm说明

项目中我们有时需要使用不同版本 的node来调试或测试程序,最本的方法当然是手动下载不同的版本,并卸载之前的版本,这样可以达到目的,但是无疑是麻烦时间的,在node中有“node版本管理器”来实现类似的功能需要。这里介绍比较流行的两个,“n”和“nvm”.先说说n。n是node一个模块,可以用来管理和切换node版本,其作者是TJ Holowaychuk(出名的Express框架作者),使

2016-07-03 13:32:37 3482

原创 npm -g默认安装地址

Installed in "/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/vendor/linux-x64-46/binding.node"/usr/local/lib└─┬ [email protected]   ├── [email protected]   ├─┬ cheeri

2016-07-03 12:21:41 4164

转载 NPM 使用介绍

NPM 使用介绍NPM是随同NodeJS一起安装的包管理工具,能解决NodeJS代码部署上的很多问题,常见的使用场景有以下几种:允许用户从NPM服务器下载别人编写的第三方包到本地使用。允许用户从NPM服务器下载并安装别人编写的命令行程序到本地使用。允许用户将自己编写的包或命令行程序上传到NPM服务器供别人使用。由于新版的nodejs已经集成了npm,所以之前np

2016-07-03 12:15:03 567

原创 在github中托管项目

1、在github中新建托管项目选择 “Newrespository”输入 “Repositoryname”输入 “description”选择 public(private项目是要收费哦)选择遵从的开源协议2、上传项目到git

2016-07-03 11:53:04 332

原创 angular $http 官方实例说明

General usageThe $http service is a function which takes a single argument — a configuration object — that is used to generate an HTTP request and returns a promise.// Simple GET request exa

2016-06-28 18:01:29 630

原创 angular $q 官方实例代码

// for the purpose of this example let's assume that variables `$q` and `okToGreet`// are available in the current lexical scope (they could have been injected or passed in).function asyncGreet(nam

2016-06-28 17:46:36 823

转载 $q -- AngularJS中的服务

原文链接: $q 官方文档描述既然是用来处理异步编程的,那么在浏览器端的JS里,主要是2种: setTimeout 和 Ajax 请求.  promise 的使用就很像Ajax请求的成功和失败回调。此承诺/延迟(promise/deferred)实现的灵感来自于  Kris Kowal's Q CommonJS Promise建议文档 将承诺(promise)

2016-06-28 17:17:26 552

转载 找出丢失的数字

找出丢失的数字标签: 算法扩展面试存储2011-11-04 07:02 1232人阅读 评论(0) 收藏 举报 分类: 算法 (Algorithm)(111) 有一组数字,从1到n中减少了一个数,顺序也被打乱了,放在一个n-1的数组里,请找出丢失的数字。1、用1+2+...+n(即n(n+1)/2)减去当前输入数据的总和。

2016-06-28 09:25:08 864

原创 angular 插件angular-hint

angular-hint可以帮助我们写出更好的angular代码,以及更容易定位angular中常见的错误。使用方式:1、使用chrome的插件 batarang2、手动集成angular-hint,通过 npm install angular-hint --save启用ngHint指令:  /启用全部module显示制定需要的module: 

2016-06-27 11:37:24 394

转载 Object.observe() js新特性

Object.observe() 用来实时监测js中对象的变化,变化时调用一个方法。使用此方法,可以代替angular中的脏检查,可以大大的提高性能,详情可以看下文。【翻译】Object.observe()带来的数据绑定变革时间 2014-05-27 09:44:54  云和移动的彼端原文  http://mweb.baidu.com/p/object-obse

2016-06-27 10:56:40 18206 2

原创 数组与字符串的相互转化 Js

数组与字符串的相互转化var obj="new1abcdefg".replace(/(.)(?=[^$])/g,"$1,").split(",");       //字符串转化为数组var obj2 = "new2abcdefg".split("");                                            //字符串转化为数组alert(obj)

2016-06-17 16:28:13 388

转载 Javascript 中 atob 方法解码中文字符乱码问题

解决 Javascript 中 atob 方法解码中文字符乱码问题由于一些网络通讯协议的限制,你必须使用 window.btoa() 方法对原数据进行编码后,才能进行发送。接收方使用相当于 window.atob() 的方法对接受到的 base64 数据进行解码,得到原数据。例如,发送某些含有 ASCII 码表中 0 到 31 之间的控制字符的数据。window.bto

2016-06-17 16:27:30 6870

原创 angularJs三种依赖注入方式与minify

依赖注入(饭来伸手,一来张口)DI,Dependency InjectioAngularJs使用module“名字/对象”注册表来作为容器,实现DI。依赖注解有三种方式,(数组标注、添加$inject属性、隐式声明)。其中前两种在代码minify时不会被破坏,推荐使用第一种方式。第二种方式可以自己手动改写(下面有例子),也可以使用工具ngAnnotate对隐式声明进

2016-06-15 15:58:35 2629

原创 获取中国 省市区 js

三个方法用于获取中国的省份、市、县区。从网上找到了中国省市区的json串,然后用js写了一个utl工具,分享给大家。ChinaCity.getProvince = getProvince;ChinaCity.getCity = getCity;ChinaCity.getArea = getArea;(function(){ //收录了中国的省市区县数据 var c

2016-06-15 12:03:48 12925 1

原创 银行卡号- 查询银行卡信息

工作中用到的一个功能,下面是用js实现的一个util。花了不少的时间折腾这个,把结果分享给大家。(function() { //cardType:DC->储蓄卡,CC->信用卡 //var root = global; var cardTypeMap = { DC: "储蓄卡", CC: "信用卡", SCC: "

2016-06-15 11:53:50 21737 2

原创 JavaScript toLocaleString()

JavaScript toLocaleString() 函数详解toLocaleString()函数用于将当前对象以字符串值的形式返回,该字符串的格式适合当前宿主环境的当前区域设置。该方法属于Object对象,由于所有的对象都"继承"了Object的对象实例,因此几乎所有的实例对象都可以使用该方法。所有主流浏览器均支持该函数。语法object.toLoc

2016-06-13 16:06:23 854

原创 valueOf 和 toSring

toString()函数用于将当前对象以字符串的形式返回。该方法属于Object对象,由于所有的对象都"继承"了Object的对象实例,因此几乎所有的实例对象都可以使用该方法。所有主流浏览器均支持该函数。valueOf()函数用于返回指定对象的原始值。该方法属于Object对象,由于所有的对象都"继承"了Object的对象实例,因此几乎所有的实例对象都可以使

2016-06-13 16:03:36 737

原创 Object.entries()

This is an experimental technologyBecause this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of

2016-06-13 15:52:31 927

原创 Object.values() (非标准)

This is an experimental technologyBecause this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of

2016-06-13 15:51:56 2795

原创 Object.keys()

The Object.keys() method returns an array of a given object's own enumerable properties, in the same order as that provided by a for...in loop (the difference being that a for-in loop enumerates p

2016-06-13 15:51:09 1678

原创 Object.getOwnPropertyNames()

The Object.getOwnPropertyNames() method returns an array of all properties (enumerable or not) found directly upon a given object.SyntaxObject.getOwnPropertyNames(obj)ParametersobjThe

2016-06-13 15:44:59 1598

原创 The in operator

The in operator returns true if the specified property is in the specified object.Syntaxprop in objectNameParameterspropA string or symbol representing a property name or array index (

2016-06-13 15:40:04 294

原创 instanceof

The instanceof operator tests whether an object has in its prototype chain the prototype property of a constructor.Syntaxobject instanceof constructorParametersobjectThe object to test

2016-06-13 15:38:05 504

原创 isPrototypeOf()

The isPrototypeOf() method tests for an object in another object's prototype chain.Note: isPrototypeOf differs from the instanceof operator. In the expression "object instanceof AFunction"

2016-06-13 15:34:56 474

原创 hasOwnProperty()

The hasOwnProperty() method returns a boolean indicating whether the object has the specified property.Syntaxobj.hasOwnProperty(prop)ParameterspropThe name of the property to test.

2016-06-13 15:21:16 1071

转载 Js作用域链

一:函数作用域   先看一小段代码:[javascript] view plain copyvar scope="global";  function t(){      console.log(scope);      var scope="local"      console.log(scope);  }  t(

2016-06-07 16:22:19 268

转载 angularjs 表单验证

表单验证常用的表单验证指令 1. 必填项验证某个表单输入是否已填写,只要在输入字段元素上添加HTML5标记required即可:  2. 最小长度验证表单输入的文本长度是否大于某个最小值,在输入字段上使用指令ng-minleng= "{number}": 3. 最大长度验证表单输入的文本长度是否小于或等于某个最大值,在

2016-06-07 16:18:15 458

Android应用开发揭秘 - 高清 有目录

安卓开发的必备入门书籍,适合入门学习者。 自己看的书,绝对高清,有目录

2012-10-26

空空如也

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

TA关注的人

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