Synchronization exercise (Java SE)
Case 1: data sorting in string
Requirement: there is a string: "91 27 46 38 50". Please write a program to realize it. The final output result is: "27 38 46 50 91"
Idea: 1. Define a string
2. Store the numeric data in the string into an array of int type
&nb ...
Posted by NogDog on Wed, 10 Nov 2021 04:44:22 -0800
Java learning 18: Reflection
18. Reflection
Reflection mechanism
Reflection mechanism allows the program to obtain the internal information of any class (such as member variables, constructors, member methods, etc.) with the help of Reflection API during execution, and can operate the properties and methods of objects.
After loading the Class, a Class object is generate ...
Posted by Kurtismonger on Wed, 10 Nov 2021 04:34:38 -0800
Django - implement paging
Django - implement paging
View core code
# Get all articles
post = Post.objects.all()
# Gets the value of p, which defaults to 1
p = request.GET.get('p', 1)
# The first parameter is a required parameter, which represents the data to be paged. The parameter value can be list, tuple or ORM query data object.
# The second parameter is a required ...
Posted by d~l on Tue, 09 Nov 2021 22:14:25 -0800
java reflection thought
preface
There is a very important content in Java, the idea of java reflection. Learning java reflection well is very important for our subsequent development and understanding other people's code. Therefore, it is most important to lay a good foundation for reflection.
catalogue
1, What is the reflection mechan ...
Posted by arya6000 on Tue, 09 Nov 2021 20:02:05 -0800
Java multithreading learning notes
Detailed explanation of multithreading (Java.Thread)
Thread introduction
Multitasking multithreading Common method calls and multithreading Process: it is an execution process of program execution. It is a dynamic concept and the unit of system resource allocation Thread thread: usually, a process can contain several threads, and each pro ...
Posted by nemxu on Tue, 09 Nov 2021 17:51:49 -0800
Java: P1093 [NOIP2007 popularization group] scholarship
Luogu topic: P1093 [NOIP2007 popularization group] scholarship
Title Description
A primary school has recently received a sponsorship and plans to give part of it to the top five students with excellent academic achievements. At the end of the term, each student has three grades: Chinese, mathematics and English. First, sort according to the ...
Posted by miles_rich on Tue, 09 Nov 2021 17:15:22 -0800
< 2021SC@SDUSC Software engineering application and practice of Shandong University JPress code analysis
2021SC@SDUSC
This article analyzes the direct package and sitemap package of module page web.
Note: because the code is short and concise, the analysis of the code is placed in the remarks of the code segment.
1.directive package architecture
This folder contains three classes and a static inner class.
PageCommentPageDirective.java prov ...
Posted by siddscool19 on Tue, 09 Nov 2021 11:33:56 -0800
Human tame artificial mental retardation (Sanzi)
catalogue
preface
Three gobang rules
code implementation
Code analysis
preface
Daga, today is the whole point of Sanzi chess. This Gobang does not add AI algorithm. Computer chess is purely random chess (big guys bypass), so the real way to play is to find a way to let the computer win! (bushi, the code of this little game is written ...
Posted by pagod on Tue, 09 Nov 2021 10:50:12 -0800
Introduction to C + + novice-4
## Introduction to C + + novice -- 4
C + + storage class
C + + storage class: defines the range and life cycle of variables / functions in C + + programs include:
autoregisterstaticexternmutablethread_local
Didn't look at it in detail
C + + operator
Arithmetic operator
+,-,*,/,%,++,–
Relational operator
==,!=,>,<,> ...
Posted by pasychosheep on Tue, 09 Nov 2021 10:21:54 -0800
Some small details in Golang
1. The structures in golang can be compared directly. The bottom layer calls the memequal function to compare the memory. Memequal is implemented by assembly.
2. Only values are passed in golang. For example, when a slice is used as a formal parameter of a function, it is also a value transfer. The underlying data structure of the slice is: ...
Posted by vivekjain on Mon, 08 Nov 2021 23:47:01 -0800