JavaScript array sort notes
Several kinds of sorting methods are often used in the work, and they are sorted out and shared for everyone in case of emergency.
1. array sort function
Use the sort method of Array.
var arr = [2, 8, 5, 0, 5, 2, 6, 7, 2]
arr.sort((a,b) => {
return a - b
})
console.log(arr) // Results: [0, 2, 2, 2, 5, 5, 6, 7, 8]
2. Bubble sorting
Compa ...
Posted by aspbyte on Sat, 04 Apr 2020 21:06:27 -0700
Python Chapter 11 - common core module 01 collections module
python calls itself "Batteries included" because it provides many built-in modules that can be used without installation and configuration
This chapter mainly introduces some common built-in core modules of python
Common core modules of Python
1, collections module
This is a useful container module, which provides many useful collecti ...
Posted by DataSpy on Sat, 04 Apr 2020 13:47:50 -0700
C ා basic knowledge series-7 Linq details
Preface
In the previous article, I briefly introduced Linq's entry-level usage. This article tries to explain some more in-depth usage methods. Unlike the previous article, I will first introduce the support methods in Linq, and then write them in the form of method chain and SQL like, guided by the actual requirements.
Introduction to pre conc ...
Posted by rjs34 on Sat, 04 Apr 2020 02:58:21 -0700
Deconstruction assignment in ES6
Deconstruction assignment in ES6
According to the deconstruction of the original value, a part of the original value is quickly obtained (quickly assigned to a variable)
Deconstruction and assignment of arrays
Deconstruction assignment itself is the syntax specification of ES6. It doesn't matter what keywords ...
Posted by BenInBlack on Thu, 02 Apr 2020 07:55:56 -0700
[Tjoi2016&Heoi2016] sort bisection + line tree
Description
In this paper, we give a whole permutation of 1 to n. now we sort the whole permutation sequence m times locally. The sorting can be divided into two types: 1:(0,l,r) is to sort the numbers in the interval [l,r] in ascending order; 2:(1,l,r) is to sort the numbers in the interval [l,r] in descending order, and fina ...
Posted by yonta on Wed, 01 Apr 2020 00:56:30 -0700
BottomNavigationView bottom navigation bar, add quantity corner mark reminder
First, let's look at the effect picture of the implementation:
The code is also very simple
Each Tab in the BottomNavigationMenuView is a FrameLayout, so we can add views on it at will, so we can also implement our corner sign.
//Get the entire NavigationView
BottomNavigationMenuView menuView = (BottomNavigationMenuV ...
Posted by volomike on Tue, 31 Mar 2020 18:29:17 -0700
Commonly used select statements to view mysql system parameters
The buffer pool size 393215 this is a page, not a byte.
To see the buffer pool size in GB, run the following command:
SELECT FORMAT(BufferPoolPages*PageSize/POWER(1024,3),2) BufferPoolDataGB FROM
(SELECT variable_value BufferPoolPages FROM information_schema.global_status
WHERE variable_name = 'Innodb_buffer_pool_pages_tota ...
Posted by freakstyle on Tue, 31 Mar 2020 17:39:59 -0700
Using RESTFUL interface of CAS to log CS system into BS system
Get ready
First, refer to the previous article to configure CAS and RESTFUL. Refer to:
http://blog.csdn.net/happyteafriends/article/details/7450120
The scenario is as follows,
CAS address: http://10.1.81.223:8080/cas-server-webapp
Two WEB application addresses: http://10.1.81.223:8080/webapp2
http://10.1.81.223:8080/webapp1
Objectiv ...
Posted by royalsolo on Tue, 31 Mar 2020 13:00:56 -0700
Significance of RecyclerView setHasFixedSize(true)
From: https://blog.csdn.net/wsdaijianjun/article/details/74735039
<span style="font-size:18px;"> /**
* RecyclerView can perform several optimizations if it can know in advance that RecyclerView's
* size is not affected by the adapter contents. RecyclerView can still change its size based
* on oth ...
Posted by zhopa on Tue, 31 Mar 2020 03:41:24 -0700
C ා foundation - how to find the path location of devenv
I. Preface
VS2017 has been installed since this year. Sometimes script compilation is needed. However, MS no longer supports VS2015's "VS140comtools% vsvars32. Bat" in Script Compilation on VS2017. I am really satisfied. No way, I can always use devenv, so I wrote a program to get the latest version of VS. There are many online moves, ...
Posted by changeback on Mon, 30 Mar 2020 08:59:05 -0700