QA Official

YII2 registration (using ajax's post submission method) 2019-05-09
Test the login method without official registration. csrf is turned off by default. Front End, ajax Submission: function register(){ var params; var mName; var mPassword; mName = $.trim($("#user").val()); mPassword = $.trim($("#password").val()); if(!mName || !mPassword) { Alert (' Please Enter Full Information!'); return false; } params = { "account": mName, "password": mPassword } var url = '<?php echo $this->context->createUrl('test/register-by-account')?>'; newajaxnoloadJson(url, params, function(res) { if(res.code == 200) { Alert (" registration successful!

c# Intercept Array 2019-05-09
The following implementation is that c# intercepts the data from the third bit to the eighth bit in array A. void Main() { byte[] a = new byte[] { 12, 32, 34, 43, 21, 23, 45, 56, 67, 78, 89, 96, 54, 32, 23, 45, 23 }; byte[] newA= a.Skip(2).Take(5).ToArray(); foreach (var b in newA) bracket Console.WriteLine(b); bracket bracket

java Collection Class Comparison 2019-05-09
1. Features of Collections: The types of elements can be different, the length of collections can be variable, and the space is not fixed. Some data structures and algorithms are encapsulated as collections in Java.A collection is also an object used to store, retrieve, manipulate, and transfer objects. Jcf collection framework.It provides interfaces and classes for managing collections. II. Aggregation Framework: Interface: 1.Collection:(List (Linear Element Repeatable), set (Element Non-Repeatable))

matlab sparse tensor HOSVD recommendation system 2019-05-09
% Initializes a sparse tensor with a default value of 0 A = sptensor([122 192 189]) % Read Data from File fid = fopen(‘D:\dataall201010base1.txt’); C= textscan(fid,’%f %f %f’); fclose(fid); % Assigns Value to Tensor for i=1:2380 m=C{1}(i); n=C{2}(i); k=C{3}(i); A(m,n,k)=1; End % tensor expansion A1 = sptenmat(A,1); A1 = double(A1); % singular value decomposition is carried out on the expansion matrix, and noise reduction is carried out (about 70% diagonal matrix is reserved)

mnist 2019-05-09
1,. 2,. 3, CAFFE (Convolutional Architecture for Fast Feature Embedding) _ root/examples/mn ist/len _ train _ test.prototxt network structure 4, CAFFE (Convolutional Architecture for Fast Feature Embedding) _ root/examples/MN IST/LENET _ SOLVER. Settings for Prototxt Network hyperparameter 5,. 6, call the trained model test./build/tools/CAFFE (Convolutional Architecture for Fast Feature Embedding).bintest-model = examples/mnist/lenet _ train _ test.prototxt-weights = examples/mnist/model/lenet _ iter _ 10000.CAFFE (Convolutional Architecture for Fast Feature Embedding) model-gpu = 0 (gpu version)

oracle lower function and upper function 2019-05-09
lower: a function that converts uppercase characters to lowercase – convert all letters in the user_name field information in the user table to lowercase select lower(user_name) from user Upper: A function that converts lowercase characters to uppercase – Capitalize all letters contained in the user_name field information in the user table select upper(user_name) from user

About ajax Native get Requests and post Requests 2019-05-09
//get mode //1. Instantiate an ajax object var xhr= new XMLHttpRequest(); //2. Open an address through an ajax object"GET","../php/01.php"); //3.send sends data xhr.send(); //4. Add monitoring events to monitor the status of the entire request xhr.onreadystatechange = function () { //5. We only need to acquire the data at the stage of 4, and the processing is completed. if(xhr.readyState==4){ //Output the returned data var txt=xhr.responseText; alert(txt);

Comparison of Collection Classes 2019-05-09
Classification of Set Classes 1.List structure collection class ArrayList LinkedList Vector Stack 2.Map structure set class HashMap HashTable 3.Set structure collection class HashSet TreeSet 4.Queue Structure Collection Class and Queue Interface List Structure Set Class and Map Structure Set Class Key Value: A value that uniquely identifies something is called a key value (Note: Key values are attributes that are added separately to uniquely identify a thing. Do not use the thing's own attributes as key values.

DL4J-FIT (DataSet iterator, iterator) Source Code Reading (4) dropout 2019-05-09
preOut is the focus of forward propagation of the network model. public INDArray preOutput(boolean training) { applyDropOutIfNecessary(training); INDArray b = getParam(DefaultParamInitializer.BIAS_KEY); INDArray W = getParam(DefaultParamInitializer.WEIGHT_KEY); //Input validation: if (input.rank() != 2 || input.columns() != W.rows()) { if (input.rank() != 2) { throw new DL4JInvalidInputException("Input that is not a matrix; expected matrix (rank 2), got rank " + input.rank() + " array with shape " + Arrays.toString(input.shape())); } throw new DL4JInvalidInputException("

Recursive and Non-recursive Solution of Java The Frog Jumped Steps 2019-05-09
Recursive Version: int Fib(int n) { if (1 == n || 2 == n) return n; else return Fib(n - 1) + Fib(n - 2); } } 非递归版: public static int calc3(int n) { if (1 == n || 2 == n) return n; int s1 = 1, s2 = 2, s3 = 1; for (int i = 3; i <= n; i++) { s3 =