Tag:method

  • How to use hooks in react

    Time:2022-6-10

    useState const [ count ,setCount] = useState(parameter) Count saves the parameters in usestate. The parameters can be ordinary parameters, function and array. If there are no parameters, they are undefined Setcount is used when changing the value in count Hooks can only be used in react function components or custom hooks, not directly in JS […]

  • 2021-php interview questions – object oriented

    Time:2022-6-10

    Series of articles: 2021-php interview question “database” related knowledge points interview summary 2021-php interview questions – object oriented 1. What is object-oriented? (answers with understanding)Object oriented is an idea based on process oriented, that is to say, object oriented is to realize functions through objects, encapsulate functions into objects, and let objects realize specific details. […]

  • Tips for using list to map (collectors.tomap) in java8

    Time:2022-6-10

    In actual projects, we often use the list to map operation. In the past, we might use the for loop traversal method. for instance: Define the class first: /Simple object Then there is a list: List<User> userList = Lists. newArrayList( The format we want to convert to map is: A-> Zhang San Past practice (cycle): […]

  • Go basic knowledge sorting (III)

    Time:2022-6-10

    Go basic knowledge sorting (III) structure type Person struct { name string sex int } func main() { //Recommended writing person := Person{ Name: “Zhang San”, sex: 1, } //Not recommended Person = person{“Lisi”, 1} p := New(Person) //Will initialize name= “”, sex = 0 } Interface //Some features of the interface: //The name of […]

  • C\parallel computing (parallel and parallelquery)

    Time:2022-6-10

    parallel English[ ˈ pær ə Lel] beauty[ ˈ pær əˌ l ɛ l]adj. parallel; Same or similar; Parallel connection; ParallelAdv. in paralleln. Parallel lines (faces); Analogues; Analogy; WeftVt. make parallel; Be on a par with; Compare with; compare with; Similar to System.Threading.Tasks.Parallel ParallelMainly providesForSeries of methods andForEachA series of methods that process all items in […]

  • Go concurrent performance improvement killer pool

    Time:2022-6-10

    The go concurrent series is compiled based on my absorption and understanding of teacher Chao Yuepan’s go concurrent programming practice class. If there is any deviation, please correct it~ Why pool is needed Go is a language that supports automatic garbage collection. For programmers, we can create objects whenever we want, without caring about resource […]

  • How to improve the running efficiency of Python

    Time:2022-6-10

    Python is a language that pays more attention to readability and efficiency. Especially, compared with Java, PHP and C, these two advantages make it very popular among developers. Python is an excellent language. It allows you to do many operations with very little code in a short time. Not only that, it also easily supports […]

  • [ubuntu] SSH login to docker

    Time:2022-6-10

    Method 1 If the SSH service has been set for the image, you can: docker run -d your_image:tag /usr/sbin/sshd -p 12345 -D -dIt is the instruction of docker and runs in the background /usr/sbin/sshd -p 12345 -DThe command that the container runs to open the SSH connection of port 12345 -Interpretation of D Do not […]

  • Java (JDK) installation method (CentOS environment)

    Time:2022-6-10

    Derived fromJava traceJapanese technical communityOriginal addresstranslatorDreamland of dreamsSee てくれてあがとうござい!!! Java (JDK) method (CentOS environment) Java (JDK) installation method (CentOS environment) The Java se development kit (JDK) is a development tool corresponding to the Java se platform. When using java to develop applications, the Java se platform will provide basic functions. Here, let’s explain how to […]

  • [masonry] detailed explanation and three constraint methods and precautions

    Time:2022-6-9

    Masonry essence Masonry is the systemAutoLayoutPackaging, including manyAPI, all for the systemAPIPrimary and secondary packaging was carried out. typedef NS_OPTIONS(NSInteger, MASAttribute) { MASAttributeLeft = 1 << NSLayoutAttributeLeft, MASAttributeRight = 1 << NSLayoutAttributeRight, MASAttributeTop = 1 << NSLayoutAttributeTop, MASAttributeBottom = 1 << NSLayoutAttributeBottom, MASAttributeLeading = 1 << NSLayoutAttributeLeading, MASAttributeTrailing = 1 << NSLayoutAttributeTrailing, MASAttributeWidth = 1 […]

  • Springcache caching framework

    Time:2022-6-9

    Redis6 overview https://www.jianshu.com/p/901dc5a0c683 file https://docs.spring.io/spring-framework/docs/current/reference/html/integration.html#cache catalogue 1. Introduction2. Build project3. Annotation, expression syntax4. Custom cache and cache penetration solution brief introduction 1. Overview Spring has defined org. since 3.1 springframework. cache. CacheAnd org springframework. cache. CacheManager, an interface to unify different caching technologies; It also supports the use of jcache (jsr107) annotations to simplify our […]

  • [Dubbo source code] 22 A complete RPC call

    Time:2022-6-9

    preface After such a long time, all the preparations for RPC communication are ready when Dubbo is started. Service exposed Party: Register yourself in the registry When the netty server is enabled, it is used to accept requests Service consumer: Register yourself in the registry Get the service list of a service The invoker object […]