Hyperledger fabric smart contract writing (1)

1. Differences in fabric chain code versions Fabric chaincode is divided into two major versions, version 1.x and version 2.x. The main differences between the two are: ####1. Differences in imported packages The packages imported by 1.x are: “[github.com/hyperledger/fabric/core/chaincode/shim](http://github.com/hyperledger/fabric/core/chaincode/shim)” pb “[github.com/hyperledger/fabric/protos/peer](http://github.com/hyperledger/fabric/protos/peer)” The packages imported by 2.0 are: “[github.com/hyperledger/fabric-contract-api-go/contractapi](http://github.com/hyperledger/fabric-contract-api-go/contractapi)” ####2. Different method structures There is no […]

Mac M1 reports an error when installing Redis through homebrew (perl: unknown or unsupported macOS version: :dunno)

Directory 〇.Solution 1. Problem phenomenon 2. Try to solve 3. Start the service 4. Log in to the client 〇、Solution To upgrade homebrew, the command is as follows: brew update-reset 1. Problem Install Redis through the command brew install redis. The exception is as follows: fatal: not in a git directory Warning: No remote ‘origin’ […]

Front-end lesson 2, HTML, alt, title, width/height, border, <a> hyperlink, target, tr, td, th

Table of Contents 1. title: ?2. alt 3. width/height 4. border 5. Hyperlink 6. target 7. tr 8. td 9.th 10. rowspan 一、title: Look at the beauty Yujie style <img src=” hhh.png” title=” like” > As long as your mouse is there, it will display the title logo behind you 2. alt My computer may […]

Iteratively obtain the contents of hyperlink tags

import requests from lxml import etree url = “https://desk.zol.com.cn/fengjing/” resp = requests.get(url) resp.encoding = “gbk” et = etree.HTML(resp.text) domin = “https://desk.zol.com.cn” result = et.xpath(“//dl[@class=’filter-item first clearfix’]/dd[@class=’brand-sel-box clearfix’]/a/@href”) for item in result: ur = domin + item resp_ = requests.get(ur) resp_.encoding = “gbk” et_ = etree.HTML(resp_.text) result_ = et_.xpath(“//ul[@class=’pic-list2 clearfix’]/li/a/@href”) for item_ in result_: link = […]

threeJs sample, modification of webgl2_volume_perlin

The official example webgl2_volume_perlin.html draws the perlin noise, and you can intuitively feel the image shape of the perlin noise. The original example supports cubes, but I changed the cubes to spheres. <!DOCTYPE html> <html lang=”en”> <head> <title>three.js webgl2 – volume</title> <meta charset=”utf-8″> <meta name=”viewport” content=”width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0″> <link type=”text/css” rel=”stylesheet” href=”main.css”> </head> <body> […]

PERLIN NOISE

Introduction Perlin noise is designed to describe random effects in nature. It creates textures that can be applied directly to a vertex shader, rather than generating a texture map and then attaching the map to a three-dimensional object using traditional texture mapping techniques. This is equivalent to the fact that the texture will not need […]

Redis: HyperLogLog application

This article will first explain common statistical strategies for billion-level data, then introduce HyperLogLog related concepts and commands, and finally use application code examples to explain. Table of Contents Use of billions of data HyperLogLog related concepts Why use HyperLogLog for deduplication statistics? Related commands Application code example The use of billions of data Normally, […]