JavaScript Design Mode-Factory Mode

Author| Jeskson Excavation| https://juejin.im/user/5a16e1f3f265da43128096cb What is factory mode? The scene goes to buy dumplings for you to eat, order directly instead of making your own. The restaurant makes dumplings (dumpling process) and sells them directly to customers. class Product{ constructor(name) { this.name = name } init() { ...

Added by pck76 on Mon, 06 Jan 2020 14:27:27 +0200

[PHP] php as the client of websocket reads the push log file in real time

First, you need to use composer to download a third-party extension to realize the websocket client of php. You can directly generate the composer.json file in the current directorycomposer require textalk/websocket require('vendor/autoload.php'); use WebSocket\Client; $client = new Client("ws://echo.websocket.org/"); $client->send("He ...

Added by clodagh2000 on Mon, 06 Jan 2020 05:32:20 +0200

Basic configuration of WeChat public address

Today, I configured the token in the afternoon, but I don't know what's wrong. I found many methods on the Internet and didn't solve the problem, but I finally found a solution in a forum. I'm really excited. Don't say no more. Just connect the code. This is the configuration of wechat public platform.    The url value here should be directly ...

Added by jokerfool on Sun, 05 Jan 2020 19:17:44 +0200

Download songs on cool dog music

After testing, you can download the songs you want to pay to download   Preparation: Python 3.5 + pycharm Libraries used: requests, re, json   Steps: Open the official website of cool dog music, enter the songs you want to search (such as "Tian Tian"), and then press enter to search to get the following page:   Right click to check o ...

Added by ultrus on Sun, 05 Jan 2020 01:21:51 +0200

Do not turn on the automatic serialization option of php redis extension

php redis extension has the option of automatic serialization. When storing kv data, you can open it with less code, and suddenly find a depressing place in the process of use. The extension does not make type judgment on the value you want to store. Any type of value is automatically serialized, such as the following code $rd = new Redis(); $ ...

Added by badal on Sat, 04 Jan 2020 10:04:25 +0200

[thinkphp5 operation redis series tutorial] pconnect (or popen) connection

1.pconnect /** * Connects to a Redis instance or reuse a connection already established with pconnect/popen. * * The connection will not be closed on close or end of request until the php process ends. * So be patient on to many open FD's (specially on redis server side) when using persistent connection ...

Added by smith.james0 on Thu, 02 Jan 2020 11:10:13 +0200

Reach advanced routing and parameters

  1. Installation depends on the latest version by default npm i react-router react-router-dom --save-dev 2. Import main component object import {BrowserRouter as Router,Route,Link,Redirect} from 'react-router-dom'; 3. The writing structure is inside the component and does not need to be written in the render. The Router ...

Added by philwong on Wed, 01 Jan 2020 12:08:12 +0200

Query result field type in yii2 database

The default return from the yii2 database query is an AR object, where the field type is essentially the same as the database, but if asArray is used to return in an array, the default field type is all string, and if this json_encode is returned to the App end, it will be killed by the engineers of the strongly typed languages Android/IOS, and ...

Added by Eratimus on Mon, 30 Dec 2019 09:49:12 +0200

An article takes you through function expressions, recursion, closures, variables, this objects, module scopes in JavaScript

Author| Jeskson Source|Dada Front End Bistro How functions are defined: The first is a function declaration; the second is a function expression. Grammar: function functionName(arg0, arg1, arg2) { // Function Body } In Firefox, Safari, Chrome, and Opera: This property gives you access to the name specified by this function. console.log(funct ...

Added by Twister1004 on Mon, 30 Dec 2019 03:08:45 +0200

Building PHP Configuration for LMAP Architecture (Final)

[TOC] Article Directory 1. Introduction to PHP 2. Preparations before installation 3. Manual Compilation and Installation of PHP IV. Installation Process of Forum 1. Introduction to PHP PHP, which is used to interpret dynamic Web page files, provides a development and running environment for Web applications. PHP is a widely used open source, ...

Added by katuki on Fri, 27 Dec 2019 22:18:53 +0200