Tag:Generator

  • Explore JavaScript – > async, await

    Time:2019-10-18

    Before we talk about async, let’s briefly talk about promise.First of all, let’s correct the common misconception of many people — “promise is asynchronous”. Look at the code: console.log(1); let p1 = new Promise(r => { console.log(2); r() }); p1.then(_ => console.log(3)); console.log(4); let p2 = new Promise(r => { console.log(5); r() }); p2.then(_ => […]

  • MyBatis Generator Configuration Use

    Time:2019-8-26

    MyBatis Generator is a tool provided by MyBatis to generate code for entity, Mapper, Mapper. XML generation.Required jar packages:mybatis-generator-core-1.3.5.jar XML Configuration <?xml version=”1.0″ encoding=”UTF-8″?> <!DOCTYPE generatorConfiguration PUBLIC “-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN” “http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd”> <generatorConfiguration> <context id=”Mysql” targetRuntime=”MyBatis3Simple” defaultModelType=”flat”> <plugin type=”tk.mybatis.mapper.generator.MapperPlugin”> <property name=”mappers” value=”tk.mybatis.mapper.common.Mapper”/> <! — Case Sensitive defaults to false, which can be set to […]

  • Develop a form in one minute

    Time:2019-8-3

    Following the previous article “Let the front-end ladies and sisters publish the list happily”, we have solved the problem of “happy”, and today we will continue to talk about “efficiency”.<( ̄︶ ̄)>。 Form, in fact, is a visual description of a data, presented to users in a friendly form, to achieve the purpose of collecting information filled […]

  • Python generator and iterator

    Time:2019-4-26

    List Generator: Example 1: a = [i+1 for i in range(10)] print(a) Output: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] Example two: L = [1, 2, 3, 4, 5] print([i*i for i in L if i>3]) Output: [16, 25] Example three: L = [1, 2, 3, 4, 5] I = [6, 7, […]

  • Dynamic Generation of Entity Classes (I)

    Time:2019-2-7

    Preface In application development, various POJO/POCO entity classes (DO, DTO, BO, VO) are usually involved. Sometimes these entity classes need to be implemented.INotifyPropertyChangedInterfaces support attribute change notifications, and generally we write these codes by hand or generate them by tools based on database table definitions or other templates, mapping files, etc. However, business implementations are […]

  • Dynamic Generation of Entity Classes (2)

    Time:2019-2-6

    Preface Because of the low-level design idea of using dictionary to store attribute change values, it leads to performance problems. Although. NET dictionary implementation is very efficient, there is still a huge performance gap compared with the way of directly reading and writing segments. At the same time, it will also lead to unnecessary packing […]

  • Dynamic Generation of Entity Classes (3)

    Time:2019-2-5

    Preface In. NET, there are two main ways to generate and compile dynamically, one is through.System.Linq.ExpressionsIn namespacesLambdaExpressionClassCompileToMethod(…)Method, but this method only supports dynamic compilation to static method, because this restriction can only be abandoned and Emitting is used to generate compilation scheme. Although Emitting scheme is powerful, it is a lot of trouble to implement. […]