Tag:Pointer

  • [IOS] a collection of job interview questions

    Time:2020-12-6

      1. Which timers do you often use in the development process? Is there any error in the timer time? If so, why? In IOS, nstimer, cadisplay link and GCD timers are often used. Nstimer and cadisplay link are implemented based on nsrunloop, so there are errors. GCD timers only rely on the system kernel […]

  • Best of the year sync.Pool Detailed explanation

    Time:2020-12-3

    Recently, I encountered the problem of GC in my work: many objects were created repeatedly in the project, which caused the workload of GC to be huge and CPU dropped frequently. Ready to usesync.PoolTo cache objects and reduce GC consumption. In order to use it more smoothly, I specially studied it and formed this article. […]

  • Programming code: C language to achieve the effect of snow, this winter, snow is very beautiful

    Time:2020-12-2

    preface 1. This paper focuses on how to make a snow that only you can see on the console 2. It is a simple cross platform, mainly c language 3. The animation adopts 1s 40 frames, and the snowflake has X-axis speed and y-axis speed 4. Relatively simple, you can give students as C language […]

  • Interview success comes from foundation and experience

    Time:2020-12-2

    In the past year, many people were dissatisfied with the company’s lack of welfare, poor interpersonal relationship, and no development prospects. They wanted to change a job to start a new year. Are you ready? The following is an interview material I sorted out. I wanted to use it myself, but the company gave me […]

  • This is a simple diagram of data structure notes (1)

    Time:2020-12-1

    preface The author is self-taught data structure, deeply aware of the knowledge bias in the booktheoryandcodeAnd ignore logic itself. The main reason is that there are few pictures and many words, so that scholars do not have enough understanding of logic after learning, and eventually become a common result in Universities – endorsement.(I have been […]

  • Lesson 2

    Time:2020-11-30

    Today, I learned the structure and function of golang. There are still some doubts about the operation of the pointer that returns the structure. How to allocate memory and release memory in golang, the pointer can also be operated through. If it is used directly regardless of other objects, it is really convenient. This work […]

  • Detailed explanation of the best [golang] map of the year

    Time:2020-11-29

    This article mainly talks about the specific implementation process of map assignment, deletion, query and expansion, which is still from the perspective of the bottom. Combined with the source code, read this article will thoroughly understand the underlying principle of map. What I want to make clear is that the basic usage of map is […]

  • Realization of redis linked list and linked list node

    Time:2020-11-28

    The encoding of the list object can beziplist(compressed list) orlinkedlist(double ended list) Each linked list node uses onelistNodeStructure to express: typedef struct listNode { //Front node struct listNode *prev; //Post node struct listNode *next; //The value of the node void *value; } listNode; MultiplelistNodeIt can be done throughprevandnextThe pointer forms a double ended acyclic list […]

  • Stack chain storage

    Time:2020-11-27

    Linked list implementation stack Create three files: stacklinked. H, stacklinked. C, stacklinkedtest. C stackLinked.h #ifndef STACK_LINKED_H_ #define STACK_LINKED_H_ #ifdef __GNUC__ #define DEPRECATED __attribute__( (deprecated) ) #elif defined(_MSC_VER) #define DEPRECATED __declspec( deprecated ) #else #define DEPRECATED #endif #ifndef PTOI #define PTOI( p ) ((int32_t)(int64_t)(p)) #endif #ifndef ITOP #define ITOP( i ) ((void *)(int64_t)(i)) #endif #define ADT […]

  • Record the interview process of Tencent go development post

    Time:2020-11-26

    Job hopping is the only way for everyone in the workplace. The author is also a layman. In addition, the company’s leaders are not right for people. Therefore, with the encouragement of headhunters, I have the impulse to try. After all, it is a taboo of military strategists to build a car behind closed doors. […]

  • How to conduct version rollback gracefully

    Time:2020-11-26

    In the process of iterative development, I believe that many people will have the time of error submission (at least Liangxu has had this experience several times). In this case, rookie programmers may drive a shock, nervous at a loss. And senior programmers will smile, touch the shining forehead, and then silently version back. For […]

  • Leetcode 415. String addition | Python

    Time:2020-11-26

    415. String addition Source: leetcode https://leetcode-cn.com/problems/add-strings subject Given two non negative string integers num1 and num2, calculate the sum of them. be careful: The length of num1 and num2 is less than 5100 Num1 and num2 contain only numbers 0-9 Neither num1 nor num2 contains any leading zeros. You can’t use any of the built-in […]