Tag:Example

  • Mbprogresshud source code (I)

    Time:2019-11-22

    This post records the learning process of mbprogresshud source code. Starting from the official demo project, we can learn its code structure step by step, learn the technology it uses, and experience the author’s programming ideas. I. structure Let’s first look at the structure of mbprogresshud and see the definition of its class.1. Mbprogresshud is […]

  • C-nested loop

    Time:2019-11-21

    I. Introduction Nested loops: while, for, and do… While loops use one or more nesting. Two. Example Output multiplication table (nesting of loops) //Multiplication formula for (int i = 1; i <= 9; i++) { for (int j = 1; j <= i; j++) { Console.Write(“{0}*{1}={2}\t”, i, j, i * j); } Console. Writeline(); // […]

  • MySQL asynchronous replication

    Time:2019-11-21

    Replication is the foundation of high availability, and the underlying middleware such as MHA and MYCAT all rely on the replication principle Master master master instance Slave Slave instance Classification: default asynchronous replication, semi synchronous replication after version 5.5, new gtid replication in version 5.6, multi-source replication in version 5.7, parallel replication and enhanced semi […]

  • Analysis of source code of vuex (I) usage and code structure

    Time:2019-11-21

    Vuex is a state management mode specially developed for vue.js application. It uses centralized storage to manage the state of all components of the application. Note: you need to load the Vue file before you can use it (vue.use (vuex) is required to install the vuex plug-in under node.js, which can be loaded directly in […]

  • The issue of C + + relief

    Time:2019-11-20

    N (n < 20) people stand in a circle, and the number is 1 ~ n anticlockwise. There are two officials. A counts counter clockwise from 1, and B counts clockwise from n. In each round, the number of officials a is k, and the number of officials B is m. The next person (1 […]

  • C language package, unpack and browse package file information based on form command line

    Time:2019-11-19

    #include#include#include#include#include#include#include using namespace std; int count=0;  typedef struct Note{  char path[50];  struct Note *next; }Note,*Lnote;  typedef struct Node {  char name[20];  unsigned int size;   struct Node *next;     }Node,*List;  List creat(void); void add(List *head,char *Tname,int Tsize); void bwrite(char *fn);  void file_in(char *Path_r,char *Path_w); void unzip(char *Path_file,char *Path_out); void lookthepack(char *path); Lnote Tcreat(void); void Tadd(Lnote *Thead,char *Path); void zip(char *ar1,char *ar2);     void lookthepack(char *path){  int i,j;  Node p;  FILE *fp;   if((fp=fopen(path,”rb”))==NULL){   printf(“Can’t open %s\n”,path);    exit(1);   }   fseek(fp,0L,SEEK_SET);    rewind(fp);   fread(&j,sizeof(j),1,fp);Printf (“the total number […]

  • Default interface method of C × 8.0

    Time:2019-11-19

    Example Look at the example directly There is such an interface:    Then there are three implementation classes:    Then call in the main method:  Up to now, the program can be compiled and run successfully.    IPersonInterface modification  All of a sudden, I wanted to add a new feature to all humans, for example, […]

  • C-bubble sort

    Time:2019-11-17

    I. definition Bubble sorting: to sort the elements of an array from large to small or from small to large. Note: bubble sorting test array and for understanding, mainly for interview; Two. Analysis. int[] nums={9,8,7,6,5,4,3,2,1,0}; 0 1 2 3 4 5 6 7 8 9 The first comparison: 8 7 6 5 4 3 2 […]

  • JS error cannot read property ‘getattribute’ of null

    Time:2019-11-16

    Page echarts.js reports an error: uncaught typeerror: cannot read property ‘getattribute’ of null It is found that the reason for finding the error information is because the element instantiated echarts does not exist. Check the official document and find out: //Initialize the echarts instance based on the prepared DOM var myChart = echarts.init(document.getElementById(‘main’)); Initialize the […]

  • Java extracts text and pictures from word

    Time:2019-11-15

    This article introduces how to extract or read the text and pictures in word documents through Java. Extracting text and pictures here includes extracting text and pictures in the body of the document as well as in the header and footer. Using tool: free ‚ spire.doc for Java (free version) JarFile import method (Reference): Method […]

  • What are the similarities and differences among the three styles of for loops in JS?

    Time:2019-11-15

    Reprint please indicate the source: grapevine official website, grapevine provides professional development tools, solutions and services for developers, enabling developers.Source: https://blog.bitsrc.io/3-flags-of-the-for-loop-in-javascript-and-when-to-use-them-f0fb5501bdf3   In learning any development language, the for loop is an essential syntax that may be used by all developers. It’s so classic that every development language includes at least one version of the […]

  • Daily news of gocn (September 23, 2019)

    Time:2019-11-15

    1. Check the code optimization process of go http://xargin.com/go-compiler-opt 2. Go learning notes only needs one example to explain what closure https://segmentfault.com/a/119000020461487 3. Use pprof and go torch to troubleshoot the performance problems of golang https://www.felix021.com/blog/read.php? 2210 4. Why the CPU occupation of go module cannot be recovered after the downstream service jitter is recovered? […]