自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(390)
  • 资源 (5)
  • 问答 (1)
  • 收藏
  • 关注

翻译 DS.Lab筆記 - ECMA-262-5 - 严谨模式

介绍o(╯□╰)o严谨模式的特性o(╯□╰)o严谨模式下的限制未来保留字新增了一些保留字,它们不能在严谨模式下作为变量名使用,包括:implements,interface,let,package,private,protected,public,static,yield。八进制扩展o(╯□╰)oo(╯□╰)o给未声明的变量赋值ES3

2017-07-31 13:19:37 407

翻译 理解ES6: Promises

在开始写总结笔记之前,先概览下Promise的历史。它作为一种用来处理异步程序的设计模式,在ES6以前就已经被广泛实现了。流行的JS库和框架都各自实现了自己的版本,像jQuery里的Deferred对象,AngularJS。另外甚至还有一些库就是提供promise的实现的,比如Q和Bluebird。这一章讲的则仅限于ES6里对于promise模式的实现,除了本篇之外,也推荐读一读MDN和Goo

2017-07-03 10:03:08 519

翻译 理解ES6: 组件

何为组件?组件本质上就是JavaScript文件,但是它们被加载的方式和JavaScript文件被加载的方式有所不同,我们称传统的加载和执行方式为scripts模式,组件的加载则不是这个模式,它有自己的模式(Vincent:作者没有说,或许成为module模式?这个名称可能是根据HTML里的标签名来的)。组件里的代码自动在严禁模式下运行,这个行为不可更改;组件里面最

2017-07-02 09:15:30 1332

翻译 DS.Lab筆記 - ECMA-262-5 - 文法环境概论

引言文法环境这个机制被很多语言采纳来实现静态作用域法则,比如像闭包这样的功能。ECMA-262-5 标准借用了这个概念,但是它更多则只是对于ES3里的静态作用域机制的进一步抽象和理论层面的完善。因此,ES3里的概念,像触发体(activation object)被替换为触发记录(activation record),执行上下文栈被替换为调用栈(call-stack)。普适理

2017-07-02 08:50:51 292

翻译 理解ES6: 块作用域

这是Nicholas Zakas的新作,原文链接:https://github.com/nzakas/understandinges6/blob/master/manuscript/01-Block-Bindings.mdvar声明与变量提升现象这是前ES6时期var的问题,变量会被JS引擎处理成好像它们的声明被放在函数作用域(或者全局作用域)的顶端。fun

2017-06-29 19:32:43 416

翻译 DS.Lab筆記 - ECMA-262-5 - 属性与属性描述器

