ArrayList source reading (added)
Version jdk1.7
common method
increase
public boolean add(E e) {
ensureCapacityInternal(size + 1); // Increments modCount!!
elementData[size++] = e;
return true;
}
public void add(int index, E element) {
rangeCheckForAdd(index);
ensureCapacityInternal(size + 1); // Increments modCount!!
System.arraycopy(elementData, in ...
Posted by SnowControl on Sun, 08 Dec 2019 02:53:24 -0800
Custom View for Android Development
stay Custom View for Android Development (1) The most complex custom View is explained in, and the rest two are finished this time ~ ~ ~ go,go,go
Inherit the original control and modify it based on the original control, such as TextView, which is common and simple. This is explained by implementing a TextView example that displays ...
Posted by dcampbell18 on Sat, 07 Dec 2019 22:59:19 -0800
A simple introduction to Java reflection
1. A brief introduction to class
A Class of Class represents a Class and interface in a running Java application. Enumeration is a kind, an annotation is an interface, and each array also belongs to a Class reflected as a Class object, which is shared by all arrays with the same element type and dimension. Primitive Java types (boolean, byte, c ...
Posted by jasonman1 on Sat, 07 Dec 2019 08:22:15 -0800
es6 foundation 0x008: Deconstruction assignment
0x000 overview
To be honest, deconstruction assignment is very popular, especially when it is used with other es6, so how to simply say that deconstruction assignment, for example: Deconstruction assignment is a coin splitting machine. Put all dimes into the coin splitting machine, he will automatically divide all the coins and take out what yo ...
Posted by evildj on Sat, 07 Dec 2019 07:52:33 -0800
Angular UI router and AngularJS implement dynamic (lazy) loading modules and dependencies through ocLazyLoad
What is UI router
UI router is one of the most useful components of the AngularUI Library (the AngularUI library is built by the AngularJS community). It is a third-party routing framework that allows interfaces to be organized through state mechanisms rather than simple URL routing.
What is ocloadload
Ocloadload is the module on demand loade ...
Posted by jaymc on Fri, 06 Dec 2019 23:30:57 -0800
Tomcat8 restricts specified domain name or IP access
Environmental Science: Tomcat8.0.53Objectives:Set to use the specified domain name or IP access
1. SET domain name access
1.1 open the server.xml file of the conf directory under Tomcat and find the following information
Modify Engineengine specifies the default host name to process the request, which is at least the same as the name at ...
Posted by weemee500 on Fri, 06 Dec 2019 20:26:20 -0800
python - multi process crawling fish high beauty image - version 2.0
https://www.cnblogs.com/summer1019/p/10364469.html
This is a picture I wrote a few days ago about "multi process crawling for beautiful women with high beauty". Today, I have nothing to do to climb for some new beautiful anchors-_-
But didn't crawl to any content. Open the source code of the web page and find that the property of the ...
Posted by pfchin on Fri, 06 Dec 2019 19:24:51 -0800
How do I sort dictionary lists by dictionary values?
I have a list of dictionaries that I want each item to be sorted by a specific attribute value.
Consider the following array,
[{'name':'Homer', 'age':39}, {'name':'Bart', 'age':10}]
When sorting by name, it should be
[{'name':'Bart', 'age':10}, {'name':'Homer', 'age':39}]
#1st floor
Using Perl's Schwartzian transformation,
py ...
Posted by fatnjazzy on Fri, 06 Dec 2019 13:00:39 -0800
js callback hell alternative solution attempt
For example, to obtain the information of the school where the students are, you need to first query the class where the students are, and then query the information of the school where the students are. js code is similar to the following:
function getStudentSchool(id) {
ajax.get("/Test/GetStudent", { "studentId": id }, function (stude ...
Posted by kazuki on Fri, 06 Dec 2019 09:16:47 -0800
Element input box with history query record
Requirement description
Add the query box on the page to display the history search record
Realization and pit record
Use the Element input box with input suggestions to achieve this requirement. Usage details Official website
1. Pit 1: cannot return array directly in querySearch, must call callback function cb to process data
Take a look at t ...
Posted by Concat on Fri, 06 Dec 2019 00:26:58 -0800