• The difference between memory and hard disk


    Many computer Xiaobai still have questions, that is, what is the difference between memory and hard disk? Why is the same 300 yuan, buy memory can only buy 8GB capacity, and hard disk can buy more than 250GB. Memory is also called internal memory. You can understand it as a transfer station for the exchange of […]

  • Go slice explanation (understanding is the key)


    preface Through the last blog post, we learned about the use of arrays, but arrays have a fatal defect, that is, fixed size. This feature can not meet our usual development needs, so the go slice was born. The memory distribution of slices is continuous, so you can treat slices as an array with variable […]

  • Go’s 100 day trip – 06 array and slice


    catalogue array Slice array GoThe array of is basically the same as other languages. It is a sequence of specific type elements with fixed length, which is basically the characteristic of all language arrays. Compared with other languages, the main difference lies in the writing of declaration and initialization. The following is a simple declaration […]

  • Go returns a new slice that removes an element without affecting the original slice


    A small pit found when using go In Python, you can return a new list that removes the elements with subscript i in the original list. You can use slice syntax to cut the lists before and after subscript i and combine them into a new slice, which is obvious. list1=[1,2,3,4,5] list2=list1[:2]+list1[3:] print(list1,list2) # [1, […]

  • HashMap source code


    HashMap is an array + linked list + red black tree structure Field properties public class HashMap<K,V> extends AbstractMap<K,V> implements Map<K,V>, Cloneable, Serializable { //This field is used for version consistency verification during serialization and deserialization private static final long serialVersionUID = 362498820763181265L; //The initial capacity of the default HashMap collection is 16 (must be […]

  • 11. Kubernetes note volume storage volume (II) PV and PVC storage


    preface Volume provides a very good data persistence scheme, but there are still deficiencies in manageability. As can be seen from the previous example, to use volume, pod must know the following information in advance: Where and where the current volume comes from, local and network. Type of storage volume and know how to configure […]

  • Implementation principle of slice in go


    Implementation principle of slice in go Last time we sharedcharacter stringLet’s review the relevant contents What is the shared string Why can’t the character string in go be modified How to build the string go source code? The source code file is insrc/runtime/Lowerstring.go String and[]byteOrigin and application scenario of String and[]byteMutual conversion If you are […]

  • Slice slice


    Slice slice Disadvantages of arrays 1. The array in go is a value type. In other words, if you assign an array to another array, you actually copy the whole array 2. If the array in go is used as the parameter of the function, the actual parameter passed is a copy of the array, […]

  • Golang bottom implementation series — bottom implementation of map


    Golang bottom implementation series — bottom implementation of map This paper is based on golang 1.14.13 The underlying data structure of map The underlying implementation of map is a hash table, and the implementation process of map is actually the process of implementing hash table. Map mainly contains two structures:hmapandbmap。 Hmap structure: BMAP structure: Map […]

  • Go: Map Design (1)


    [translation]Original addressThis article is the first in a series of three articles, each of which will cover a part of go map. It is recommended that you read it in order.Map type is a built-in type of go language, which is implemented by the principle of hash table. In this article, we will explore the […]

  • How to partition Windows Server? There are three common types of windows server disk partition


    Original text from: https://www.sohu.com/a/272133008_ one hundred million two hundred and seventeen thousand one hundred and seventy-eight I’m afraid the link will fail, so reprint this article, the analysis is very thorough and clear at a glance! record. ——————————-START———————————– Windows Servers generally have their own windows disk partition tools, so it is completely unnecessary to use […]

  • Dynamic expansion of SCST shared disk


    SCST shared disks support online capacity expansion. The operation is as follows: SCST server First, there is a ZFS storage volume, and now its capacity is expanded from 15g to 20g. zfs set volsize=20G tank/vol Modify the size attribute of device in SCST scstadmin -set_dev_attr device1 -attributes size=21474836480 -noprompt ISCSI client Rescan target iscsiadm -m […]