Summary of Common Problems in Java Programming (1)
String connection misuse
Wrong Writing:
String s = "";
for (Person p : persons) {
s += ", " + p.getName();
}
s = s.substring(2); //remove first comma
Correct writing:
StringBuilder sb = new StringBuilder(persons.size() * 16); // well estimated buffer
for (Person p : persons) {
if (sb.length() > 0) sb.append(", ");
sb.app ...
Added by kazil on Mon, 20 May 2019 05:53:56 +0300
Using Recycler View to Realize the Function of Discovering Brands
Exploratory Brand Turnover
Modeled after
Need foundation
Basic use of RecyclerView
Look at the gods of hong: Android RecyclerView uses fully analytical experiential art-like controls
Customize Layout Manager
You can see: Create your Layout Manager
Use of ItemTouchHelper and Implementation of Callback
You can see: ...
Added by sonoton345 on Mon, 20 May 2019 03:52:59 +0300
Building Spring Security Application with Maven
1. overview
This article explains how to use Maven to build Spring Security applications. Specific use cases using Spring Security dependencies will be discussed. The latest version of Spring Security can be found on Maven Central.
This is a follow-up to the previous Spring and Maven articles, so for non-secure Sp ...
Added by kagedwebdesign on Sun, 19 May 2019 23:52:35 +0300
Permissions Dispatcher, an Android permission application framework, uses
Permissions Dispatcher, an Android dynamic permission application library, uses
Dynamic permission application library https://github.com/permissions-dispatcher/PermissionsDispatcher
Before Android 6.0, the application permissions will be listed in the form of a list when the application is installed. Users can see that those ...
Added by eektech909 on Sun, 19 May 2019 18:52:28 +0300
Orleans Initial Contact (1) Introduction Example
[Return navigation]
After a brief understanding of Orleans, we can use several examples to deepen our impression.
I. An Introduction to Orleans
This example follows Orleans Initial Examples. https://www.cnblogs.com/gaopang/articles/7379802.html)
1. Create
First create a solution for four projects, as shown in the figure
The four projects ...
Added by PunkGo on Sun, 19 May 2019 13:59:18 +0300
[Launcher Development] Wallpaper Selection
In Drag Analysis (Part I) In this paper, we analyze the onLong Click method in Launcher.java, in which WorkSpace judges the location of TouchDown event by onInterceptTouchEvent method, and uses setTag method to save the cell Info where the click is located. If the cell variable in Infcello is not empty, it indicates that the cu ...
Added by Dirtbagz89 on Sun, 19 May 2019 12:19:19 +0300
Java Web Base Disk - Other Articles
XML
Operation of XML Files
Conversion between XML and JavaBean
1. File operation
1)Create an empty XmlDoc
XmlDoc doc = new XmlDoc();
2)Use the external input element as the root element
Element element = ...
XmlDoc doc = new XmlDoc(element);
3)With the specified external file or xml Text string c ...
Added by bben95 on Sun, 19 May 2019 10:57:29 +0300
Front-end work series - ajax requests and cross-domain requests
Having been used to Ajax requests written by others, I suddenly want to write one myself. Because of this idea, I went to look up the information and finally figured out the steps of the original request for ajax. I would like to share with you here.
If you want to make a request to the server, you must first have an o ...
Added by Drezek on Sun, 19 May 2019 09:45:44 +0300
Use of Shared Preferences and Source Code Analysis
Shared Preferences is a lightweight data storage method in Andorid. Usually used to store some simple data types, such as int, String, Boolean. Shared Preferences stores data when it comes in the form of ArrayMap key-value pairs. Eventually, ArrayMap's data is written to an XML file through an IO stream. The location of the XML ...
Added by zipdisk on Sun, 19 May 2019 04:10:33 +0300
Wechat Small Program E-commerce Actual Warfare - Home Page (Part 2)
Last article: Wechat Small Program E-Commerce Practical Warfare - Home Page (Part 1)
Well, in the last issue, we finished the homepage search, navigation bar and advertisement rotation. Then we will continue to finish the rest of our homepage. Let's see what we want to achieve first.
In this issue, we want to achiev ...
Added by Thumper on Sat, 18 May 2019 22:00:49 +0300