QA Official

sorting algorithm 2019-04-24
Bubble Selection Insert Hill Fast Merge Heap SortReference ----------------------------------------------------Summary of Eight Sorting Algorithms and Selection of Basic Sorting Algorithms sort-also called bubble sort Sorting-The Most Important Sorting Algorithm Insert Sort-Simplest Sort Algorithm Sort-Inspiration from Tournament Sort Selection Sort-The simplest selection sort

BN Layer 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: 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 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 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) 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 2019-04-22
From: 以进入D盘文件夹,安装python第三方库pip为例: 第一种方法___单步进入 第一步:在cmd输入D: 第二步:输入dir #获得D盘文件目

Windows Executes python Programs Using bat Batch Processing 2019-04-22
Step 1: first write a simple python program, the code is as follows: print "call success." 执行结果: >>> ================================ RESTART ================================ >>> call success. >>> 步骤2:使用bat批处理程序执行python程序,“callpython.bat

ajax page sends post request 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 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 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