Tag:copy

  • Elasticsearch day 2 installation and configuration of elasticsearch and elasticsearch head

    Time:2022-5-6

    Today’s goal Installation, configuration and integration of elasticsearch and elasticsearch head in PHP laravel project 1. Selection of ES version Before using ES, we must first choose an appropriate version. Choosing the latest version is always an infallible choice. At present, the latest version of ES official website is 8.0.0-alpha 2, which is published in […]

  • C + + basic-5-operator overloading (plus sign, shift left, increment, assignment, relationship, function call)

    Time:2022-5-5

    5. Operator overloading   5.1. Overloading of plus operator 1 #include 2 using namespace std; 3 4 // overload of plus operator 5 6 class Person { 7 public: 8 //1. Member function overload “+” 9 Person operator+(Person& p) { 10 Person temp; 11 temp.m_A = this->m_A + p.m_A; 12 temp.m_B = this->m_B + p.m_B; […]

  • List foundation of Python

    Time:2022-5-2

    ”’List: there are all types of data, and different types of data can be storedCan be accessed by subscript. Subscript starts at 0 ”’ List creation list_1 = [1,2,3,’4′] list_2 = list() ergodic for i in list_1: print(i, end=’ ‘) print(” “) Get list data according to subscript value = list_1[-1] #Print (‘last element:% s’% […]

  • Installing Chenqiao Wubi input method under Linux

    Time:2022-4-30

    be careful:systemessentialinstallChinput input method, otherwise you can’t use the intelligent Chen bridge.   1. First download Chinput and chznwb (smart Chen bridge)installPackage:   # wget http://www.alinux.cn/upload/chznwb.tar   # wget http://www.alinux.cn/upload/Chinput-3.0.2.src.rpm   2.installChinput (if yousystemalreadyinstallIf it is used and can be used, skip!)   # rpm -ivh Chinput-3.0.2.src.rpm   theninstallchznwb.tar   # tar xvf chznwb.tar   […]

  • JS common

    Time:2022-4-25

    Convert array to object This method is generally the first thought when converting arrays into objects: var obj = {}; var arr = [“1″,”2″,”3”]; for (var key in arr) { obj[key] = arr[key]; } console.log(obj); // {0: “1”, 1: “2”, 2: “3”} Simple and fast methods: const arr = [1,2,3]; const obj = {…arr}; console.log(obj); […]

  • K8s deploy MySQL master-slave

    Time:2022-4-24

    1. Environment Host list: node1 10.10.10.25 node2 10.10.10.26 node3 10.10.10.27 Node 1 k8s’s management node NFS serverWork node of node2 k8sWork node of node3 k8s 1. Create data directory Create MySQL data directory based on NFS in node1: mkdir /k8s/ chmod 777 k8s cd k8s mkdir mysql cd mysql mkdir master mkdir slave vi /etc/exports […]

  • Implementation of handwritten strcpy and memcpy code

    Time:2022-4-21

    This article talks about the code implementation of strcpy and memcpy, which are also common questions in C and C + + interviews. 1. Handwritten strcpy First of all, a standardstrcpyThe implementation is as follows: char *strcpy(char* strDest, const char* strSrc) { assert( (strDest != NULL) && (strSrc != NULL)); char *address = strDest; while((*strDest++ […]

  • Basic use of elasticsearch (ES)

    Time:2022-4-20

    1. General I talked about the installation of elasticsearch before. Today, let’s talk about the basic use of elasticsearch. 2. Use of elasticsearch index The index is equivalent to a table in MySQL. 2.1 index creation 1) Head plug-in mode Select the index tab, click [new index], enter the index name, number of slices and […]

  • Apk to AAB (Android App bundle)

    Time:2022-4-20

    according toGoogle play policyRequirements: from August 2021, Google play will begin to require new applications to be published using Android App bundle (hereinafter referred to as AAB). This format will replace APK as the standard release format Under normal circumstances, AAB can be generated directly with the packaging of as to meet the requirements and […]

  • Self improvement: record of problems encountered by react and JavaScript in the project

    Time:2022-4-12

    Having just learned about Feynman learning method, I think it is necessary to record the problems encountered in project development, so as to continuously enrich my experience. This article is used to record the problems and solutions encountered in the process of the project to further deepen the impression. Problem 1: the problem and solution […]

  • Handwritten deep copy code

    Time:2022-4-11

    const obj1 = { age: 18, Name: ‘Qi Jing’, address: { city: ‘beijing’ }, arr = [1, 2, 3] } const obj2 = deepClone(obj1) obj2.address.city = ‘chengdu’ console.log(obj1.address.city) //Deep copy function deepClone(obj = {}) { if(typeof obj != ‘object’ || typeof obj ==null) { //If obj is not an array or object, or obj is […]

  • Take you to know about move, copy and clone in rust

    Time:2022-4-8

    move, copy, clone Original text:https://hashrust.com/blog/moves-copies-and-clones-in-rust/ This article onmove, copy, cloneDo not do Chinese translation, keep the taste in rust, and there will be no taste after translation. introduce Move and copy are basic concepts in rust. These concepts may be completely unfamiliar to developers from languages with garbage collection capabilities such as ruby, python, or […]