# QA Official

### UVA 12168-Cat vs. Dog (bipartite matching+Maximum Independent Set)

https://qaofficial.com/post/2019/04/25/68678-uva-12168-cat-vs.-dog-bipartite-matching-maximum-independent-set.html 2019-04-25
UVA 12168 - Cat vs. Dog topic link question meaning: given some cat lovers and some dog lovers, everyone has a favorite cat (dog) and a hated dog (cat), ask now to give a plan so that as many people as possible can be satisfied. train of thought: bipartite matching's largest independent set, the contradiction between cat lovers and dog lovers, do a maximum independent set code: #include <cstdio> #include <cstring> #include <vector> using namespace std; const int N = 505; int t, c, d, n; struct People { int a, b; People() {} People(int a, int b) { this->a = a; this->b = b; } } cat[N], dog[N]; int cn, dn; vector<int> g[N]; char A[105], B[105]; int match[N], vis[N]; bool dfs(int u) { for (int i = 0; i < g[u].

### bn layer and scale layer in caffe

https://qaofficial.com/post/2019/04/25/68649-bn-layer-and-scale-layer-in-caffe.html 2019-04-25
From: https://zhidao.baidu.com/question/621624946902864092.html why should bn layer be used with scale layer in caffe 这个问题首先你要理解batchnormal是做什么的。它其实做了两件事。1) 输入归一化 x_norm = (x-u)/std, 其中u和std是个累计

### relationship between ChannelPipeline and ChannelHandler in netty

https://qaofficial.com/post/2019/04/25/68717-relationship-between-channelpipeline-and-channelhandler-in-netty.html 2019-04-25
ChannelPipeline provides a container for the ChannelHandler chain and defines an API for propagating inbound and outbound event streams on the chain.When a Channel is created, it is automatically assigned to its own ChannelPipeline. ChannelHandler installation into ChannelPipeline: An implementation of ChannelInitializer is registered in ServerBootstrap (or Bootstrap for clients). when the ChannelInitializer.initChannel () method is called, ChannelInitializer will install a set of custom ChannelHandler in the ChannelPipeline; ChannelInitialier removes itself from ChannelPipeline.

### sentiment analysis using Python&amp;#x27;s SnowNLP module

https://qaofficial.com/post/2019/04/25/68823-sentiment-analysis-using-pythonamp#x27s-snownlp-module.html 2019-04-25
SnowNLP is a python-written class library, which can conveniently process Chinese text content. It was written inspired by TextBlob. Since most natural language processing libraries are basically aimed at English, it has written a class library convenient to process Chinese. And unlike TextBlob, NLTK is not used here, all algorithms are implemented by itself, and some trained dictionaries are brought with it. Examples of calculating emotional values are as follows:

### sqlpupper () function

https://qaofficial.com/post/2019/04/25/68647-sqlpupper-function.html 2019-04-25
sqlpupper () function instance code tutorial-returns the string str and changes all characters mapped according to the current character set to uppercase. example explanation: upper (field name): converts the contents of the field to uppercase for return note: the data type of the field must be a string type upper (string): Upper('aabbcc') returns' aabbcc' This method is seldom used in SQL Server, mostly in case-sensitive Oracle.

### there are four labels, namely label1, label2, ..., label4, how to take the caption of the corresponding label according to an integer of 1-4

https://qaofficial.com/post/2019/04/25/68835-there-are-four-labels-namely-label1-label2-...-label4-how-to-take-the-caption-of-the-corresponding-label-according-to-an-integer-of-1-4.html 2019-04-25
there are four labels, namely label1, label2, ..., label4, how to take the caption traversal genus of the corresponding label according to an integer of 1-4  Method 1: Traverse all label controls on the owner. This traversal method stores the controls on a Tlist in the order in which they are placed on the owner. The controls are placed first and stored first procedure TForm1.Button1Click(Sender: TObject);var i: Integer;begin for I:=0 to Form1.

### Ajax Post Request Solution to Chinese Scrambling Problem

https://qaofficial.com/post/2019/04/24/68557-ajax-post-request-solution-to-chinese-scrambling-problem.html 2019-04-24
This article introduces a solution to the problem of Chinese garbled code in ajax post. If you use utf-8 encoding in all your web applications, there will be no such problem.This is mainly to solve the problem of ajax post Chinese garbled code encountered by web applications that require page codes to be non-utf-8 codes such as gbk or gb2312 (sometimes due to problems left over from history). Generally, there are three solutions to this problem:

### Ajax post request jump page

https://qaofficial.com/post/2019/04/24/68567-ajax-post-request-jump-page.html 2019-04-24

### BN implementation

https://qaofficial.com/post/2019/04/24/68623-bn-implementation.html 2019-04-24
This should be the bn code closest to my understanding of the paper. Please correct me if you have any questions. def batch_norm(x, n_out,train, eps=1e-05, decay=0.99,affine=True, name=None): with tf.variable_scope(name, default_name='BatchNorm2d'): moving_mean = tf.get_variable('mean', [n_out], initializer=tf.zeros_initializer, trainable=False) moving_variance = tf.get_variable('variance', [n_out], initializer=tf.ones_initializer, trainable=False) train=tf.convert_to_tensor(train) def mean_var_with_update(): mean, variance = tf.nn.moments(x, [0,1,2], name='moments') # 计算train时的moving ave

### MLC&amp;#x27;s Upper Page and Lower Page

https://qaofficial.com/post/2019/04/24/68627-mlcamp#x27s-upper-page-and-lower-page.html 2019-04-24
transferred from http://home.eeworld.com.cn/my/space-uid-346593-blogid-349102.html according to the different characteristics of Lower page and Upper page to solve different problems, it will bring excellent results in practical application, such as: improving performance, greatly improving life, solving the reliability and security risks of abnormal power failure, etc.Some special applications may bring other losses, such as: improving performance and life may require sacrificing capacity, etc., but these trade-offs are often more practical than common operations.