Tag:parameter

  • EF core executes SQL statements and stored procedures

    Time:2021-3-6

    No matter how powerful ORM is, there will always be some special circumstances, it can not meet our requirements. In this article, we introduce several ways to execute SQL. Table structure Before we start, let’s briefly describe the table structure to be used. public class Category { public int CategoryID { get; set; } public […]

  • Deep into promise (3) — name promise

    Time:2021-3-6

    We often encounter this situation: for example, through the user name to find and return the user information and his followers. There are usually two ways:1. Define an external variable: var user getUserByName(‘nswbmw’) .then((_user) => { user = _user return getFollowersByUserId(user._id) }) .then((followers) => { return { user, followers } }) 2. Use closure: getUserByName(‘nswbmw’) […]

  • Notes on regular expressions (4)

    Time:2021-3-6

    Create auriParser As a web development engineer, I am familiar with the following code: $kw = $_GET[‘keyword’]; // PHP String kw = request.getParameter(“keyword”); // JSP For the back-end language, we can easily get aurlParameter values in the request. However, when we need to get the URL parameters in the front-end project, JS has no corresponding […]

  • API cloud developer’s advanced road | [app development skills] DB module operation encapsulation JS class, super easy to use

    Time:2021-3-6

    I encapsulate a JS class file specifically for operating DB modules. The encapsulated JS class file is as follows:`1. /** *@ version 1.0 SQLite operation file *@ todo to be solved: using object-oriented implementation, so that when splicing SQL, you don’t need to be affected by the last call to the same method, so that […]

  • Common functions of JavaScript handwritten array

    Time:2021-3-5

    preface In the development process, we often use some elements of arrayapiRelated operations, includingforEach、filter、find、findIndex、map、some、every、reduce、reduceRightThe equivalent function method. Today, let’s try to write these functions by hand and implement these functions by array. For convenience, the array prototype object is created directly in theprototypeExpand on. Reading three series: like (), attention (), collection (). this paperGithabHas […]

  • Keras official Chinese document: functional model API

    Time:2021-3-5

    Functional model interface Keras’s functional model isModelThat is, the generalized model with input and output, we useModelTo initialize a functional model from keras.models import Model from keras.layers import Input, Dense a = Input(shape=(32,)) b = Dense(32)(a) model = Model(inputs=a, outputs=b) Here, our model usesaFor input, tobFor output, we can also construct models with multiple inputs […]

  • It’s not honest to print a SQL

    Time:2021-3-5

    It’s not honest to print a SQL abstract When mybatis starts SQL printing, it does not splice parameters into SQL statements, which brings great inconvenience to local development Mybatis plus completes the combination of SQL statements and parameters by collecting logs. Some ideas do not support this plug-in well As long as it is started […]

  • Using promise to solve the code nesting problem caused by multiple asynchronous Ajax requests

    Time:2021-3-5

    problem The front-end students made a common mistake when they were making the page: they wrote down multiple Ajax requests in sequence, and the subsequent requests were dependent on the return results of the previous requests. As shown in the following code: var someData; $.ajax({ url: ‘/prefix/entity1/action1’, type: ‘GET’ , async: true, contentType: “application/json”, success: […]

  • [cmake series] (3) practice of external project

    Time:2021-3-5

    Last time, we talked about the third-party dependency management and mentioned that our team is using itExternalProjectTo manage dependencies, let’s talk about the specific practice this time, and an open source dependency management tool vcpkg based on cmake. Practice of external project Let’s see what it looks like ExternalProject_Add(<name> [<option>…]) ExternalProject_Add_Step(<name> <step> [<option>…]) ExternalProject_Get_Property ExternalProject_Add_StepTargets(<name> […]

  • Realization of function compose and Coriolis

    Time:2021-3-4

    Function Coriolis Sometimes there is a need like this add(5)(2)(3)=10add(2,5)(3)=10add(1)(7,2)=10 add(1)(8)(1)()=10add(7,1)(1)(1)()=10add(4)(2,1)(1)(2)()=10 Two ways of writing by Ke Lihua 1、 If the number of parameters passed in satisfies the number of parameters to be executed, the function will be executed function curry_(fn) { //Returns a new function judge with the receive parameter… Args return function judge(…arg) […]

  • Sunflower classic! A paper on nginx current limiting configuration

    Time:2021-3-4

    _ Source: https://www.cnblogs.com/bigli…Author: biglittlean_ 1. Current limiting algorithm Token Bucket Token Bucket The algorithm is as follows The token is generated at a fixed rate and cached in the token bucket; When the token bucket is full, the redundant token is discarded; The request needs to consume an equal proportion of tokens to be processed; […]

  • Linux shell basic syntax

    Time:2021-3-4

    Wu Hongdong – recorded on July 3, 2018 – bloghttps://segmentfault.com/u/wu… Linux shell basic syntax script sign #! / bin / Bash is the first line of the shell script, which indicates what interpreter the script uses; #!/bin/bash Echo command is used to output text to the window; echo “hello shell”; #Turn on escape wrap echo […]