# QA Official

### sorting algorithm

https://qaofficial.com/post/2019/04/24/68597-sorting-algorithm.html 2019-04-24
Bubble Selection Insert Hill Fast Merge Heap SortReference ----------------------------------------------------Summary of Eight Sorting Algorithms http://blog.csdn.net/yexinghai/archive/2009/10/10/4649923.aspxComparison and Selection of Basic Sorting Algorithms http://blogger.org.cn/blog/more.asp?name=njucs&id=3950bubble sort-also called bubble sort http://roclinux.cn/?p=661Fast Sorting-The Most Important Sorting Algorithm http://roclinux.cn/?p=566Direct Insert Sort-Simplest Sort Algorithm http://roclinux.cn/?p=579Heap Sort-Inspiration from Tournament Sort http://roclinux.cn/?p=675Simple Selection Sort-The simplest selection sort http://roclinux.cn/?p=671

### BN Layer

https://qaofficial.com/post/2019/04/22/34618-bn-layer.html 2019-04-22
For a small white, there is a long way to go from understanding Batch Normalization (hereinafter referred to as BN) to using BN correctly.Make a record here. The most searched thing about BN on the Internet is the derivation of principles and the source of relevant papers. For example: http://blog.csdn.net/Fate_fjh/article/details/53375881 https://www.jianshu.com/p/0312e04e4e83 But this does not help us in actual use, and it is not helpful to partners who need to use it quickly.

### OpenCV Normalization of Image Illumination

https://qaofficial.com/post/2019/04/22/68473-opencv-normalization-of-image-illumination.html 2019-04-22
#include <cv.h> #include <highgui.h> #include <stdio.h> #include <string> using namespace std; void main() { int i; IplImage *pImageChannel[4] = {0,0,0,0}; int count = 15; char *name = new char; while(count<=17) { string FileName = "S010_001_015942"; itoa(count,name,10); FileName = FileName + name; FileName = FileName + string(".png"); IplImage *pSrcImage = cvLoadImage(FileName.c_str()); IplImage *pImage = cvCreateImage(cvGetSize(pSrcImage), pSrcImage->depth, pSrcImage->nChannels); if(pSrcImage) { for( i=0; i<pSrcImage->nChannels; i++) { pImageChannel[i] = cvCreateImage( cvGetSize(pSrcImage), pSrcImage->depth, 1); }//channel

### Python File Rename Batch Processing

https://qaofficial.com/post/2019/04/22/68524-python-file-rename-batch-processing.html 2019-04-22
import pdb import shutil import os import xml.etree.ElementTree as ET # python 3.2 dir = "/home/Desktop/workpy"; def rename( files ): tree = ET.parse(dir + "/zp/" + files) root = tree.getroot() #print(root) #os.mkdir (dirname1) name = root.find('filename').text #name = name[:-4] print (name) print('\n') print (dir) print('\n') print(dir + "/zp/" + files) print('\n') print(dir + "/zp_2/" + name + ".xml") print('\n') shutil.copyfile(dir + "/zp/" + files, dir + "/zp_2/" + name +

### Python Image Batch Processing (Image Filtering Processing)

https://qaofficial.com/post/2019/04/22/68508-python-image-batch-processing-image-filtering-processing.html 2019-04-22
# Su Haoran #[email protected] #2017.06.14 import arcpy,envipy envipy.Initialize(arcpy) from arcpy import env env.workspace="E:/aaa" rasters = arcpy.ListRasters("*", "JPG") for raster in rasters: inraster = raster outraster= "E:/bbb/lvbo_"+raster.strip(".jpg") arcpy.FilterWithConvolution_envi(inraster, outraster, "Sobel", 3, 0, 20, "") print("All have done")

### Python cmd instruction to enter folder directory

https://qaofficial.com/post/2019/04/22/68498-python-cmd-instruction-to-enter-folder-directory.html 2019-04-22
From: http://blog.csdn.net/cvmat/article/details/53711641 以进入D盘文件夹，安装python第三方库pip为例： 第一种方法___单步进入 第一步：在cmd输入D: 第二步：输入dir #获得D盘文件目

### Windows Executes python Programs Using bat Batch Processing

https://qaofficial.com/post/2019/04/22/68521-windows-executes-python-programs-using-bat-batch-processing.html 2019-04-22
Step 1: first write a simple python program print.py, the code is as follows: print "call success." 执行结果： >>> ================================ RESTART ================================ >>> call success. >>> 步骤2：使用bat批处理程序执行python程序，“callpython.bat

### ajax page sends post request

https://qaofficial.com/post/2019/04/22/68529-ajax-page-sends-post-request.html 2019-04-22
ajax sends url request, then the background returns data, and the foreground processes according to the returned data ~ <script type="text/javascript" src="js/jquery-1.4.1.min.js"></script> <script type="text/javascript"> $().ready(function () {$('#Login').click(function () { $.ajax({ type: "POST", url: "login.action", data: "sysUser.loginName=" + escape($('#username').val()) + "&sysUser.password=" + escape($('#password').val()), beforeSend: function () {$("#login").css("display", "none"); }, success: function (msg) { if (msg == "success") { //parent.tb_remove(); parent.document.location.href = "mainPage.action"; //如果登录成

### opencv Image Processing Basic Operation _ Normalization

https://qaofficial.com/post/2019/04/22/68463-opencv-image-processing-basic-operation-_-normalization.html 2019-04-22
normalize(src, dst, 255, 0, NORM_MINMAX); NORM_MINMAX: Array values are shifted or scaled to a specified range. Linear normalization is commonly used. NORM_INF: the definition of this type has not been found. according to the corresponding item of OpenCV 1, it may be the C- norm (the maximum absolute value) of the normalized array. NORM_L1 : L1-norm of normalized array (sum of absolute values) NORM_L2: the (euclidean) L2- norm of the normalized array

### python Learn Again 4 Start cmd Batch File

https://qaofficial.com/post/2019/04/22/68522-python-learn-again-4-start-cmd-batch-file.html 2019-04-22
One, Simple Code code directly, it is still relatively simple to understand, os is simple, control power is relatively small, subprocess can obtain the corresponding cmd output, which is convenient for further analysis of operation results #import os #os.system("c:\\sam.bat") import subprocess cmd = 'cmd.exe c:\\sam.bat' p = subprocess.Popen("cmd.exe /c" + "c:\\sam.bat abc", stdout=subprocess.PIPE, stderr=subprocess.STDOUT) curline = p.stdout.readline() while(curline != b''): print(curline) curline = p.stdout.readline() p.wait() print(p.returncode) attach sam.bat file: echo