Tag:Construction method

  • [flutter 2-11] flutter handle tutorial UI layout and widget – list listview

    Time:2021-11-23

    By VladSource Vlad (official account: fulade_me) ListView ListViewIt is a very common control on the mobile terminal, which is inseparable in most display scenariosListView。 stayFlutterMiddle pairListViewThe encapsulation of is also very good. A few lines of code can meet our needs to layout a rolling list. Let’s take a look at the constructor: ListView({ /// […]

  • Spring — IOC, Di, auto assembly

    Time:2021-11-20

    What is IOC The full name of IOC is inversion of control,The so-called control reversal is for the program itselfIn the past, we used to create objects by ourselves through new, but now we give this power to spring to help us create and manage objects, and the control over objects is reversed to spring […]

  • [flutter 2-12] flutter handle tutorial UI layout and widget – grid list GridView

    Time:2021-11-20

    By VladSource Vlad (official account: fulade_me) GridView GridViewIt is an easy-to-use grid layout control. Many of its properties are the same as the listview mentioned above. Repeated properties will not be described here. We focus on initialization methodsGridView.countThere are also two agentsSliverGridDelegateWithFixedCrossAxisCount、SliverGridDelegateWithMaxCrossAxisExtentParameters and use. GridView.count Let’s look at it firstGridView.countConstructor for GridView.count({ /// key Key […]

  • Play with object method references of Java lambda expressions

    Time:2021-11-15

    What is a method reference? Lambda also has a very important function, which is method reference. Method reference can be understood as a simple way to write lambda expressions. Method reference is an existing method or constructor (function) used to directly access a class or instance. It is more concise, more readable and more reusable […]

  • Construction method reference of Java lambda expression

    Time:2021-10-25

    What is a method reference? Lambda also has a very important function, which is method reference. Method reference can be understood as a simple way to write lambda expressions. Method reference is an existing method or constructor (function) used to directly access a class or instance. It is more concise, more readable and more reusable […]

  • Creating threads using thread class in Java multithreaded programming

    Time:2021-10-22

    There are two ways to create threads in Java: using the thread class and using the runnable interface. When using the runnable interface, you need to create a thread instance. Therefore, whether a thread is established through the thread class or the runnable interface, an instance of the thread class or its subclass must be […]

  • Imitation of circular progress bar 2 – use of custom attributes

    Time:2021-9-28

    Custom attributes are mainly divided into three steps: 1: Create a new XML file in the values folder to manage your defined attributes. You can also directly add it to the existing styles.xml file. I am the new folder (background_color), In folderMiddle addition of,Indicates that the attribute added here belongs to Custom. Add an attribute […]

  • How does spring IOC perform dependency injection

    Time:2021-9-28

    Dependency injection (DI) DI(Dependency Injection), spring IOC is not a technology, but an idea, which can guide us to design loosely coupled program code. The role of spring IOC is reflected in two aspects: one is how to assemble beans into the container and how to obtain beans from the container, and the other is […]

  • Redis 4 questions

    Time:2021-9-26

    Why is redis single thread fast? 1) . pure memory operation2) . non blocking IO multiplexing3) . single thread avoids frequent context switching How does redis delete the cache? Scheduled deletion + inert deletion1) . select some keys at random every 100ms – > check the expiration time2) When querying a key – > check […]

  • Four ways to create thread pool from source code analysis

    Time:2021-9-22

    Summary:From the source code of creating thread pool, this paper deeply analyzes what methods can create thread pool. This article is shared from Huawei cloud community《[high concurrency] analyze the ways to create thread pools from the perspective of source code》, author: Glacier. In the high concurrency field of Java, thread pool has always been an […]

  • Callable (simple)

    Time:2021-9-19

    1. Can have return value2. Exceptions can be thrown3. Different methods, run() / call() Code test package com.hudu.demo01.callable; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.FutureTask; public class CallableTest { public static void main(String[] args) throws ExecutionException, InterruptedException { // new Thread(new MyThread()).start(); Class implements the runnable () interface // new Thread(new Runnable()).start(); // new Thread(new FutureTask<V>()).start();// […]

  • How to understand @ Autowired in spring?

    Time:2021-9-9

    @Introduction to Autowired @The Autowired annotation is used to describe the properties, construction methods, set methods, configuration methods, etc. in the class. It is used to tell the spring framework to inject values (DI) into the properties according to the specified rules. @Getting started with Autowired applications Based on the following API design, code implementation […]