自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

atrocitytheme的博客

对方并不想跟你说活,并向你扔过来一只猫

  • 博客(21)
  • 收藏
  • 关注

原创 Mongoose 4.11 开始的问题 useMongoClient

在打开mongoose时发现一个报错问题 DeprecationWarning: open() is deprecated in mongoose >= 4.11.0, use openUri() instead, or set the useMongoClient option if using connect() or createConnection(). See http://mongoo

2017-08-18 22:46:51 3379 1

转载 http headers[搬运]

referencepart of Hypertext Transfer Protocol -- HTTP/1.1RFC 2616 Fielding, et al.14 Header Field DefinitionsThis section defines the syntax and semantics of all standard HTTP/1.1 header fields. For e

2017-08-15 19:59:41 515

原创 ejs模版学习-- ejs的大概使用

学习网址先贴在此ejs的运作var path = require('path');var ejs = require('ejs');var people = ['geddy', 'neil', 'alex'], html = ejs.render('<%= people.join(", "); %>', {people: people});console.log(html) // gedd

2017-08-02 23:58:03 492

原创 javascript初学记4 -- 对象

由于js的对象已经有很多解释,决定读一段关于制作js class库的源码,以加深印象。(function(){ 'use strict'; // saving constants var VERSION = '1.0'; var ORIGINAL = window.Class; // creating global class variable var C

2017-07-29 08:41:25 189

原创 underscore.js 剩余部分2 --- 面向对象及链式调用

_.mixin // Add your own custom functions to the Underscore object. _.mixin = function(obj) { _.each(_.functions(obj), function(name) { var func = _[name] = obj[name]; _.prototype[name

2017-07-29 08:35:29 380

原创 underscore.js 剩余属性1-- template

// By default, Underscore uses ERB-style template delimiters, change the // following template settings to use alternative delimiters. _.templateSettings = { evaluate: /<%([\s\S]+?)%>/g, in

2017-07-28 19:56:09 290

原创 underscore.js 1105 -- 1288 行

// Internal pick helper function to determine if `obj` has key `key`. var keyInObj = function(value, key, obj) { return key in obj; }; // Return a copy of the object only containing the whitel

2017-07-27 22:26:39 203

原创 underscore.js 964 --- 1103行

今天剩下的大部分都是工具函数了,比较易读,就过一遍即可// Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); var nonEnumerableProps

2017-07-26 22:47:02 198

原创 underscore.js 882 -- 963

// Returns a function, that, as long as it continues to be invoked, will not // be triggered. The function will be called after it stops being called for // N milliseconds. If `immediate` is passed

2017-07-20 11:13:17 197

原创 underscore.js 755 -- 876

// Function (ahem) Functions // ------------------ // Determines whether to execute a function as a constructor // or a normal function with the provided arguments. var executeBound = function(s

2017-07-19 18:48:19 232

原创 underscore.js 652 --- 748行

// Generator function to create the findIndex and findLastIndex functions. var createPredicateIndexFinder = function(dir) { return function(array, predicate, context) { predicate = cb(predi

2017-07-18 12:12:18 193

原创 underscore.js 530 -- 652行

// Internal implementation of a recursive `flatten` function. var flatten = function(input, shallow, strict, output) { output = output || []; var idx = output.length; for (var i = 0, leng

2017-07-17 16:42:34 231

原创 underscore.js 409 -- 526行

// Sort the object's values by a criterion produced by an iteratee. _.sortBy = function(obj, iteratee, context) { var index = 0; iteratee = cb(iteratee, context); return _.pluck(_.map(obj

2017-07-16 22:10:32 238

转载 在已有get,post情况下,为什么我们需要delete和put?

今天逛网站,偶然看到一篇有意思的文章,特发上来分享文章引用网址http://www.artima.com/lejava/articles/why_put_and_delete.htmlIn “Why REST Failed”, Elliotte Rusty Harold described the difference between the four HTTP verbs GET, POST, P

2017-07-15 21:11:30 1625

原创 underscore.js 293--409

// Invoke a method (with arguments) on every item in a collection. _.invoke = restArgs(function(obj, path, args) { var contextPath, func; if (_.isFunction(path)) { func = path; } el

2017-07-15 18:05:02 226

原创 underscore.js 170 -- 293 行

// The cornerstone, an `each` implementation, aka `forEach`. // Handles raw objects in addition to array-likes. Treats all // sparse array-likes as if they were dense. _.each = _.forEach = functi

2017-07-14 14:34:08 238

原创 underscore.js 102 -- 170行

// Similar to ES6's rest param (http://ariya.ofilabs.com/2013/03/es6-and-rest-parameter.html) // This accumulates the arguments passed into an array, after a given index. var restArgs = function(fu

2017-07-13 23:30:45 565

原创 underscore.js 0 -- 101行

先上代码:(function() { // Baseline setup // -------------- // Establish the root object, `window` (`self`) in the browser, `global` // on the server, or `this` in some virtual machines. We use `self`

2017-07-12 17:52:34 262

原创 javascript初学记---3 应该是函数加点对象 (附带promise解析)

在javascript中函数是绝对的一等公民,可以自定义属性,自定义一切。定义函数直接函数声明var q = myFunc()function myFunc(){ // arrangements return 1}myFunc()这种方式声明对位置没有要求,可以放置于上下均可调用 2. 字面定义函数表达式var myFunc = function () { //

2017-07-08 16:11:19 529

原创 javascript初学记2 -- 字符串, Date, Boolean, null, undefined, Number

记得上次学到了数组,和数组有关的一些类别,现在开始看其他的数据类型,不过个人感觉非常无趣,可以完全跳过这章节。Stringjs的字符串的符号运算:var str1 = '12'var str2 = '34'var str3 = 'qwe'var str4 = '12.1'console.log(str1 + str2); // 1234console.log(str1 - str2); /

2017-06-20 16:50:12 215

原创 javascript初学记1----各种玩乐的数组

javascript初学记1----各种玩乐的数组

2017-06-19 13:44:14 224

空空如也

空空如也

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

TA关注的人

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