Breadth first and depth first
This weekend, on a whim, I opened LeetCode to do a question: https://leetcode-cn.com/problems/number-of-enclaves/ Seeing the question, my first thought is: Start with the land on the edge and find its largest connected area. Set the marker bit for the found connected area to avoid duplication. After all the connecting areas of marginal land are ...
Added by dnast on Sat, 12 Feb 2022 11:22:22 +0200
Shell script -- condition judgment
Logic control - condition judgment
1, Realization of conditional judgment
ifcase
2, Simple structure of if
if condition ; then
Actions performed
Actions performed
fi
1. Writing of conditions
shell command
Determine the execution status code of the command [expression]
Numeric expressionCharacter expressionFile directory expre ...
Added by greenie__ on Sat, 12 Feb 2022 11:17:48 +0200
Several implementation methods of Android system shutdown or restart
The default SDK does not provide an API interface for application developers to directly shut down or restart the Android system. Generally speaking, high permissions (system permissions or even Root permissions) are required to shut down or restart the Android system. Therefore, in general apps, if you want to realize the shutdown or restart f ...
Added by leon_zilber on Sat, 12 Feb 2022 11:11:57 +0200
[js basic review] Prototype and prototype chain
catalogueWhat is the objectConstructorPrototype objectImplement inheritance and different inheritance methodsobjectWhy object-oriented programmingThe code logic migration is more flexible, the code reusability is high, and the code is highly modularConstructorfunction Person(name) {
this.name = name
this.getName = function(name) {
...
Added by 1veedo on Sat, 12 Feb 2022 11:03:21 +0200
python learning - functional programming
Functional programming
brief introduction
Function is a kind of encapsulation supported by Python built-in. We can decompose complex tasks into simple tasks by disassembling large pieces of code into functions and calling functions layer by layer. This decomposition can be called process oriented programming. Function is the basic unit ...
Added by JCF22Lyoko on Sat, 12 Feb 2022 10:40:43 +0200
SSMP integration case: addition, deletion, search and modification based on book information
Integration case based on SSMP
I Implementation case scheme analysis
Case making process Basic CRUD function Call the page and make all functions after confirming asynchronous submission Add paging function and query function
II Create backend project environment
2.1 creating modules
Create module First, add web - "Spring Web" ...
Added by stevepatd on Sat, 12 Feb 2022 10:34:41 +0200
Glide source code analysis and three-level cache principle
Glide is an open source image loading library for Android, which can help us download, cache and display images in various formats. It is also one of the mainstream image loading frameworks. How to realize the internal source code? Explain the main process and make a brief analysis.
The usage is as follows:
Glide.with(context).load(url).into ...
Added by ikon on Sat, 12 Feb 2022 10:26:38 +0200
[KingbaseES]sys_ Detailed explanation of dump logical backup tool
KingbaseES logical backup and restore tool provides online backup and restore function at database object level. Backup objects include:
database pattern surface view constraint jurisdiction trigger function sequence
The output format of logical backup includes:
Binary SQL script
In addition, for table data, it also supports the e ...
Added by bammerman on Sat, 12 Feb 2022 10:25:07 +0200
Six principles of Unity design pattern
Six principles of design mode
1. Purpose of design mode Design pattern is for better code reusability, readability, reliability and maintainability.
2. Six commonly used design modes 1) Single responsibility principle 2) Richter's substitution principle 3) Dependency Inversion Principle 4) Interface isolation principle 5) Dimitt's law 6) Open ...
Added by dancingbear on Sat, 12 Feb 2022 10:15:20 +0200
Instructions for common RedisTemplate collections
Here, I use the jar package spring boot starter data redis of redisTemplate combined with spring boot framework, which is introduced in the way of POM. The introduction code is as follows:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<versi ...
Added by UseeHere on Sat, 12 Feb 2022 10:12:48 +0200