分类 Code 下的文章

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

    展开阅读

Vue&Axios Practice

Vue&Axios Practice

  1. Vue Practice

  2. Axios


1. HTML Code

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="keywords" content="">
    <meta name="description" content="">
    
    <title>The NYT API Demo</title>
    <link rel="stylesheet" href="css/bootstrap.css">
    <link rel="stylesheet" href="css/main.css">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
    <div id="app" class="container">
        <h3 class="text-center" >Vue News</h3>
            <div class="row">
                <div class="col-md-6">
                    <select id="" name="" v-model="section">
                        <option v-for="section in sections " :value="section" v-text="section"></option>
                    </select>
                </div>
                <div class="col-md-6">
                    <a class="btn btn-primary" @click="getPosts(section)">Chocie Category</a>
                </div>
            </div>

            <news-list :results="results"></news-list>
    </div>

    <script src="https://cdn.bootcss.com/vue/2.4.2/vue.js"></script>
    <script src="../bower_vendor/jquery/jquery.min.js"></script>
    <script src="../bower_vendor/axios/dist/axios.min.js"></script>
    <script src="./js/vue_fetchapi.js"></script>
</body>
</html>

展开阅读

Responsive Image Fundamentals

Responsive Image Fundamentals

  1. Article Point

  2. Reference

1. Article Point

  1. For photos and other raster images, the techniques you use might vary a bit, depending on if the images are loaded through CSS or HTML.

    展开阅读

PHP Use While instead of fetchAll

PHP Use While instead of fetchAll

PDOStatement::fetchAll() returns an array that consists of all the rows returned by the query. From this fact we can make two conclusions:

  1. This function should not be used, if many rows has been selected. In such a case conventional while loop ave to be used, fetching rows one by one instead of getting them all into array at once. "Many" means more than it is suitable to be shown on the average web page.

  2. This function is mostly useful in a modern web application that never outputs data right away during fetching, but rather passes it to template.

    展开阅读