Tag:mode

  • Electron Vue simple integration vuex

    Time:2020-5-21

    preface Recently, I am making a small thing, which is a desktop client tool based on electronic Vue. As I am a pure back-end development, my knowledge of the front-end is still basic JS, jQuery, etc., so don’t spray on the front-end gods~ scene As the project is a single page application, it is necessary […]

  • Solve the problem of mongodb transaction writeconflict

    Time:2020-5-21

    order Recent attempts to use mongodb’s transaction feature in the projectFound a holeorg.springframework.data.mongodb.UncategorizedMongoDbException: Command failed with error 112 (WriteConflict): ‘WriteConflict’When the same document is operated concurrently, the above prompt will appearAnd then after retrying, there will be no analysis After querying the data, it is found that the above problem is caused by a parametermaxTransactionLockRequestTimeoutMillisThis […]

  • Dynamic loading of circular strip progress bar

    Time:2020-5-21

    Dynamic loading of the ring progress bar can refer to the following two methods:Using JS to realizeUsing canvas to realize

  • Elegant use of features in WinForm / WPF / console to encapsulate webapi

    Time:2020-5-21

    Elegant use of features in WinForm / WPF / console to encapsulate webapi explain As a server in the C / s end, it is convenient and fast to establish HTTP requests. 1. Class library used Newtonsoft.dll 2. Package httplistener Httpapi class public class HttpApi { private static List HttpListenerList = new List(); /// ///Initialize […]

  • Two test methods of asynchronous system

    Time:2020-5-20

    Internet software system has been evolving with the increasing demand and user volume, in order to adapt to more complex business scenarios, higher performance requirements and so on. There are various ways of software evolution, system asynchronization is one of them. In general, for those tasks that require less real-time, but are computationally intensive or […]

  • Some ideas about routing in openresty

    Time:2020-5-15

    The concept of routing is not new in the back end. In most back-end frameworks, routing is supported and processed, such as Django, flask, and Yii. However, the concept of routing is not mentioned in the openresty technology. Generally speaking, the rough business route writing method is to directly configure or (openresty abbreviation, hereinafter replaced […]

  • Hyperledger fabric 1.4 ledger and CouchDB

    Time:2020-5-14

    The ledger in fabric is divided into two parts, one is file based storage, which meets the characteristics of blockchain that can not be tampered with. This way of storage basically uses Merkle tree, and the whole storage way can only be added, not deleted and modified. The other part is to use database for […]

  • dotnetcore3.1 Multi language implementation of WPF

    Time:2020-5-13

    Implementation of multi language in dotnetcore 3.1 WPF Intro Recently, dbtool has been migrated from WinForm to WPF, and updated to dotnet core 3.1Microsoft.Extensions.LocalizationThe basic multi language support is realized. Let’s share how to implement Service registration If you are not familiar with how to use dependency injection in WPF, you can refer to the […]

  • Recommend a library to generate swagger API documents through Javadoc at runtime

    Time:2020-5-12

    introduce In general, we use spring fox to generate swagger API documents, but spring fox does not support generating documents from Javadoc, so we can only annotate documents by annotation. In this way, when sharing some POJO classes, in order to generate Javadoc documents and swagger documents at the same time, you need to write […]

  • Sensitive word filtering

    Time:2020-5-10

    /*The first way*/ $sql=”select value from dede_sysconfig where varname=’cfg_notallowstr'”; $mingan=$link->query($sql); $arr = $mingan->fetch_row(); //Array elements combined into strings $list=”/”.(“|”,$arr).”/i”; if(($list,$username,$matches)){ Echo “alert (‘contains sensitive words and cannot be registered’);”; } else { $sql= “insert into dede_member2 (userid,uname,email,pwd,mobile,jointime) values(‘$username’,’$username’,’$email’,’$hashpwd’,’$mobile’,’$jointime’)”; //Echo “error.” $SQL. “”. $conn – > error; //Insert database if(!($link,$sql)){ // echo strlen($hashpwd); //Echo “error.” $SQL. […]

  • Submit form data using resttemplate

    Time:2020-5-6

    Submit with exchange method Exchange can execute both POST method and GET, so it is most widely used String url = “http://localhost/”; RestTemplate restTemplate = new RestTemplate(); HttpHeaders headers = new HttpHeaders(); //Please do not change this submission method. In most cases, the submission method is form submission headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); //Package parameters. Do not replace them […]

  • Overview of execution context

    Time:2020-5-5

    >>Return to C ා concurrent programming 1. Introduction 2. Synchronous and asynchronous comparison 3. Capture and recovery of context 4. Flowing ExecutionContext vs Using SynchronizationContext 5. How to apply to async / await 5.1. Implementation mode 5.1.1. ExecutionContext 5.1.2. SynchronizationContext 5.2. Execution process 5.2.1. Use and control of synchronizationcontext 5.2.2. The flow of ExecutionContext cannot […]