jQuery source code analysis map function $. map and $. fn.map function in detail
The $. map() function is used to process each element (or attribute of an object) in an array using a specified function and to encapsulate the processing results as a new array to return. The function has three parameters, as follows:
The elems Array/Object type specifies the array or object to be processed.
callback
arg parameter, the paramet ...
Posted by aboldock on Thu, 03 Oct 2019 22:02:32 +0200
Android Development - Toolbar Common Settings
This note is used to record common Toolbar settings, such as Toolbar color settings, display the return button, and display three buttons on the right.
Before Android used ActionBar and Android5.0, Toolbar recommended ActionBar instead of ActionBar.
Recently, I started to use kotlin slowly. The code posted may be kotlin's code. Excuse me, if yo ...
Posted by kutti on Thu, 03 Oct 2019 21:30:13 +0200
[Validator] Initializes objects before validation
This is an unusual function for doing something before object validation, such as updating objects and reading object metadata. To use this function, you only need to implement it ObjectInitializerInterface Interface is OK. Here is an example of how to use it.
An object that contains email and username attributes is called AcmeUser:
class AcmeU ...
Posted by Awestruck on Tue, 01 Oct 2019 08:16:24 +0200
web front-end entry to reality: css realizes wavy lines and cubes
Here is to use linear-gradient to achieve, that is, drawing circles, and then using the background color to cover part of the circle; using the css3 attribute perspective s and rotation to achieve the cube
1.css realizes wave line
html
<div class="card-list">
<div class="wave-container"&g ...
Posted by InfinityChiken on Tue, 01 Oct 2019 07:52:05 +0200
JSP - Nine Built-in Objects - response
The response object is an instance of the javax.servlet.http.HttpServletResponse class. Just as the server creates the request object, it also creates a client response.
The response object defines the interface for processing the creation of HTTP headers. By using this object, developers can add ne ...
Posted by akumakeenta on Tue, 01 Oct 2019 01:12:04 +0200
JavaSE - Network Programming Exercises
1. Write a server-side program to read a set of integers sent by the client, which is represented as a string separated by spaces between a set of numbers. After sorting these integers, the corresponding string is returned to the client. If the data format is incorrect, the error message is returned, an ...
Posted by lc on Mon, 30 Sep 2019 23:25:41 +0200
Vue Official Document Notes
1. How to create a Vue instance object?
var vm = new Vue({
el: "#app", //Label id Or label class name
data:{ //Bidirectionally bound data
message: "Wang Da hammer",
show: true,
arr: [
{ name: "Wang Da hammer", age: 18 }, { name:"Luo Xiao Hu", age: 19 }
...
Posted by kath421 on Mon, 30 Sep 2019 15:00:48 +0200
js array method collation 06
Array.prototype.concat() [ES3]
(concat() method combines two or more arrays. This method does not change the existing array, but returns the new array.
Syntax:
var new_array = old_array.concat(value1[,value2[, ...[,valueN]]])
Example:
var arr1=['a','b','c'];
var arr2=['d','e','f'];
var arr3=arr1.con ...
Posted by KevMull on Thu, 26 Sep 2019 14:39:00 +0200
How to make java code performance "higher, more elegant, away from BUG"?
Guide reading So-called elegant code, or disgusting code, is often different. It also depends on personal preferences or habits. When we don't have enough experience, enough code to read and write, we may pursue a God or take a classic as a criterion. Then tell the students in the school that they can see Reconstruction and Design Patterns mo ...
Posted by konky on Thu, 26 Sep 2019 11:30:24 +0200
Reconstruction-preservation function's single responsibility
1. Preface
In the last article, I wrote about refactoring to add extensibility, and I talked about the principle of openness and closeness. The pace of learning can not stop here. Today's article will refer to another principle of development: the principle of single responsibility. Popularly speaking, a function only does one thing. Here we w ...
Posted by teddmcload on Wed, 25 Sep 2019 16:51:50 +0200