Tag:character

  • strand

    Time:2021-12-31

    strand Basic concepts definition character string(string): a finite sequence of multiple or zero characters. String name:S String valueCharacter sequence in: ”. Length of string: number of characters in the string n. When n = 0Empty string。 Substring: a subsequence of any consecutive characters in a string Main string: string containing substrings. The position of the […]

  • Line text line fixed length fill tool

    Time:2021-12-30

    Line text line fixed length fill tool Line text line fixed length fill tool This tool can use fixed characters to fill all text lines that do not reach the specified length in the text string list. If the text line exceeds the specified number of characters, it will be ignored, and spaces, etc. will […]

  • Formal learning of for loop structure

    Time:2021-12-28

    Assign initial value to cyclic variable) “means that no initial value is assigned to cyclic variable. Omit “expression 2 (loop condition)” and do no other processing, and the loop is always executed (dead loop),StarpoolBecause int is an integer, the decimal part will be omitted. For example, the result of 765 / 100 is 7 ten […]

  • IOS algorithm (basic) — delete all adjacent duplicates in the string

    Time:2021-12-28

    Given the string s composed of lowercase letters, the duplicate deletion operation will select two adjacent and identical letters and delete them. Repeat the deduplication operation on s until the deletion cannot continue. Returns the final string after all deduplication operations are completed. The answer is guaranteed to be unique. example Input:“abbaca” Output:“ca” Explanation:For example, […]

  • Automi is a go stream processing API

    Time:2021-12-27

    [translation]Original addressIn stream processing, the data is decomposed into sequence elements, which can be used for subsequent processing of large data sets. This article is aboutAutomiThis project is a go package that supports developers to create projects and use stream processing methods to process data.Automi GitHub addresshttps://github.com/vladimirvivien/automi In general, automi provides the following features: Use […]

  • [leetcode] string related

    Time:2021-12-27

    leetcode 3. No duplicate longest string Title Description Given a string s, please find the length of the longest substring that does not contain duplicate characters. thinking Use MP to record the last position of the character, and use last to record the current starting position. In case of duplicate characters, calculate ANS and update […]

  • Redis single node installation and use

    Time:2021-12-26

    1. Configure Alibaba cloud Yum source  Download profile     wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repoGenerate cache     yum makecache 2. Install redis     2.1 installation dependency yum install -y gcc-c++ gcc tcl     2.2 upload and decompress the compressed package     tar -xvf redis-3.0.0.tar.gz   2.3 compilation   cd redis-3.0.0   make     # make test Create installation directory […]

  • Java learning notes (continuously updated)

    Time:2021-12-26

    Some commonly used Summary of common statements Scanner in = new Scanner (System.in); // Create a new input method MOOC notes Variable declaration int num; int a, count = 10, b; double result; Numeric type conversion If a is of type float, use (int) a to convert it to an integer. judge floating-point comparisons In […]

  • Go’s 100 day trip – 08 string

    Time:2021-12-23

    catalogue brief introduction UTF-8 characters Common operations of string brief introduction String is a very basic type in various programming languagesGoThe string in is simply understood as an array, and the elements in the array arebyteType. Therefore, it basically has all the characteristics similar to array. for examplelenYou can return the number of bytes of […]

  • Implementation principle of string in go

    Time:2021-12-23

    Implementation principle of string in go Let’s review what we shared last time Shared the simple single point deployment of etcd, the package installation used by etcd, and the problems encountered Etcd setting and obtaining key Simplification of watch monitoring key of etcd Lease and survival mechanism of etcd Simple implementation of etcd distributed lock […]

  • Build binary sort tree and find and delete nodes (recursive binary list)

    Time:2021-12-22

    #include<iostream> using namespace std; #define ENDFLAG ‘#’ typedef struct ElemType{ char key; }ElemType; typedef struct BSTNode{ ElemType data; BSTNode *lchild,*rchild; }BSTNode,*BSTree; //Search BSTree SearchBST(BSTree T,char key) { if((!T)|| key==T->data.key) return T; else if (key<T->data.key) return SearchBST(T->lchild,key); else return SearchBST(T->rchild,key); } //Insert void InsertBST(BSTree &T,ElemType e ) { if(!T) { BSTree S = new BSTNode; S->data […]

  • More than 60 tools are commonly used in Vue

    Time:2021-12-22

    1. Mailbox export const isEmail = (s) => { return /^([a-zA-Z0-9_-])[email protected]([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test(s) } 2. Mobile phone number export const isMobile = (s) => { return /^1[0-9]{10}$/.test(s) } 3. Telephone number export const isPhone = (s) => { return /^([0-9]{3,4}-)?[0-9]{7,8}$/.test(s) } 4. URL address export const isURL = (s) => { return /^http[s]?:\/\/.*/.test(s) } 5. String export […]