ECMAScript 2015 Promise

ECMAScript 2015 Promise

Promise Overview

Promises are an alternative to callbacks for delivering the results of an asynchronous computation. They require more effort from implementors of asynchronous functions, but provide several benefits for users of those functions.

The following function returns a result asynchronously, via a Promise:

function asyncFunc() {
    return new Promise(
        function (resolve, reject) {
            ···
            resolve(result);
            ···
            reject(error);
        });
}

展开阅读

ECMAScrpit 6 - Object

Object

The Object constructor creates an object wrapper. Methods of the Object constructor

  1. Object.assign() -Object.assign(target, ...sources)

    1. Copies the values of all enumerable own properties from one or more source objects to a target object.

      展开阅读

ECMAScrpit 6 - Baisc Syntax

ECMAScrpit 6 - Baisc Syntax

  1. Variable Declarations

    1. Let

        1. The `let` statement declares a block scope local variable, optionally initializing it to a value.
        2. Redeclaring the same variable within the same function or block scope raises a `SyntaxError`.

      展开阅读

关系代数与SQL

关系代数与SQL

  1. 关系代数

  2. LeetCode Practice


  1. 关系代数是一种过程话查询语言,它包含一个运算的集合,这些运算以一个后两个关系为输入,产生一个新的关系作为结果,关系代数的基本运算有:选择,投影,并,集合差,笛卡尔积,更名,集合交,自然连接,赋值

    展开阅读

Explore XML

Explore XML

  1. XML is a software- and hardware-independent tool for storing and transporting data.

    • XML Does Not Use Predefined Tags

  2. XML Tree

    展开阅读