Knowledge summary of open source web framework django
Knowledge summary of open source web framework django (10)
Asynchronous scheme Celery
Producer consumer design model
reflection:
What's wrong with the following two lines of code?
CCP().send_template_sms(mobile, [sms_code, 5], 1)
return JsonResponse({'code': 0,'errmsg': 'ok'})
Question:
Our code is executed synchronously from to ...
Posted by fatalcure on Mon, 29 Nov 2021 17:06:26 -0800
Spring highlights summary
spring is actually a container, and IOC is one of them to collect our objects
IOC create object
User
public class User {
private String name;
public User(){
System.out.println("User Nonparametric structure of");
}
public String getName() {
return name;
}
public void setName(String name) {
...
Posted by eleven0 on Mon, 29 Nov 2021 16:18:12 -0800
Python development - Django model layer
Django model layer
Today, let's talk about Django's model layer. Django provides an abstract model ("models") layer to build and manipulate the data of Web applications.
1. The concept of model:
1. Model introduction
The model can accurately and uniquely describe the data. Contains important fields and behaviors for stored da ...
Posted by FutonGuy on Mon, 29 Nov 2021 15:16:27 -0800
Linux Installation - VMware + RedHat
1 install VMware virtual machine
The default installation is OK. If you change the installation location, remember to use the VMware installation directory after the changed location
2. Install RedHat red hat system
2.1 virtual machine settings:
Create a new virtual machineCustom (Advanced)Select virtual machine hardware compatibility ...
Posted by peDey on Mon, 29 Nov 2021 06:06:50 -0800
What if Lambda is slow to use for the first time? Look at the magic weapon
Don't say much about the description. Go directly to the figure above:
See the output? Why is the time difference between the first time and the second time so much? Let's think about it together. We can also look at the conclusion first and then look back at the analysis
Note: not only the second time, but every time after the first t ...
Posted by phprocky on Mon, 29 Nov 2021 04:34:09 -0800
Spring's management of things
What is a thing
Things can be regarded as a unit composed of several operations on the database at a time.
When we are developing projects at the enterprise level, we are faced with an operation of business personnel, but actually a collection of multi-step operations to read and write to the database. Because data operations are executed ...
Posted by Ohio Guy on Mon, 29 Nov 2021 04:14:27 -0800
Self use Java learning (multithreading advanced)
Thread pool [understand]
Status of the thread
NEW Threads that have not yet started are in this state. RUNNABLE The thread executing in the Java virtual machine is in this state. BLOCKED A thread that is blocked and waiting for a monitor lock is in this state. ...
Posted by mikew2 on Mon, 29 Nov 2021 03:43:48 -0800
Java Chapter 9 learning experience
Write before:
This chapter mainly talks about the knowledge of threads. Thread is essentially different from other chapters. The reason is that thread allows you to do multiple things at the same time and execute some tasks concurrently. Then let's explore the important knowledge in this chapter.
catalog:
1. What is the function of futuret ...
Posted by akreation on Sun, 28 Nov 2021 21:34:21 -0800
Offset analysis function of MySQL advanced application window function
preface
This article will explain the offset analysis function + over() through an example
1, Concept of offset analysis function
lag(col,n,default): used to count the value of the nth row up in the group.
The first parameter is the column nameThe second parameter is the nth line up (optional, not filled in, default to 1)The third ...
Posted by rhosk on Sun, 28 Nov 2021 16:41:27 -0800
JUC high concurrency programming II
5. Collection thread safety
Thread unsafe demo for collection
ArrayListpackage com.codetip.codejuc.juc.conllections;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
public class ThreadArrayList {
public static void main(String[] args) {
List<String> list = new ArrayList<>();
for ...
Posted by Nolan on Sun, 28 Nov 2021 14:43:19 -0800