Tag:member

  • Mongodb — replica set

    Time:2020-11-22

    MongoDB Replica Sets brief introduction MongoDBReplica sets in(Replica Set)Is a group that maintains the same datasetmongodService. Replica sets provide redundancy and high availability and are the foundation of all production deployments. It can also be said that a replica set is similar to a master-slave cluster with automatic troubleshooting. Generally speaking, multiple machines are used […]

  • Use of bitcoin serialization Library

    Time:2020-11-19

    Bitcoin serialization function is mainly implemented inserialize.hFile, the whole code is mainly aroundstreamAnd types that participate in serialization deserializationTopen.   Stream this template parameter expression hasread(char**, size_t)and write(char**, size_t) Method, similar to golang’s io.reader , io.writer 。 Simple use example: #include <serialize.h> #include <streams.h> #include <hash.h> #include <test/test_bitcoin.h> #include <stdint.h> #include <memory> #include <boost/test/unit_test.hpp> BOOST_FIXTURE_TEST_SUITE(serialize_tests, […]

  • [QT] qtconcurrent:: run() + qtthreadpool to implement multithreading

    Time:2020-11-12

    Previous links: Analysis of qthread source code Subclassing qthread for multithreading Subclassing QObject + movetothread for multithreading Inheriting qrunnable + qthreadpool for multithreading This article example source code address: https://gitee.com/CogenCG/QThreadExample.git In the scenario of Qt development, I feel that this method is used less, so this paper only makes a simple introduction. QT current is […]

  • A little known high performance component registration and implementation of component sorting skills

    Time:2020-10-31

    background On the way to Vue, you must know how to register and call a component We usually use three steps to implement the whole process of calling components adoptimportIntroducing components The component object in the parent componentcomponentsRegister imported subcomponents Use the component in the parent component <template> <div> <Child msg=”Hello World!”/> </div> </template> <script> […]

  • Image rental system of Oracle small training

    Time:2020-10-30

    Image rental system: In the United States, due to the good protection of intellectual property rights, there is generally no piracy problem. In addition to watching movies in the cinema, Americans rent CDs in video shops and go home to see them. In this case, there are more shops for shadow rental. In the context […]

  • C + + keyword — Static

    Time:2020-10-27

    Static local variables Used to modify variables inside the body of a function. This variable has a longer lifetime than the function. #include <iostream> int fun() { static int i = 1; i += 1; return i; } int main() { std::cout << fun() << std::endl; std::cout << fun() << std::endl; } //The first printing […]

  • Java ORM objectivisql in MySQL

    Time:2020-10-23

    The first step is to reference the Maven dependency <dependency> <groupId>com.github.braisdom</groupId> <artifactId>objective-sql</artifactId> <version>1.3.4</version> </dependency> The second step is to define a domainmodel using annotation import com.github.braisdom.objsql.annotations.Column; import com.github.braisdom.objsql.annotations.DomainModel; import com.github.braisdom.objsql.annotations.Queryable; import com.github.braisdom.objsql.annotations.Relation; import com.github.braisdom.objsql.relation.RelationType; import java.util.List; @DomainModel public class Member { @Queryable @Column(updatable = false) private String no; @Queryable private String name; private Integer gender; […]

  • Mall integrates redis to realize cache function

    Time:2020-10-20

    Springboot practical e-commerce project Mall (20k + star) address: https://github.com/macrozheng/mall abstract This paper mainly explains the process of integrating redis with mall, taking the storage verification of SMS verification code as an example. Installation and startup of redis Redis is a high-performance key value pair database developed with C language, which can be used for […]

  • C + + keyword — const

    Time:2020-10-20

    Const modifies variables of common type Const modifies variables. The following two definitions are essentially the same. Its meaning is: const modified variable value of type is immutable. TYPE const ValueName = value; const TYPE ValueName = value; (2) If const is changed to external connection, it can be extended to global. During compilation, memory […]

  • Java – red packet instance – inheritance exercise

    Time:2020-10-18

    Case study: Insert picture description here Case diagram: Divided into three categories, a parent class put the amount and name in the parent class. Then create a new group member and a new main class. The group main class has the method of sending the red packet, and the common member class has the method […]

  • Member initialization in Java

    Time:2020-10-16

    Member initialization Java will try its best to ensure that all variables can be properly initialized before use. For local variables of methods, Java guarantees them in the form of compile time errors. If it is written as: viod f(){ int i; i++;//Error } I may not be initialized. If the data member of a […]

  • Detailed explanation of C ා – Interface

    Time:2020-10-12

    definition In C ා language, the inheritance relationship between classes only supports single inheritance, while the interface is designed to realize multiple inheritance relationships. A class can implement multiple interfaces at the same time, and can inherit other classes while implementing interfaces, and interfaces can also inherit. Whether it is the inheritance between classes, the […]