Java date and time class summary
Date class
Java in Java The util package provides a Date class that encapsulates the current Date and time. From jdk1 0 started. Note that Date cannot be internationalized, and the offset is not uniform. Its month and hour start from 0, the number of days of the month starts from 1, and the year starts from 1900.
A year y is represente ...
Added by Nabster on Mon, 03 Jan 2022 20:23:16 +0200
Inter thread communication
wait/notify mechanism
principle
Only threads with the same lock can implement the wait/notify mechanism The wait method is a method of the Object class. Its function is to make the thread currently executing the wait method wait, pause the execution at the code where the wait is located, and release the lock until it is notified or interr ...
Added by AffApprentice on Mon, 03 Jan 2022 18:58:12 +0200
Access control of C + + classes
Private and public
There are methods and member variables in a class. After the public keyword is identified, the methods and variables under public become public functions. After the private keyword is identified, the methods and member variables under the private keyword become private. By default, if public is not declared, all methods and ...
Added by pck76 on Mon, 03 Jan 2022 17:22:25 +0200
C + + Learning Log: detailed explanation of C + + constructor
stay C++ In, there is a special member function with the same name as the class name and no return value. It does not need to be explicitly called by the user (nor can the user), but is automatically executed when the object is created. This special member function is the Constructor.
In< Access rights of C + + class members and class encap ...
Added by tartou2 on Mon, 03 Jan 2022 15:41:27 +0200
Synchronization component applications of AQS: CountDownLatch, Cyclicbarrier and Semaphore
Synchronization: concurrent threads may need to wait for notifications or exchange messages at a key point. This mechanism is called thread synchronization.
Several of their underlying implementations are AQS, which are concurrent tool classes provided in the jdk contract. Note that they are tool classes, the same as the tool classes we usuall ...
Added by jredsmyth on Mon, 03 Jan 2022 14:21:49 +0200
java foundation notes, very detailed
Hello World
Create a new folder to store the codeCreate a new java file
The file suffix is javaHello.java[note] the system may not display the file suffix, so we need to open it manually Write code
public class Hello{
public static void main(String[] args){
System.out.print("Hello,World");
}
}
Compiling javac java files will generate ...
Added by matt_4013 on Mon, 03 Jan 2022 13:01:35 +0200
Saving image data for image management
Save picture data
Before saving the data, we need to obtain the id of the sku associated with the picture
1. Get sku table id
Interface analysis
Request method: GET / meiduo_admin/skus/simple/
# -------Get the id of sku--------
url(r'skus/simple/$', images.ImageView.as_view({'get': 'simple'})),
Request parameters: pass jwt token dat ...
Added by SirChick on Mon, 03 Jan 2022 12:59:45 +0200
week02_ Handwritten notes
Day_1
I java program - flow control statement
1. Sequential structure statement
After entering the main program main Method by jvm After call
The code is executed from top to bottom System class:Late learning
function:System.exit(0);//0 this parameter terminates the jvm normally
2. Select structure statement
2.1 if structu ...
Added by phpvn.org on Mon, 03 Jan 2022 12:40:41 +0200
[elegant code] 03 optional null pointer exception
[elegant code] 03 optional null pointer exception
Welcome to b station official account / public number [hexagon warrior Xia Ning], a man who wants to fill all the indicators. The article has been published in github directory Included. The handsome and beautiful in front of the screen, if it helps you, please like it and add a collection, ...
Added by shantred on Mon, 03 Jan 2022 11:46:58 +0200
Advanced C + + template
Non type template parameters
Template parameter classification type shape participates in non type parameter. Type parameter: it appears in the template parameter list, followed by parameter type names such as class or typename. A non type parameter is to use a constant as a parameter of the class (function) template, which can be used ...
Added by phpnow on Mon, 03 Jan 2022 11:20:27 +0200