Docker + WordPress Setup

All the instruction will be found at the link underneath: https://davidyeiser.com/tutorial/docker-wordpress-theme-setup When I was installing this, I ... ...

Docker Installation(Ubuntu)

Docker comes in two flavours: The Comunity Edition (CE) and the Enterprise Edition (EE). See this question for the differences. Just take Docker CE if ... ...

PHPUnit Basic

Basic Example 1: declare(strict_types=1); final class FunctionsTest extends WP_UnitTestCase { public function testPushAndPop() { $stack = []; $this->a ... ...

PHP traits

It may sound fancy, but it’s very simple and easy. trait sharable{ function foo(){ echo "foo\n"; } } class A{ use sharable; function bar(){ echo ... ...

简单的 async , await例子

var count = 0; var tick = () => { count++; setTimeout(() => { process.stdout.write('.'); if(count < 100) tick(); },100); } tick();//Init var getApple ... ...

玩玩 ES6 的 Promise 功能

Promise 是一个 Object, 它有两种形式: 1. Promise.resolve() 这样直接可以用. 2.new Promise(function(resolved,rejected){ … resolved(param) … }) 一个 Object 的形式, ... ...

第一手尝试 React Hook 的 useReducer

第一手尝试 React Hook 的 useReducer: import React, {useState,useEffect,useReducer} from 'react'; import ReactDOM from 'react-dom'; let histories = []; const ... ...