List operations in Python
Python's list manipulation is powerful and convenient (as opposed to Java)Say nothing about simple, regular operations (this is not an introductory tutorial) and introduce a few very specific examplesAdd to
# Append to End(append)
li = [1, 2, 3, 4, 5]
li.append(6)
print('li = %s' % li)
# Output: li = [1, 2, 3, 4, 5, 6]
# Append a list ...
Posted by mdnghtblue on Sun, 12 Jul 2020 16:48:39 +0200
Print binary tree from top to bottom
Print a binary tree from top to bottom in no line order.
Control of boundary conditions
Add each node into a sequence and print in sequence
Say nothing but code directly
void printFromTopBottom(TreeNode*pTreeRoot){
if (!pTreeRoot ) {
return;
}
//queue
std:deque<TreeNode*> dequeTreeNode;
dequeTreeNo ...
Posted by jackel15 on Sat, 11 Jul 2020 18:20:35 +0200
Set up dns server-domain name resolution
1. Background Description
Deployed services require domain name access. Configuration in the host file is OK, but if more than one computer accesses, you need to modify all the host files manually. If you add a domain name one day, you need to modify all the host files manually.
2. Set up dns services
The best way to solve the above probl ...
Posted by mizz key_me on Sat, 11 Jul 2020 18:03:08 +0200
BZOJ2400:[Spoj 839]Optimal Marks (Minimum secant)
Portal
Topic:
Given an undirected graph, the point values of some points have already been given, and the point values of some points can be freely chosen.Defines an edge with a weight of two points XOR.These points are required to be assigned a value so that the weights of the last edge are the smallest, and the point values at this time ar ...
Posted by w1ww on Sat, 11 Jul 2020 17:11:45 +0200
BZOJ2400:[Spoj 839]Optimal Marks (Minimum secant)
Portal
Topic:
Given an undirected graph, the point values of some points have already been given, and the point values of some points can be freely chosen.Defines an edge with a weight of two points XOR.These points are required to be assigned a value so that the weights of the last edge are the smallest, and the point values at this time ar ...
Posted by mmj on Sat, 11 Jul 2020 17:10:53 +0200
Custom ImageView implementation
The purpose is as follows:
This is only for the ImageView above, the composite layout in the middle, and the banner diagram below, which was also mentioned before the uniform color processing of the status bar.Analyze the top and bottom hooked view, which can be achieved by simply extending ImageView.
Consider the fo ...
Posted by T-Bird on Sat, 11 Jul 2020 16:39:36 +0200
Three ways of querying hibernate
There are three main query modes common to hibernate: HQL, QBC (named query), and using native SQL query (SqlQuery)
HQL Query
* HQL (Hibernate Query Language) provides a rich and flexible way of querying, and using HQL for querying is also Hibernate's official recommended way of querying.
* HQL is very similar in syntax structure to ...
Posted by DavidT on Fri, 10 Jul 2020 17:19:12 +0200
Android implements request HTTP authentication
These days, the development of external SDK, can achieve landing, payment.Similar to developing a set of QQ, WeChat third party login.The authorization protocol used is OAuth 2.0.Among them, Http Authentication is used, and you can consult the online materials. There are all kinds of answers, some don't know if they have been verified, and some ...
Posted by bradleybebad on Fri, 10 Jul 2020 16:54:06 +0200
Fingerprint and face recognition
1. Fingerprint Identification
1. Introduction to fingerprint recognition
The iPhone 5S begins to have fingerprint recognition
Starting with ios8.0, Apple opened a verification interface for fingerprint recognition: LocalAuthentication
2. Call mechanism
Give three consecutive opportunities, after which you will be p ...
Posted by alcoholic1 on Fri, 10 Jul 2020 16:42:50 +0200
Install MySQL 5.7 under CentOS 7.3
1. Download
Download address: https://dev.mysql.com/downloads/mysql/
Select the version you need to install, where my computer is CentOS7.3 64 bit
Then download RPM Bundle, a collection of several programs.
Then start downloading...
2. Unzip the installation package
Unzip mysql-5.7.20-1.el7.x86_64.rpm-bundle ...
Posted by cdwhalley.com on Thu, 09 Jul 2020 18:16:54 +0200