Skip to main content

Posts

Showing posts from June, 2021

3 new Java frameworks and tools for 2021-2022

Most Java frameworks are designed for long-running processes with dynamic behaviors, which are used to run variable application servers, such as physical servers and virtual machines. Since the release of Kubernetes containers in 2014, the situation has changed. The biggest problem with using Java applications on Kubernetes is optimizing application performance by reducing memory footprint, speeding up startup and response time, and reducing file size. Java developers are also always looking for easier ways to integrate shiny new open source tools and projects into their Java applications and daily work. This greatly improves development efficiency and encourages more companies and individual developers to continue to use the Java stack. Today, the editor of the Java training organization will come to tell you about 3 new Java frameworks and tools. 1.Quarkus Quarkus aims to develop cloud-native microservices and no-services in container orchestration platforms such as Kubernetes with a

What are the differences between react and vue? What is mvvm and what is the difference principle of mvc ? What is a closure, how to use it, and why to use it? What is margin overlap problem and the solution ?

 What are the differences between react and vue?  Similarities between react and vue ·  Both support server-side rendering All  have Virtual DOM, component development, pass the parent and child component data through props parameters, and all implement the webComponent specification ·  Data Driven View ·  Have native support for the program, React's React native, Vue's weex   Differences between react and vue   ·  React strictly only for the MVC view layer, Vue is the MVVM pattern The  virtual DOM is different. Vue will track the dependencies of each component and does not need to re-render the entire component tree. For React, every time the state of the application is changed, all components will be re-rendered, so it will be required in React. shouldComponentUpdate is a life cycle function method to control The  component writing method is different. The recommended method of React is JSX + inline style, which means that all HTML and CSS are written into

How to optimize website performance ? How does the browser render the page?

 1. From the user's point of view, optimization can make pages load faster, respond more promptly to user operations, and provide users with a more friendly experience. 2. From the perspective of service providers, optimization can reduce the number of page requests or reduce the bandwidth occupied by requests, which can save considerable resources. In short, proper optimization can not only improve the user experience of the site but also save considerable resource utilization. There are many ways of front-end optimization, which can be roughly divided into two categories according to the granularity. The first category is page-level optimization, such as the number of HTTP requests, non-blocking loading of scripts, and location optimization of inline scripts; the second category is code Level optimization, such as DOM operation optimization in Javascript, CSS selector optimization, image optimization, and HTML structure optimization, etc. In addition, for the purpose of increasin

What are concept of physical address, logical address, and virtual memory in Java ? What are the page replacement algorithms in Java? What are dynamic link libraries and static link libraries in Java?

 What are concept of physical address, logical address, and virtual memory in Java ? 1. Physical address: It is the final address of the address conversion. When the process executes instructions and accesses data when it is running, it must be accessed from the main memory through the physical address. It is the real address of the memory unit. 2. Logical address: refers to the address seen by computer users. For example: when creating an integer array with a length of 100, the operating system returns a logically continuous space: the pointer points to the memory address of the first element of the array. Since the size of the integer element is 4 bytes, the address of the second element is the starting address plus 4, and so on. In fact, the logical address is not necessarily the real address where the element is stored, that is, the physical address of the array element (the location in the memory bar). It is not continuous, but the operating system maps the logical address into co

What is a deadlock?The reason for the deadlock? What are the necessary conditions for deadlock? How to remove the deadlock? What is the difference between paging and segmentation?

 What is a deadlock? Deadlock refers to a stalemate caused by multiple processes competing for resources during operation. When the processes are in this stalemate, if there is no external force, they will not be able to move forward.   The reason for the deadlock? Because there are some inalienable resources in the system, and when two or more processes occupy their own resources and request each other's resources, each process will not be able to move forward, which is a deadlock.  A.  Competing resources For example: there is only one printer in the system that can be used by process A. Assuming that A has occupied the printer, if B continues to request the printer to print, it will be blocked.  The resources in the system can be divided into two categories: Deprivable resources: After a process obtains such resources, the resources can be deprived by other processes or systems. Both CPU and main memory are deprived resources; Inalienable resources. When the syst

What are the different state of the process? What are the process scheduling algorithms? What is preemptive scheduling? What is non-preemptive scheduling?

 What are the different states of the process?  In the five-state model, there are 5 states in the process, which are created, ready, running, terminated, and blocked. The running state is that the process is running on the CPU. In a single-processor environment, at most one process is running at any time. The ready state means that the process is ready to run, that is, the process has obtained all the required resources except the CPU, and can run once it obtains the CPU. The blocking state is when the process is waiting for an event to suspend operation, such as waiting for a resource to be available or waiting for I/O to complete. Even if the CPU is idle, the process cannot run. Running state → blocking state: It is often caused by waiting for peripherals, waiting for resource allocation such as main memory, or waiting for manual intervention. Blocking state → Ready state: The waiting condition has been met, and it can run only after being allocated to the processor.