属性的种类个属性的特性(attribute)命名数据属性这类属性有四个特性,它们的默认值是:var defaultDataPropertyAttributes = { [[Value]]: undefined, [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]

2017-06-10 17:15:08 440

原创 <C# 6.0 & .NET 4.6 Framework> - Note 03

Chapter 10: Delegates, Events and Lambda Expressions這個東西叫委託。當定義一個委託的時候,編譯器在後面會聲明一個密封類,並繼承System.MulticastDelegate。它的結構也是固定的,有固定的一些方法。public sealed class MyOtherDelegate : System.MulticastDelegat

2017-06-08 18:28:07 535

原创 <Effective JavaScript> - Note 03

Item 47:不要给Object.prototype添加可枚举的属性归根结底,还是在说for..in的特性带来的问题。像下面的代码在Object.prototype上定义了一个方法,结果导致一些问题:Object.prototype.allKeys = function () { var result = []; for (var key in this) { r

2017-05-13 12:11:51 428

原创 <Effective JavaScript> - Note 02

Item 13:使用IIFE创建本地作用域看来这个for循环的作用域的问题真的是很经典,在DS的博客,KS的YDtKJS系列里都有讨论过。代码如下:function wrapElements(a) { var result = [], i, n; for (i = 0, n = a.length; i < n; i++) { result

2017-04-23 07:01:36 541

翻译 Note On <High Performance JavaScript> - 03

Chapter 8: 实践技巧避免双重执行这个部分讨论的是动态执行的JS代码,通过eval(),Function(),setTimeout()和setInterval()所创建的代码都会经过两次执行的过程,而这导致它们慢很多。作者的建议是,对于eval()和Function()最好是索性直接避免,而后两者setTimeout()和setInterval(),可以

2017-04-22 09:01:48 352

原创 关于本人将会搬家博客的声明

至对这个博客有点关注的人:本人写博客的初衷很简单,主要是管理个人的知识和信息,软件开发这个行业的知识有其独特的性质,博大精深,结构宏大而细微处又琐碎,往往要经过一番长期的求索才能领悟一些知识,比如原理,算法等等,所以作为从业人员,记录下自己解开的知识点非常重要。这些博客其实只是个人的学习笔记,目标读者也只是我自己而已,没想到还是有很多人来看,也有些被收入知识库。也没有想到有一天会写

2017-04-13 17:05:25 521

翻译 Note On <High Performance JavaScript> - 02

Chapter 1: 加载与运行在很多浏览器里,渲染界面的线程和执行JavaScript的是同一个线程,所以当执行JS的时候,浏览器就停下任何其他任务。不论是遇见内联的JS代码,还是外部加载的JS文件,浏览器都只能暂时放下跟界面有关的工作去执行JS代码。这样设计的原因是JS代码会修改DOM,比如通过document.write()。=============

2017-04-10 11:04:10 571

翻译 DS.Lab筆記 - ECMA-262-3: 闭包

原文链接:ECMA-262-3 in detail. Chapter 6. Closures.=============================================================ECMA的闭包实现var x = 10; function foo() { console.log(x);} (f

2017-04-10 06:58:56 476

翻译 DS.Lab筆記 - ECMA-262-3: 函数

原文鏈接:ECMA-262-3 in detail. Chapter 5. Functions.函数有三种:函数声明函数表达式通过函数构造器创建的函数====================================================================函数声明(Function Declarati

2017-04-05 18:03:26 314

翻译 Note On <High Performance JavaScript> - 01

Chapter 4: 文档对象模型(DOM)操作一般来说,一个浏览器里面的DOM实现和JavaScript的实现是两个分开的模块,JavaScript是独立的脚本语言,它自身的规范里不包含DOM,所以JavaScript的引擎是个独立的部分,实现DOM的部分通常叫渲染引擎(rendering engine)。由于两者相互独立,所以所有与DOM有关的操作都会引起两个模块之间的沟通,这个通

2017-04-02 17:05:26 764

翻译 DS.Lab筆記 - ECMA-262-3: 求值策略

求值策略:傳值(Call by value),傳引用(Call by reference),共享(Call by sharing)。對於原始數據類型,JavaScript傳遞函數參數使用的是傳值;對於對象數據類型,JavaScript傳遞函數參數使用的是共享。

2017-03-30 10:36:03 285

翻译 DS.Lab筆記 - ECMA-262-3: 作用域链

函数的生命周期:创建,调用执行。作用域的特性:闭包(Closures),經過函數構造器創建的函數對象的[[Scope]]屬性,雙重維度的作用域鏈查找:在作用域链里混合了原型链,全局上下文和eval上下文里的作用域鏈,在執行上下文的代碼運行階段對作用域鏈施加影響:with,catch会在前面插入新对象

2017-03-26 17:42:59 455

翻译 DS.Lab筆記 - ECMA-262-3: ECMAScript对于面向对象语言功能的实现

原文鏈接:ECMA-262-3 in detail. Chapter 7.2. OOP: ECMAScript implementation.=============================================================数据类型(Data types)ECMAScript标准定义了六种可以在代码中直

2017-03-24 16:45:09 759

翻译 DS.Lab筆記 - ECMA-262-3: this

函数执行上下文里this的值:this的值取决于调用当前函数的方式。内部Reference类型:变量名;函数名;函数的形式参数名;还有全局对象上面没有被定义的属性名;属性访问器。决定this的值的规则:1.调用函数的操作符是一对括号:( )在这个操作符左边出现的记号如果是一个引用类型的值,那么这个引用类型上的base的值就会被赋值给this;2.在所有其他的情况下,也就是说( )左边的符号不是一个引用类型,那么this的值就会成为null;3.在任何情形下,如果this的值是null,就被隐性转换成指向

2017-03-22 08:58:15 640

原创 <Effective JavaScript> - Note 01

Item 1:搞清楚你使用的JavaScript的版本,Item 12:理解變量提升,Item 8:避免使用全局对象,Item 49:遍历数组时,用for循环而不是for...in循环

2017-03-15 20:02:10 673

翻译 DS.Lab筆記 - ECMA-262-3: 變量體(variable object)

原文鏈接:ECMA-262-3 in detail. Chapter 2. Variable object.首先第一點,variable object一定是相對於execution context而存在的,它自己不會獨立存在,一個VO一定是從屬於某一個EC的,它的目的就是幫助這個EC存儲下列內容:變量(VariableDeclaration)函數聲明(FunctionDec

2017-03-14 17:57:32 507

原创 <Professional ASP.NET MVC 5> - Note 02

CHAPTER 9 RoutingUnless both parameters have a default value, a potential ambiguity exists, so Routing will ignore the default value on the {action} parameter.When you specify a default valu

2016-12-12 11:18:26 528

原创 Set Up Scheduler Job on Azure

Create Scheduler Job ServicesCreate a Job CollectionConfigure Action SettingsNow you have it ready.

2016-11-10 18:18:41 334

原创 Deploying ASP.NET MVC App On Azure

Prerequisite & Precondition:Windows 7 ProVisual Studio 2015 Enterprise (Update 3)SQL Server 2014 ExpressThe web app is based on ASP. NET MVC 5, Entity Framework, and it has data stored i

2016-10-24 16:08:28 317

原创 Set Up Ninject and Moq In A MVC 5 Prjoect

Install NinjectInstall MoqPrepare Code:Add /Abstract/IAuctionRepository.csusing System.Collections.Generic;using TeAwaOnlineArtwork

2016-10-05 10:28:25 283

原创 Design Pattern - Structural Patterns - Bridge Pattern

2007Section 2, Chapter 4Bridge PatternConceptIn the Bridge pattern we allow the instance variable to be not a concrete type but an abstract type, thus giving us

2016-10-01 17:24:07 316

原创 <Pro ASP.NET MVC 5> - Note02

CHAPTER 3: The MVC PatternBuilding Loosely Coupled ComponentsImplement an interface that defines all of the public functions required.By introducing interface, I ensure that there

2016-09-17 20:23:18 845 2

原创 <Pro ASP.NET MVC 5> - Note01

CHAPTER 16 Advanced Routing FeaturesWorking with Areasto customize the routing system by replacing the standard MVC routing implementation classes and use the MVC Framework areas featu

2016-09-04 18:27:48 440

原创 <Professional ASP.NET MVC 5> - Note 01

CHAPTER 3 VIEWSpublic ActionResult Index(){ return View("~/Views/Example/Index.cshtml");}When using the tilde syntax, you must supply the file extension of the view because this bypasse

2016-09-01 13:41:14 400

原创 Design Pattern - Creational Patterns - Abstract Factory Pattern

2007Section 2, Chapter 2Abstract Factory PatternConceptSince the Factory pattern is a class that creates other classes in a uniform way, the Abstract Factory pa

2016-08-10 06:49:24 396

原创 Design Pattern - Structural Patterns - Flyweight Pattern

20072007Section 6, Chapter 4Section 2, Chapter 3Flyweight PatternConceptPut all the content from both books together, the highlights of Flyweight Patt

2016-07-30 13:58:17 456

原创 搭建Android Studio2.1配HTC One M8做测试环境

Installing & configuring Android StudioI followed this book's instructions to set up my AS environment.For the rest, I took this video as a reference. It can give you a rough idea abou

2016-07-24 07:26:18 617

原创 JavaScript心經-this关键字篇

this关键字this關鍵字在JavaScript裡的具體含義完全不同於C#或者Java這種基於類的編程語言,所以參考後者來理解前者只會更加迷惑。在JavaScript裡並不存在C#中的類,也就不存在類的實例,所以this不可能指向那樣一個東西。JavaScript裡的this究竟該怎樣解釋,目前我還沒有發現任何術語可以簡單地說明並且不具歧義性,很多人把它稱為函數執行時的上下文

2016-07-23 06:59:57 449

原创 Design Pattern - Behavioral Patterns - Template Pattern

2007Section 10, Chapter 3Template PatternConceptThis pattern defines the skeleton or template for a group of classes as a parent class, and allows inherited mem

2016-07-19 15:56:35 262

原创 <Mastering Android Application Development> - Note 01

Chapter 1: Getting StartedIntroducing Material DesignThe material is a metaphor of an element that can be seen on the surface; it consists of layers that can have different heights and width

2016-07-19 11:33:03 392

原创 Design Pattern - Structural Patterns - Facade Pattern

2007Section 5, Chapter 4Facade PatternConceptA Facade pattern allows grouping of subsystems behind a unified interface to allow a central access point to these

2016-07-14 07:28:14 289

原创 Design Pattern - Structural Patterns - Composite Pattern

2007Section 3, Chapter 4Composite PatternConceptThe Composite pattern allows you to compound different subsets of functionality into a collection and then call

2016-07-11 17:39:39 264

原创 <Professional Android 4 Application Development> - Note 02

Chapter 4: Building User InterfacesFUNDAMENTAL ANDROID UI DESIGNViews — Views are the base class for all visual interface elements (commonly known as controls or widgets). All UI controls,

2016-07-10 16:43:02 606

原创 [Specical] Design Pattern - Behavioral Patterns - Iterator Pattern

2007Section 4, Chapter 3Iterator PatternConceptIterators allow sequential access of elements in a collection of objects without exposing its underlying code.

2016-07-05 08:03:27 353

原创 <Professional Android 4 Application Development> - Note 01

Android Software Stack

2016-07-04 09:41:53 565

将AMV1影片转换为MovieClip

这是一个外国人写的类,可以将AVM1影片转换为MovieClip来操作。

2012-12-18

獲取flv視頻文件的視頻尺寸

在要播放一個視頻前往往需要先獲得它的尺寸的數據,然後根據數據調整它的大小及位置,對於元數據丟失的視頻文件,這個源碼展示了如何獲得視頻尺寸。

2012-06-27

通过TweenMax制作图像渐变动画

通过TweenMax渐变图像亮度,并在此之前,先用Actionscript3.0自身的color transform类修改元件的颜色。

2012-06-26

ajax聊天實驗

《ajax & PHP》第五章。

2012-06-02

AJAX动态表单验证

《AJAX and PHP - Building Responsive Web Applications》第四章源代码

2012-03-13

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

TA关注的人

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