Tag:Test code

  • 018 pop front through the implementation of linked list rust

    Time:2021-7-29

    introduce Video address:www.bilibili.com/video/av78062009/Relevant source code:github.com/anonymousGiga/Rust-link… Details pop front In the previous section, we implemented the new and push front methods for the double linked list. In this section, we implemented pop front. The code is as follows: pub fn pop_front(&mut self) -> Option<T> { self.head.take().map(|node| { match node.borrow_mut().next.take() { Some(next) => { next.borrow_mut().prev.take(); self.head = […]

  • Configuration in asp.net core

    Time:2021-7-21

    Asp.net core provides a flexible and extensible configuration system based on key value. However, the configuration system is independent of asp.net core. It is a part of microsoft.extensions class library. It can be used for any type of application 1. Read the configuration as a key value pair Appsettings.json file: { “Position”: { “Title”: “editor,”, […]

  • Problems encountered by sublime in running Python

    Time:2021-7-16

    1. Create a new test.py through sublime, input the following code and save it: print(“Hello wujunsong”); Press “Ctrl + B” to run, and error 2 will be prompted. The specific error code is as follows: [Error 2] [cmd: [u’python’, u’-u’, u’F:\\Python\\MyPython\\hw.py’]] [dir: F:\Python\MyPython] [path: F:/Python/python.exe] [Finished] Solution: enter “path” through the CMD window to check […]

  • Seed of webpack + angular (Part 2)

    Time:2021-7-16

    Seed of webpack + angular (Part one)The construction, production and hot compilation display of the project are introduced. introduce Here is mainly about testing. Many companies are doing agile development. There are many methods for agile development, but no matter which method is adopted, testing is necessary. Verification of code, verification of function, timely feedback […]

  • Using xUnit to write test code

    Time:2021-6-16

    Using xUnit to write test code Intro XUnit is a widely used test framework in. Net. Many test projects are using xUnit as a test framework. Not only many open source projects are using xUnit, but also many Microsoft projects are using xUnit as a test framework. Get Started In xUnit, you don’t need to […]

  • How to write effective interface test?

    Time:2021-5-29

    Introduction: in all development testing, interface testing is an essential one. Effective and complete interface testing can not only guarantee the development quality of new functions, but also make the development have the ability of regression when modifying the function logic. At the same time, it is also the premise of elegant refactoring. What are […]

  • Detailed steps for configuring opencv-4.2.0 with vs2017

    Time:2021-4-27

    Detailed steps for configuring opencv-4.2.0 with vs2017   1. Download the opencv installation package and unzip it. Download website https://sourceforge.net/projects/opencvlibrary/ Figure 1 2. Open the opencv file and the directory is as follows:   Figure 2 open file directory 3. Right click “this computer”, click “properties”, advanced system configuration > environment variables, as shown in […]

  • Go mod basic use

    Time:2021-4-19

    Gomod is used to manage packages. It is enabled by default in go v1.13. initialization mkdir ~/goPrj/gomodTest go mod init gotest.com/v1 In the root directory, a go.mod file Add test code and generate new file gintest.go package main import ( “net/http” “github.com/gin-gonic/gin” ) func main() { ginServ := gin.Default() ginServ.Any(“/higin”, WebRoot) ginServ.Run(“:8888”) } func WebRoot(context […]

  • Some resource limitations of trust asynchronous library Tokio

    Time:2021-4-16

    Project address:https://github.com/netwarps/r… preface In rust, async STD and Tokio, as two asynchronous runtime libraries with more users, have their own advantages. While trust IPFs is the implementation of IPFs, the runtime is Tokio, and the underlying network library is based on trust libp2p. In order to try to change the underlying trust libp2p tolibp2p-rsOn the […]

  • Knowledge sharing: how to parse JSON data?

    Time:2021-4-14

    The problem is that we, as programmers, operate almost every day. How many ways does it have? Let’s talk about it here. Four ways of analysis Official analysis Google gson analysis Analysis of Alibaba fastjson Analysis of Jackson Case practice Here we only discuss how objects and JSON can be converted to each other. Here […]

  • PHP guomi SM3 signature algorithm

    Time:2021-4-2

    PHP guomi SM3 signature algorithm Code address github.com/lizhichao/sm install composer require lizhichao/one-sm use require __ DIR__ . ‘/vendor/ autoload.php ‘; performance testing andopenssl , SM3-PHPperformance testing php bench.php result openssl:c4cae8d8730206d130e1eef9de3e00225da0b556cfcb8d0076561352ff19f769 one-sm3:c4cae8d8730206d130e1eef9de3e00225da0b556cfcb8d0076561352ff19f769 SM3-PHP:c4cae8d8730206d130e1eef9de3e00225da0b556cfcb8d0076561352ff19f769 openssl time:4.8391819000244ms one-sm3 time:5.7239532470703ms SM3-PHP time:684.2360496521ms Test code bench.php php This work adoptsCC agreementReprint must indicate the author and the link of this […]

  • Review of offline Salon of coding Devops 1: Devops code quality

    Time:2021-2-18

    November 22, sponsored by codingDevops technology salon series “quality” special sessionIt ended successfully in Shanghai. At the event, four technology celebrities from Tencent and other well-known enterprises shared their practical experience in R & D quality and efficiency, and discussed with the audience how to take effective measures to ensure and improve software quality. This […]