VUE actual combat - Zhihu daily (2)

Configure basic html,main.js The html code is as follows: just import main.js <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Webpack App</title> <link rel="stylesheet" type="text/css" href="/dist/main.css"> </head> <body> <div id="app"> ...

Posted on Sat, 04 Jan 2020 14:41:18 -0500 by TouranMan

Encryption and decryption in Android code

There are many kinds of encryption and decryption methods. They can be roughly divided into Base64 encryption, one-way encryption (MD5, SHA), symmetric encryption (DES,AES), asymmetric encryption (RSA), non digital signature, etc. for each method, we don't need to talk much about it. Let's look at the code directly~~~ Base64 a ...

Posted on Sat, 04 Jan 2020 13:13:18 -0500 by MilesStandish

android constraint layout

Constraint layout is Google's Use: Why use constraint layouts: ConstraintLayout has another advantage, which can effectively solve the problem of too many nesting layouts. The implemented layout effect is similar to relative layout but has higher performance than relative layout. Compare the pictures with others: From the ...

Posted on Sat, 04 Jan 2020 05:02:18 -0500 by beginneratphp

[Spring Boot unit test] 3. Use Mock unit test Controller

The simple Controller is as follows: @RestController public class UserController { @Autowired private UserService userService; @GetMapping("user/{userName}") public Map<String,String> getUserByName(@PathVariable(value = "userName") String userName) { return this.userService.findByName(userName); } ...

Posted on Sat, 04 Jan 2020 01:26:39 -0500 by cwls1184

The function of Manifest when Andorid studio creates a new project

In Andorid studio, whenever a new project is created, Manifest.xml will always appear in the first column of the App column. Although we don't care about it most of the time, its role is very important Manifest is the configuration file of the project, which is similar to the product specification. Let me explain its function ...

Posted on Fri, 03 Jan 2020 23:22:16 -0500 by AliasBDI

Android webview page switch animation

Set setWebChromeClient object When the webview is not loaded successfully, create an imagrview to overlay on the webview. When the web page is switched internally, obtain the image of the current webview and assign it to imagrview. After the loading is completed, animate the image, and then control the display and hide bindin ...

Posted on Fri, 03 Jan 2020 20:10:18 -0500 by TheDefender

DOM reading xml in Qt5

http://www.qter.org/portal.php?mod=view&aid=59 Dom (Document Object Model) transforms the XML document into a tree structure that the application can traverse, so that the nodes in it can be accessed randomly. Its disadvantage is that it needs to read the whole XML document into memory, which consumes more memory. In Qt, the QDomProcessin ...

Posted on Fri, 03 Jan 2020 17:37:15 -0500 by changeback

How bitcoin addresses are generated

First get ECDSA private key, then ECDSA public key, and then calculate the wallet address. ECDSA is the abbreviation of Elliptic Curve Digital Signature Algorithm. 1. ECDSA private key: to execute the openssl command, bitcoin needs secp256k1 openssl ecparam -name secp256k1 -genkey > priv.pem # DER format openssl ec -in priv.pem -outf ...

Posted on Fri, 03 Jan 2020 10:49:48 -0500 by Jaspal

Linux add swap partition

Create a common Linux partition (either primary or logical) fdisk /dev/sdb Command (m for help): p Disk /dev/sdb: 8589 MB, 8589934592 bytes 255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/opt ...

Posted on Fri, 03 Jan 2020 10:41:45 -0500 by bigphpn00b

Business scenarios with tree-structured data, encapsulation solutions based on recursive algorithms

Source code for this article: GitHub. Click here || GitEE. Click here 1. Recursive algorithm 1. Introduction to concepts The core idea of recursive algorithms is to use a uniform solution by repeatedly breaking down the problem into homogeneous or subproblems.Many programming languages support method or function self-invocation, which simply me ...

Posted on Fri, 03 Jan 2020 08:02:25 -0500 by doremi