Design mode - strategic mode
/**
* Role superclass:
* Follow the design principles, find out the parts that may need to change in the application, and separate them,
* Don't mix with code that doesn't need to change.
* We found that the display, attack, defend and run of each character could change, so we had to write this independently.
* Then accordi ...
Posted by morphius on Fri, 13 Dec 2019 12:59:55 -0800
Avfunction learning notes -- audio and video editing
Avfunction learning notes - audio and video editing
Reading and writing of media data
AVAssetReader
AVAssetReader is used to read media samples from an AVAsset instance. One or more instances of AVAssetReaderOutput are usually configured and access audio samples and video frames through the copyNextSampleBuffer method. It ...
Posted by fiorelina21 on Fri, 13 Dec 2019 09:49:32 -0800
Other control of Android studio (option selected, number of columns changed)
GridView and Spinner
(follow up update of renderings)
Use GridView to display the grid. In the grid, there are pictures with text. In addition, a Spinner can control the number of GridView columns.
Case: the interface consists of a group of rows and columns with pictures and text. The Spinner controls the number of columns dis ...
Posted by champbronc2 on Fri, 13 Dec 2019 08:08:18 -0800
react event binding ES6
Article reference
Summary of ES6 in React.js
Case description
import React from "react"
import { NavBar, Button, Icon } from "antd-mobile"
class Photegraph extends BaseComponent {
// video and mediaStreamTrack are properties of the photographic class
video;
mediaStreamTrack;
// Constructor
constructor (props) { ...
Posted by su1d on Thu, 12 Dec 2019 13:06:50 -0800
[exploration intermediate algorithm] longest palindrome substring
This question can refer to: 647. Palindrome substring
In essence, it is the same. Judge all palindrome strings and find the longest one.
Central expansion method
Center extension is to take each letter of a given string as the center and extend it to both sides to find the longest subpalindrome string. Algorithm complexity is ...
Posted by -Mike- on Thu, 12 Dec 2019 11:31:34 -0800
Android uses Gradle to realize multi-channel packaging, with different package names, logos, names, themes, etc. for the same project
Recently, the company has a new requirement. According to the previous project, change the name, logo and some resource files to repackage a new app
Implementation ideas
1. Copy a project name, logo, etc. (inefficient, troublesome) ❌
2. Multi channel packaging (convenient and fast)
Implementation method
Build.gradle > An ...
Posted by candle21428 on Thu, 12 Dec 2019 10:41:53 -0800
Wechat applet docking to display Alibaba cloud database data
Realistic demand
In the project, sometimes the field equipment fails, which needs to be known by the remote personnel. In addition to the way of email, the way of wechat applet is also very good. Try it today and make a demo version.
1. Wechat applet application production front end
1.1 lists file (use template and data bind ...
Posted by Hamish on Thu, 12 Dec 2019 08:45:13 -0800
It only takes 5 minutes for the handles to show you the wrong use of the Handler
The whole collaborative relationship of Hander, Looper, MessageQueue, Message is like the overall operational relationship of a restaurant:
Handler - Dinner
Looper - Rear Chef.
MessageQueue - Order machine.
Message - A table-by-table order.
Next we review the scene of our restaurant meals, which are divided into standard and special meals. Let ...
Posted by timbo6585 on Wed, 11 Dec 2019 18:56:45 -0800
AAC learning notes - Transformations
Class provides methods for feature composition and delegation of LiveData instances. Similar to kotlin's by, but the latter is obviously simpler.
These transformations are computationally lazy and run only when the returned LiveData is observed.
Article directory
map
switchMap
summary
map
I should call this method mappin ...
Posted by justAnoob on Wed, 11 Dec 2019 11:04:15 -0800
Android exit login summary
Objective: to complete the exit and login of Android APP
Idea: store multiple open activities in the List, open an addList, close a removeList, create a public APPCompatActivity base class (complete the activities add and remove in the base class, and the registration and cancellation of the broadcast receiver). When clicking ...
Posted by raister on Wed, 11 Dec 2019 10:54:32 -0800