Tag:This example

  • Mongodb database corruption repair


    sudo rm /var/lib/mongodb/mongod.lock sudo mongod –dbpath –repair sudo systemctl start mongodIf the startup fails, you should check the permissions of the data folder and try to executesudo chown -R mongod:mongod It’s in / etc/ mongod.conf After the datapath value in In this case, / lustre / scratch / chgwang / Mongo / mongodata

  • C ා using selenium to realize browser automatic operation


    summary Selenium is a free distributed automated testing tool, supporting a variety of development languages, whether it is C, Java, ruby, python, or C ා, you can complete automatic testing through selenium. With a simple example, this paper briefly describes the browser simulation operation of C ා using selenium, which is only for learning and […]

  • Common methods and properties of array in JS


    This paper summarizes the common methods and attributes of array in JS Three ways to create arrays 1. Conventional method var arr = new Array (); arr[0]=”abc”; arr[1]=”def” 2. Concise way var arr = new Array(“abc”,”def”); 3. Literal method var arr = []; arr=[“abc”,”def”]; perhaps var arr=[“abc”,”def”] Properties of array objects attribute describe constructor Returns […]

  • Getting started with flexbox layout


    The early implementation of Internet layout is to achieve the layout we want through a variety of different attribute combinations. For example, the common vertical center, just contact CSS friends seevertical-align: middle;This property might be thought to be used for vertical centring, but it’s not that simple. If you want to achieve vertical center through […]

  • How to install python2 on Ubuntu 20.04


    Python 2 has been removed from Ubuntu 20.04, but if you need legacy programs from old python, you can still install and configure them. Step 1: install Python 2SSH to your Ubuntu 20.04 server and install Python 2 using apt. $ sudo apt install python2 Check the python version. $ python2 -V Python 2.7.17 Step […]

  • The third one — a preliminary study on the use of grpc


    Background: Grpc is an RPC development framework provided by Google. What is RPC (remote procedure call), RC — remote call. The API of daily calling web server is a kind of remote call. If P is understood as a function, that is to call remote functions just like calling local functions, the RPC framework is […]

  • JQuery + PHP + Ajax dynamic statistics display example


    JQuery + PHP + Ajax to achieve a dynamic statistics display example, this example is to dynamically display the current number of online users on the page, of course, you can apply to other scenarios. First of all, we put the number to be counted in ා number: Currently online: Then we need to define […]

  • Common command line operation of UNIX / Linux


    Introduction: in view of a period of timeMacThe frequency of using terminal operation after the computer is increasing day by day. It is mainly easy to learn. The following terminal operation commands are arranged on the system MacSystem andLIUNXThe system is based onUNIXDeveloped, basically are universal, the following I useMacFor the center, summed up the […]