Android development template code (1) -- simply open the gallery and select photos

First, post the sample code //Check permissions public void checkPermission() { if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1); ...

Posted on Sun, 26 Apr 2020 08:14:36 -0700 by river001

Powershell EWS API delete mixed deployment Office365 and Exchange messages

Environment requirements: Powershell 5.0, plus domain computer Install EWS API to default locationhttps://www.microsoft.com/en-us/download/details.aspx?id=42951 For permission configuration, add the ApplicationImpersonation role in the Exchange management center of Office365 and the Exchange management center and administrator role, and add ...

Posted on Sat, 25 Apr 2020 08:09:24 -0700 by smellicus

Heap source code and application: heap sorting, priority queue, TopK problem

1. piles Heap (Heap)) is an important data structure, which is the first choice to implement priority queues. There are many variants of heap, including binomial heap, Fibonacci heap, etc., but only the most common one (hereinafter referred to as heap) is considered here. Heap is a binary tree that satisfies certain properties. Specifically, ...

Posted on Fri, 24 Apr 2020 22:16:06 -0700 by rich___

Elasticsearch series - data modeling practice

outline This paper introduces the characteristics of data modeling by different technical components in the background of practical cases, introduces the advantages and disadvantages of common joint query in the background of ES, and finally introduces the use of the file system word breaker path ﹣ hierarchy and nested objects. Data model comp ...

Posted on Fri, 24 Apr 2020 18:05:00 -0700 by markdr

Source code analysis of DelayQueue take()

I used the delay queue in my work and was curious about its internal implementation, so I studied its operation principle and introduced the source code of take() method here 1 take() source code is as follows public E take() throws InterruptedException { // A lock action ensures the security of data acquisition final ReentrantLo ...

Posted on Thu, 23 Apr 2020 10:05:32 -0700 by kweathe

Personal Competition, April 19, 2020

A - Buggy Sorting Title: This title is to give you an incorrect sorting method, which requires you to determine if there is a correct running result.If the correct result exists, then output-1, otherwise output an example illustration is wrong.The input to the title is the number n of elements. Question: This is an interesting question and it i ...

Posted on Thu, 23 Apr 2020 09:34:04 -0700 by nepeaNMedia

Some situations that need aliasing in Python programming

Function aliasing is just an application scenario of aliasing, and there are several places where aliasing is used. This note will summarize all kinds of aliases I have encountered. Scenario A: pseudonym when importing When importing other modules, the direct pseudonym is the simple version, which is quite commonly used by me. There are even so ...

Posted on Thu, 23 Apr 2020 01:54:51 -0700 by hdpt00

WINDOWS program monitoring and automatic restart and bat script implementation

Recently, in the operation of an old system, the program process is often shut down automatically. Because there is no developer to maintain the system, the program bug can not be handled by modifying the code. Therefore, it is necessary to write a script for automatic monitoring and failure recovery. phenomenon One program will shut down auto ...

Posted on Wed, 22 Apr 2020 03:20:48 -0700 by Leveecius

Fault analysis | effectively solve the timeout problem of MySQL row lock waiting [recommended collection]

By xuty Source: original contribution *Aikesheng is produced by the open source community. The original content cannot be used without authorization. Please contact the editor for reprint and indicate the source. 1, Background #### 20191219 10:10:10,234 | com.alibaba.druid.filter.logging.Log4jFilter.statementLogError(Log4jFilter.java:152) ...

Posted on Tue, 21 Apr 2020 02:02:36 -0700 by oyse

Note: content extraction of Lucene+Tika document

Tika is a library for file type detection and file content extraction, with the following points. Unified resolution interface. All the third-party parsing libraries of Tika are encapsulated in a single parser. Because of this feature, users reduce the burden of choosing the appropriate parsing library according to different document types. ...

Posted on Sat, 18 Apr 2020 07:41:19 -0700 by Bryan Ando