Simple network judgment
Add authority
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Create an instance of IntentFilter and add a value to it, action of "Android. Net. Conn.connectivity" change
When the network status changes, the system issues a broadcast with the value ...
Posted by RGBlackmore on Sat, 02 Nov 2019 00:43:37 -0700
A - Network of Schools POJ - 1236
A - Network of Schools
POJ - 1236
1. The problem requires at least a few files, that is, the number of strongly connected components with an entry of 0.
How many edges do we need to connect the graph?
For a single strong connection branch, if the in degree is 0 or the out degree is 0, it must be edged to connect with other strong connecti ...
Posted by badre on Fri, 01 Nov 2019 22:53:40 -0700
java calls https interface
Difference between http and https
https protocol needs to apply for certificate from ca, generally there are few free certificates, so it needs a certain fee.
http is hypertext transmission protocol, information is plaintext transmission, and https is ssl encrypted transmission protocol with security. ...
Posted by LearningKid on Fri, 01 Nov 2019 15:38:23 -0700
Leetcode 227: basic calculator II
Title Description
Implement a basic calculator to evaluate the value of a simple string expression.
The string expression contains only four operators and spaces: nonnegative integer, +, -, *, / and. Integer division keeps only the integer part.
Example 1:
Input: "3 + 2 * 2"
Output: 7
Example 2:
Input: &q ...
Posted by Supernovas on Fri, 01 Nov 2019 08:36:02 -0700
[from getting started to giving up - Java] concurrent programming - NIO use
Preface
Above [from getting started to giving up - SpringBoot] SpringBoot source code analysis - Request Process We learned that tomcat receives and returns requests based on NIO. There are many uses based on NIO in our daily work. We know that NIO can improve the concurrency of the system. In the next series, we will learn about NIO in depth. ...
Posted by Scrank.com on Fri, 01 Nov 2019 06:22:13 -0700
Nginx build notes
Because the application is in the internal network environment, it can not directly access the external network. However, the requirement is that the application needs to redirect to the external network environment's login QR code for code scanning and login. When processing page redirection, ...
Posted by erme on Thu, 31 Oct 2019 22:20:57 -0700
Centos7 installs Redis5.0.5 and joins Systemd service
1. Install gcc-c++, tcl
yum install gcc-c++ tcl
2. Decompress, compile and test
tar zxvf redis-5.0.5.tar.gz
make
make test
3. Install to / opt
make PREFIX=/opt/redis/redis-5.0.5 install
# Create a soft chain
ln -s redis-5.0.5 latest
4. Configuration file. There is an example redis.conf in the source file directory. T ...
Posted by khovorka on Thu, 31 Oct 2019 13:54:46 -0700
Use of Fabric management components
Fabric's official website:
http://www.fabfile.org
Help documents:
https://fabric-chs.readthedocs.io/zh_CN/chs/tutorial.html
Fabric installation
yum install -y make gcc gcc++ python-devel python-pip
$ pip install fabric==1.14.0
//perhaps
$ pip3 install fabric2 (No, fabric.api Module)
Verify installation
python
>>> import fabric
//pe ...
Posted by gandelf1000 on Thu, 31 Oct 2019 04:44:23 -0700
Using Python to train network -- garbage classification, (resnet18)
The data set contains six kinds of garbage, namely, cardboard, glass, metal, paper, plastic and other waste products. The amount of data is small and only for learning.
The preparation of data set label includes dividing data set into training set and test set, and making label file. Code utils.py ...
Posted by Goon on Thu, 31 Oct 2019 00:56:05 -0700
Centos7 new static route
Environmental description:
host name
Operating system version
ip
Default gateway
adapter name
Destination address 1
Destination address 2
centos7.6
Centos 7.6.1810
172.27.9.135
172.27.9.254
ens33
172.28.105.0/24
172.28.214.17/32
I. temporary method
1. View route and ip
[root@centos7 ~]# route -n
Kernel IP routing table
Destination Ga ...
Posted by juhl on Thu, 31 Oct 2019 00:41:09 -0700