Advanced controls: AutoText box and drop-down list
Advanced controls
Advanced control steps
3.1 obtaining data
3.2 create adapter
Array adapter
Simple adapter
3.3 binding adapter
Differences between high-level controls and low-level controls:
**Use adapter or not**
1: Auto prompt box
1.AutoCompleteTextView
Case 1: automatic completion of data (array ...
Posted by CodeX on Tue, 31 Dec 2019 00:30:30 -0800
A simple case of starting and terminating Android Service and data transmission
Brief introduction to life cycle method
startService()
Role: start Service service
After manually calling startService(), internal methods are automatically called: onCreate(), onStartCommand()
If a service is started multiple times by startService, onCreate() will only call once
onStartCommand() calls = startService() calls ...
Posted by bg on Mon, 30 Dec 2019 20:44:51 -0800
Are bean s in spring thread safe?
Spring does not guarantee thread safety of bean s.The bean s in the default spring container are singleton. When there is a race condition in a single case, there is a thread safety problem. As the following example
Counting class
package constxiong.interview.threadsafe;
/**
* Counting class
* @author ConstXiong
* @date 2019-07-16 1 ...
Posted by hucklebezzer on Mon, 30 Dec 2019 20:03:08 -0800
What are the common injection methods of spring?
1. Configuration in xml
bean declaration and registration
< bean > node register bean Factory bean parameter of < bean > node refers to factory bean, and factory method parameter specifies factory method
bean injection
< property > nodes are injected in set mode < constructor Arg > node injection with construc ...
Posted by cornelombaard on Mon, 30 Dec 2019 06:13:24 -0800
Design Mode Architecture - Agent Mode
1. Basic introduction of agent mode
Proxy mode provides a surrogate for an object to control its access.That is, the target object is accessed through the proxy mode.The advantage of this is that on the basis of the implementation of the target object, additional functional operations can be enhanced, that is, to extend the function of the ta ...
Posted by squimmy on Sun, 29 Dec 2019 10:48:47 -0800
springcloud feign resolves multiobject participation
background
Business Split creates a new project that wants to reference a new technology stack (using the springcloud family bucket, temporarily unable to upgrade to springboot 2.0 for project reasons, so feign is used here for rpc), but it still uses the previous RPC interface (the original RPC framework is thrift)
Problem occurs when there ...
Posted by avo on Sat, 28 Dec 2019 21:53:41 -0800
Three Minutes Society.NET Core Jwt Policy Authorization Certification
3 Minutes Society.NET Core Jwt Policy Authorization Certification
I. Preface #
Hello, I'm back. A few days ago I talked about the simplest case of Jwt authentication, but it's not powerful enough for real projects. Yes, in a real complex and demanding customer, we're at a loss. Now we need to make the certification authorization more complex a ...
Posted by Rother2005 on Sat, 28 Dec 2019 18:46:31 -0800
Android drawing separator / separator in layout?
I want to draw a line in the middle of the layout and use it as a separator for other items such as TextView. Is there a good widget. I really don't want to use images because it's hard to match other components to it. I hope it can also be relatively positioned. Thank you
#1 building
I usually use this code to add horizontal lines:
&l ...
Posted by dzm on Sat, 28 Dec 2019 09:22:34 -0800
Base64 Chinese code scrambling solution
1. What is base64 encoding
Due to the limitations of some network communication protocols, you must use the window.btoa() method to encode the original data before sending. The receiver uses the method equivalent to window.atob() to decode the received base64 data and get the original data. For example, some data containing co ...
Posted by nigaki on Thu, 26 Dec 2019 14:40:32 -0800
java8 dynamic compilation preserves method parameter names
Compile reserved method parameter name
javac document
javac doc
-parameters
Stores formal parameter names of constructors and methods in the generated class file so that the method java.lang.reflect.Executable.getParameters from the Reflection API can retrieve them.
Get a list of parameters supported by dynamic compilation
The problem o ...
Posted by nonexistentera on Wed, 25 Dec 2019 13:33:50 -0800