• Python string splicing


    Splicing (connecting) strings in Python is very simple. You can directly write two strings close together. The specific format is as follows: strname = “str1” “str2” Strname represents the string variable name after splicing, and STR1 and STR2 are the string contents to be spliced. With this approach, python will automatically splice two strings together. […]

  • Regular expressions – theoretical basis


    Regular expressions – theoretical basis Moved from personal blog, original siteRegular expressions – theoretical basis What is a regular expression?It can be called a rule. It is an object describing the pattern of characters. The letters and numbers in regular expressions are matched according to the literal meaning.Powerful string matching tool How to build a […]

  • What do Google interview questions look like? Be hanged after watching


    Google interview questions constructed: the knight’s dialerhttps://medium.com/@alexgolec… As an engineer and interviewer of Google, today is the second time that I have published an article to share the interview suggestions of a technology company.Here is a statement: This article only represents my personal observations, opinions and suggestions. Don’t take it as an official suggestion or […]

  • The principle of global dictionary for exact de duplication in Apache kylin 4.0


    Explanation of global dictionary Why do you need a global dictionary In the field of OLAP data analysis, count distinct is a very common requirement. According to the requirements of the result, it can be divided into approximate de duplication and accurate de duplication. In large-scale data sets, it is still very challenging to achieve […]

  • Blue Bridge Cup Sanyang xianrui


    For more articles, please pay attention to the official account of “BLOG of the sea“. problem Observe the following addition formula: Auspicious and bright +Sanyang xianrui —————- Sanyang is lucky Among them, the same Chinese characters represent the same number, different Chinese characters represent different numbers, and “three” and “Xiang” cannot be zero. Please figure […]

  • Implementation of distributed ID


    In any system, there is a need for a unique number to identify a record or a message, such as an order record or a message sent by message middleware. In the micro service system, the ID generated by each micro service can not be repeated, and it is better to ensure a certain self […]

  • C # split Chinese and numeric strings


    For example, to split “hehehehe9086676 drink 999”, when type = 0, the Chinese string “hehehehedrink” is returned, and type = 1, the numeric string “909086676999” is returned, private string GetStrings(string str,int type=0) { IList strList = new List(); MatchCollection ms; if (type == 0) { ms = Regex.Matches(str, @”\D+”); } else { ms = Regex.Matches(str, […]

  • K8s actual combat (5) | the principle of statefulset controller


    preface In deployment, you can close and start a pod at will, and the relationship between pods is equal. When there is a master-slave relationship between pods, and each pod corresponds to the content of a specific storage volume, the deployment controller cannot be used to operate pods at will. We need to use a […]

  • Java Concurrent Programming — deep understanding of thread pool


    1. Thread pool Thread pool refers to managementA set of isomorphic worker threadsResource pool for. 1.1 benefits of using thread pool Reduce resource consumption。 By reusing the created threads, the consumption caused by thread creation and destruction can be reduced. Improve response speed。 When the task arrives, the task can be executed immediately without waiting […]

  • Regular expression metacharacter


    Common metacharacter table Match character Metacharacter explain \ Marks the next character as a special character, or a literal character, or a backward reference, or an octal escape character. For example, ‘n’ matches the character ‘n’. ‘\ n’ matches a newline character. The sequence ‘\ \’ matches’ \ ‘and’ \ (‘matches’ (‘ \cx Matches the […]

  • Leetcode — add a step on the pit record


    Given aintegerComposed ofNot emptyA nonnegative integer represented by an array.The highest digit is stored in the first place of the array, and each element in the array only storessingleNumbers.You can assume that this integer does not start with zero except for the integer 0. Example 1:Input: [1,2,3]Output: [1,2,4]Explanation:The input array represents the number 123. Example […]

  • Proficient in regular expressions: Chapter 2 (1)


    Proficient in regular expressions: Chapter 2 This article focuses on regular expressions, just because Perl supports regular expressions better than other languages, so choose Perl. Please don’t care too much about Perl. The necessary pre knowledge will be mentioned here. Let’s start our discussionRegular tour。 In this article, we will use · Instead of the […]