[original] experience in microcosmic application of caching of distributed system (1) [design details]

  Microcosmic application experience of caching of distributed system (1) [basic details]    Preface   In recent months, I have been busy with trifles, and I haven’t had much leisure in recent years. Busy in the fall of 2018 has entered, have to sigh that time is always like a white space, do not know what has been harvested and what has been lost. Recently, I took a break and bought two books which are not related to technology. One of them is Yann.Martel wrote The High Mountains of Portugal, and found that reading this book requires some patience, a deep metaphor of life, and...

Centos7.4 configuring virtual environment

environment Centos7.4 Python3.7 download pip isntall virtualenv create environment virtualenv environment_name # for example: virtualenv venv1 This step may remind you when creating a virtual environment. -bash: virtualenv: No command found This shows that virtualenv is not added to the environment variables. There are two solutions. ·Specify the Python interpreter to use this virtualenv to create a virtual environment. python -m virtualenv venv1 # Specify the interpreter of Python. So what version of the interpreter you use, which version of the interpreter you create the virtual envi...

day01

2018September 1st 06:10:27 A day’s plan is in the morning. Always have the habit of getting up early, because can enjoy a quiet time, let want to do things do not seem so urgent! There is always a habit of getting up early, because enjoying breakfast and eating is a very happy thing. On this first day of school, after two years of graduation, I joined the profession of programmer, just as I started school. Perhaps it should have been earlier, but in the past his various persistence is too heavy, completely unable to calm down to do their own thing. I got something yesterday, and I wante...

Webpack plug-in

Plug-in unit plugins:[ new ExtractTextPlugin.extrct({ }) //Create HTMLNew HtmlWebpackPlugin ({)title:"first page", filename:"index.html", template:"/index.html, // true Displayed in body false does not display (default).inject:true "body" }), // Heat replacementNew webpack.HotModuleReplacementPlugin ()]devtool: "eval-source-map" "cheap-source-map" 4.0Before: extract-text-webpack-plugin4.0:extract-text-webpack-plugin@next Service devServer:{ host:'localhost', port:8080, contentBase:".", overlay:true, ...

propTypes

Type detection using PropTypes React.PropTypes.string.isRequireCheck whether name is a string and is required.When invalid values are provided for prop, a warning is displayed in the JavaScript console.MyComponent.propTypes = {/ / you can define one.jsThe original type of prop, by default, is optional.OptionalArray: React.PropTypes.array, optionalBool: React.PropTypes.bool, optionalFunc: React.PropTypes.func, optionalNumber: React.PropTypes.number, optionalObject: React.PropTypes.object, optionalString: React.PropTypes.string, optionalSymbol: React.PropTypes.symbol, // Anythin...

React type checking

Type check import PropTypes from 'prop-types' Class name = = = = =List List.propTypes = { list: PropTypes.array } // Default valueList.defaultProps = { list:[] } props: 1.Read-only cannot be modified (no longer assigns expression to the left).2.ComponentWillReceiveProp() 3.propTypes 4. defaultProps 5.children web > native native You need to download the installation package.// react-router-dom web Direct//react-router-native nvm command Explain nvm list available View all versions nvm install version number download nvm list List the currently ava...

React components

React assembly Custom components 1、We can use functions to define a component:FunctionHelloMessage(props) { return <h1>Hello World!</h1>; } You can also use it.ES6 class To define a component:class Welcome extends React.Component { render() { return <h1>Hello World!</h1>; } } 2.const element = <HelloMessage /> User defined components.Attention, nativeHTML The element name begins with a lowercase letter and is customized.React The class name begins with capitals, for example.HelloMessage It can't be written as helloMessage. In addition, we need...

React simple entry

Reactfunction React function 1 ReactIt is a JavaScript library for building user interfaces. 2 ReactIt is mainly used to build UI. Many people think React is V (view) in MVC. 3 React The internal project originated from Facebook, which is used to erect Instagram website and opened in May 2013. 4 React With high performance, code logic is very simple, and more and more people are paying attention to it and using it. Characteristic Characteristic introduce Declarative design ReactUsing the declarative paradigm, you can easily describe applications. High efficiency R...