Tag:Cross the border

  • Guide to incomplete palindrome / String [using C + +]

    Time:2021-6-18

    Let’s look at the title: leetcode-9Palindrome, that is to say, forward reading and reverse reading are the same. For example, 12321 is a palindrome number and daaad is a palindrome string.If a string type is given, we can use [0] and. Size () – 1 to traverse the strings on both sides at the same […]

  • Go serves miraculous panic

    Time:2021-6-8

    This pit is relatively fresh. It was just filled on Monday, and it was still under cold air. – 1 – In byte skipping, all logs of our online service are collected to streaming log service and ES cluster through a unified log library. With the monitoring ability of “sang” level (Xin) strong (Bing) big […]

  • The way of C / C + + Learning

    Time:2021-6-6

    First of all, explain the problem of heap corruption deleted. The compiler reported an error mainly due to improper memory new / delete. If the compiler prompts heap corruption deleted and CRT detected that the application write to memory after end of Heap Buffer, the following aspects should be checked first: 1) Whether the space […]

  • The journey of leetcode [simple part] – 7. Integer inversion

    Time:2021-5-1

    subject Given a 32-bit signed integer, you need to invert the number on each bit of the integer.Given a 32-bit signed integer, reverse digits of an integer.Examples   1: Input:123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21 Personal thinking First of all, it should be noted that Chinese topics will cause misunderstanding. 32-bit signed integer […]

  • STL_ String container

    Time:2021-4-28

    1、 String concept String is a string type of STL, which is usually used to represent a string. Before using string, strings are usually represented by char *. String and char * can both be used to represent strings, so what’s the difference between them. Comparison between string and char *: String is a class […]

  • JVM – 01. What is a JVM

    Time:2021-4-24

    A series of articles: JVM – 01. What is a JVM JVM – 02. Program counter definition Jave virtual machine – the running environment of Java program (the running environment of Java binary bytecode) benefit Write once, run everywhere Automatic memory management, garbage collection function Array subscript out of bounds check polymorphic compare jvm jre […]

  • Detailed explanation of binary search algorithm

    Time:2021-4-17

    Binary search [toc] The most basic binary search int binarySearch(int[] nums, int target) { int left = 0; int right = nums.length -1; // Note while(left <= right) { Int mid = left + (right – left) / 2; // Note: if (right + left) / 2 is used, overflow will occur if(nums[mid] == target) […]

  • How to debug memory leak in Linux

    Time:2021-4-6

    Memory leak refers to the failure of a program to release memory that is no longer in use due to negligence or error. Memory leakage does not mean the physical disappearance of internal memory, but because of the design error after the application allocates a certain section of memory, it leads to the loss of […]

  • Segment error occurred when deleting drop-down items in qcombobox of QT

    Time:2021-1-2

    problem When clear() and removeitem() are used to clear and delete the drop-down items in qcombobox, the following two kinds of errors are reported through debugging: (1) Error in normal operation program: XXX / sogouinput / components (2) Error report through QT debugging Signal received  The inferior stopped because it received a signal from the […]

  • Leetcode 200. Python implementation of island number

    Time:2020-12-30

    Title Requirements: Thinking: Traverse the array. Whenever you encounter a piece of land, add one to the number of land, and change all the 1’s of this land to 0 Core code: res = 0 cur = [] #Traversing arrays for i in range(len(grid)): for j in range(len(grid[0])): #If the current land is land, change […]

  • How to locate segment errors with dmesg + addr2line without a core file

    Time:2020-12-7

    preface In the current network environment, the core file may not be left after the program crash. There are many reasons, such as the lack of storage space is one of the common reasons. At this point, we can only locate the problem according to the error log recorded by Linux. Linux commands involved This […]

  • Kafka Consumer

    Time:2020-9-23

    Kafka consumer consumption is divided into groups, and each partition in the topic will be allocated to only one instance in the same group. This is based on the queue mode. If you want to subscribe to an instance of the same topic, you need to specify a different group name. Required parameters bootstrap.servers Kafka […]