• Slice of go language foundation


    This paper mainly introduces slice in go language and its basic use. Because the length of the array is fixed and the length of the array is a part of the type, the array has many limitations. For example: func arraySum(x [3]int) int{ sum := 0 for _, v := range x{ sum = sum […]

  • Cut the rope


    The ingenious way to solve the problem lies in the deep understanding of the essence of the problem problem There is such a programming problem in Jianzhi offerHere is a rope of length n. please cut the rope into m segments of integer length (M and N are all integers, n > 1 and M […]

  • ABAP regular expression verification of Excel data


    FUNCTION ZTEST_XIAOY_CHECKTF. *”———————————————————————- *”*” local interface: *” IMPORTING *” REFERENCE(IV_TABNAME) TYPE TABNAME *” TABLES *” IT_DATA *” ET_MESSAGE STRUCTURE ZSHR_MESSAGE *”———————————————————————- DATA: dyn_table TYPE REF TO data, ”gs_display type ref to data, lo_descr type ref to cl_abap_structdescr, lt_fields type ddfields, lv_zz type string, ls_fields like line of lt_fields, ls_message type zshr_message, lv_text type string, lv_line […]

  • . net send HTTP request


    string postData = “appKey=” + appKey;// parameter postData += (“&appSecret=” + appSecret); var request = (HttpWebRequest)WebRequest.Create(url); request.Method = “POST”;// Request method request.ContentType = “application/x-www-form-urlencoded”;// Request content type var data = Encoding.UTF8.GetBytes(postData);// Get length request.ContentLength = data.Length; Stream newStream = request.GetRequestStream(); //send newStream.Write(data, 0, data.Length); newStream.Close(); //get WebResponse response = request.GetResponse(); newStream = response.GetResponseStream(); StreamReader reader […]

  • File copy of Java IO stream


    File copy Using byte stream to copy files Here we need to know how the computer processes Chinese? First, read a byte. If it is considered that there is no conversion, then the system processes Chinese according to the current encoding table [the first number of Chinese is generally negative]. When reading a byte, if […]

  • What is dip of LCD


    Is the abbreviation of density independent pixel, which refers to the abstract sense of the pixel. It’s related to the screen density of the device. It’s a unit in Android. Dip and DP are the same. The official statement of Google is as follows:    Density-independent pixel (dp)   A virtual pixel unit that you should […]

  • Python brush topic: Longest palindrome substring (string)


    Title Description Given a string containing only lowercase letters, find the length of its longest palindrome substring. Palindrome string refers to the character string with left and right symmetry. Thinking of solving problems When the string is not empty, the palindrome substring is at least one character, that is, the initial length is 1. When […]

  • Introduction and use of array


    Arrays in JavaScript are often used to store multiple values in a single variable. An array is a collection of data, represented as a continuous memory address (stored in heap memory) in memory. The purpose of creating an array is to save more data. Array concept and syntax Concept: an array is a special variable […]

  • Java array


    array concept Array array is a collection used to store multiple data of the same type. If you want to get the element value in the array, you can get it through the subscript of the element, which starts from 0. Create array Generally divided into dynamic initialization and static initialization Dynamic initialization: int [] […]

  • Slice and array in golang


    1. Arrays in golang     Array is a basic data structure with a fixed length. In golang, like C language, once an array is created, its length cannot be changed. The empty position of the array is filled with 0, and the array is not allowed to cross the boundary. Some basic operations of […]

  • Go language introduction series (3): array and slice


    Introduction to go Installation and use of go A summary of the basic grammar of go language introduction series (2) 1. Array arrayUsed to store several variables of the same typeaggregate. Each variable in the array is calledElements of an array, each element has a numeric number——Array subscript, which starts from 0 and is used […]

  • Several ways of defining string in C language


    1. What is a string? The so-called string is essentially an array of special characters ending in ‘\ 0’;   2. What should be paid attention to in the process of defining strings Since a string is essentially an array of special characters ending in ‘\ 0’, when defining a string, you must ensure that […]