QA Official

Python learning iv sys.argv

https://qaofficial.com/post/2019/04/02/68415-python-learning-iv-sys.argv.html 2019-04-02
1. save the following code as opennote.py import sys,os os.system(sys.argv[1]) </span></span>command line window execution: opennote.py notepad magic effect appeared, automatic open notepad program; parsing: sys.argv[] is used to obtain command line parameters, sys.argv[0] represents the file path of the code itself (py file);Argv [ 1 ] represents the first parameter.The above example is notepad, so its execution effect is the same as that of entering the carriage after typing notepad

Vue post Submit Request and get Submit Request Implementation

https://qaofficial.com/post/2019/04/02/68554-vue-post-submit-request-and-get-submit-request-implementation.html 2019-04-02
Since Vue version is upgraded faster and faster now, the main change is in the webpack.dev.conf.js operation: The specific changes are as follows post commit implementation 1. replace webpack.dev.conf.js with the following code: 'use strict' const utils = require('./utils') const webpack = require('webpack') const config = require('../config') var express = require('express') const merge = require('webpack-merge') const path = require('path') const baseWebpackConfig = require('./webpack.base.conf') const CopyWebpackPlugin = require('copy-webpack-plugin') const HtmlWebpackPlugin =

ajax Request to Add Custom header Parameters

https://qaofficial.com/post/2019/04/02/68536-ajax-request-to-add-custom-header-parameters.html 2019-04-02
$.ajax({ type: "post", url:"http://127.0.0.1:4564/bsky-app/template/testPost", contentType: "application/json;charset=utf-8", data :JSON.stringify({"bodyName":"sdfsdf","date":"2017-11-28 07:34:01","price": 10.5,"tbId": 1}), dataType: "json", beforeSend: function (XMLHttpRequest) { XMLHttpRequest.setRequestHeader("token", "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxOD....."); }, success: function (data) { alert(data); },error:function(error){ console.log(error); } }); beforeSend: function (XMLHttpRequest) { XMLHttpRequest.setRequestHeader("token", "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxOD....."); }, 其中,token是服务端自定义的header参数

ajax post Request to Solve the Problem of Chinese Scrambling Code (Use filter instead of escape Method)

https://qaofficial.com/post/2019/04/02/68558-ajax-post-request-to-solve-the-problem-of-chinese-scrambling-code-use-filter-instead-of-escape-method.html 2019-04-02
本人另一篇博客总结了三种方案的比较,并提出了一种比本方案更好的一个方案,请参考:http://hjg1988.iteye.com/blog/

argv and argc variables

https://qaofficial.com/post/2019/04/02/68443-argv-and-argc-variables.html 2019-04-02
This is the command line parameter in C language. The so-called command line parameter is the parameter needed to execute the command under DOS. We When learning C language, we usually compile some small programs, output some data, etc. But if we compile such programs A program, such as compiling a program, can add the contents of one file to another file, so that we can compile the program

one-class svm_predict returns 0 or a workaround that cannot be run (successful)

https://qaofficial.com/post/2019/04/02/68379-one-class-svm_predict-returns-0-or-a-workaround-that-cannot-be-run-successful.html 2019-04-02
在使用svm中遇到的问题与解决,首先下面的代码是没有实现的(但逻辑是没有问题的,只是svm_predict不支持核2,3,4) String path = Environment.getExternalStorageDirectory().toString()+ File.separator + fileDir;

python Batch Processing Files

https://qaofficial.com/post/2019/04/02/68490-python-batch-processing-files.html 2019-04-02
background batch processing of files, arranging the contents of each file with the same structure into one file, and each file is on one line of the new file. Read is read by row Code Presentation import os def eachFile(filepath): """ 读取文件夹下面的所有文件 的路径""" pathDir = os.listdir(filepath) file_path_list = list() for allDir in pathDir: child

python list, dictionary, set derivation

https://qaofficial.com/post/2019/04/02/68527-python-list-dictionary-set-derivation.html 2019-04-02
List Derivation list = [1, 3, 7, 9, -3, "123"] l = [i for i in list] print("打印结果:%s" % l, '\n', "数据类型:%s" % type(l)) dictionary derivation dict = [1, 4, 3, 8, 2, 'oo'] d = {key: value for key, value in enumerate(dict)} print

python&amp;#x27;s sys.argv

https://qaofficial.com/post/2019/04/02/68431-pythonamp#x27s-sys.argv.html 2019-04-02
" argv" is a short form of " argument variable" parameter variable, which is usually passed to the program by the system when the command line is called.This variable is actually a List list, argv[0] is generally the script file name or full path to be called, and is related to the operating system.The sys.argv variable is a list of strings.In particular, sys.argv contains a list of command line arguments, that is, arguments passed to your program using the command line.

sys.argv command line arguments

https://qaofficial.com/post/2019/04/02/68441-sys.argv-command-line-arguments.html 2019-04-02
sys.argv command line arguments Several command line parameters can be specified when the operating system commands the program to run. ------ c:\test.py para1 para2 argv[0] c:\test.py argv[1] para1 argv[2] para2 ------------