Java String

Java String We know that Java's character channeling is Immutable, once created, it can't change its content; Usually we operate on strings most, in fact, the returned strings are all new string objects, which have not been changed, which is exactly the same as C. Since strings are invariable, the efficiency of various operations on strings mus ...

Posted by shneoh on Sun, 12 May 2019 00:13:53 +0200

Explore ThreadPool Executor workflow in-depth source code

Summary This article mainly analyses the workflow of thread pool at the code level. If you want to know the workflow of thread pool directly, you can see the previous article. Java thread pool Happy journey to enjoy source code has begun First, the overall execution process public void execute(Runnable command) { if ...

Posted by latinofever on Sat, 11 May 2019 21:48:38 +0200

C#implements polymorphic interfaces.

1. What is an interface? Interfaces are specification protocols that allow you to write generic code if you agree to follow a specification. Defines a set of methods with various functions (just an ability, no concrete implementation, just like an abstract method,'Just say nothing'). Understand: What kind of memory should be made: how much v ...

Posted by cobaswosa on Sat, 11 May 2019 20:29:36 +0200

FlycoTabLayout effect and its application

From https://blog.csdn.net/analyzesystem/article/details/51426473 Open Source Project Effectiveness Call instance Must Practice Basic Skills Android studio project import depends on compile path dependencies{ compile 'com.android.support:support-v4:23.1.1' compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.0.2@aar' ...

Posted by Nirvana on Sat, 11 May 2019 16:55:56 +0200

Java Collection - List Introduction and Source Parsing

(Source version JDK 8) Collection classes can be grouped into three types in a java.util package: Set, List, Map. JAVA Collection Relationships (sketch) (Picture Source Network) Both List and Set collections inherit the Collection interface and are the top-level interfaces for List and Set, including the following methods: List Collection A L ...

Posted by Web For U on Sat, 11 May 2019 16:25:26 +0200

Talk about ZenPing of elasticsearch

order This paper mainly studies ZenPing of elasticsearch. ZenPing elasticsearch-7.0.0/server/src/main/java/org/elasticsearch/discovery/zen/ZenPing.java public interface ZenPing extends Releasable { void start(); void ping(Consumer<PingCollection> resultsConsumer, TimeValue timeout); class PingResponse implements Writeable { ...

Posted by sebmaurer on Sat, 11 May 2019 16:11:55 +0200

Java Thread Pool Implementation Principles and Technologies, Read this article is enough

01. Disadvantages of unrestricted threads Multithread software design method can really maximize the computing power of multi-core processors and improve the throughput and performance of production systems. However, if threads are used arbitrarily without control and management, the performance of the system will be adverse ...

Posted by Glyde on Sat, 11 May 2019 15:05:51 +0200

The problem of Alert Dialog's background changing after Android Activity sets the theme background

If you look closely at the flash page of App, you will find that every time you click on the icon on the desktop of your mobile phone to start the application, a white background (that is, what we usually call a white screen) will appear first, and then you will jump to the flash page. Like this: On how to solve the white sc ...

Posted by cosminb on Sat, 11 May 2019 12:29:47 +0200

ThreadPoolExecutor Core Source Parsing

This article only introduces the key parts of ThreadPool Executor source code. At the beginning, we introduce some core constants in ThreadPool Executor, and then select several key methods in the thread pool work cycle to analyze its source code implementation. In fact, the best way to see the JDK source code is to look at class f ...

Posted by jenni on Sat, 11 May 2019 11:46:10 +0200

Collision detection between rectangle, circle and straight line

Collision detection is generally used in game design, such as the now more popular game "King Glory". We can see in the game that heroes generally go to the attack area of the local defense tower and will be attacked. But when programmers are downloading the code, they can not see it. They can only use a piece of code ...

Posted by cactuscake on Fri, 10 May 2019 17:42:36 +0200