• Mybatis first level cache results in inconsistent query results with expected results


    Example SQL: @Transactional public RebateContract getInfo(RebateContract contract) { RebateContract rebContractInfo = rebateContractDao.getInfo(contract); logger.info(“agentId:” + rebContractInfo.getAgentId()); rebContractInfo.setAgentId(10000L); //Instead of querying, get the value of rebcontractinfo from the cache RebateContract rebContractInfo1 = rebateContractDao.getInfo(contract); logger.info(“agentId1:” + rebContractInfo1.getAgentId()); return rebContractInfo1; } Implementation results:Note: it must be in the same thingAfter one query in the same transaction, directly repair the […]

  • Swagger UI modifies the default request address


    problem Deploy the springboot application to the server, access the swagger UI through the domain name (through the nginx agent) for front-end and back-end joint debugging, but when you actually click execute, you will be prompted:TypeError: Failed to fetch For example, the address of swagger UI is: https://foo.com/test/api/insurance/swagger-ui/index.html Click execute to call the back-end interface […]

  • Bidirectional sliding selector (interval selector) on the side of small program


    Development found that there is no more convenient and smooth two-way selector on the small program side, so a simple plug-in is encapsulated <view class=’sliderView’ id=”slider” > <movable-area class=”slider_warp”> <view class=”slider_line”></view> <view class=”slider_line_top” style=”left:{{_sliderLineLeft}}px;width:{{_sliderLineWidth}}px” ></view> <movable-view class=”left” direction=”horizontal” x=”{{_sliderMinLeft}}” animation=”{{!enAnimation}}” bindchange=”sliderChange” data-type=”min” ></movable-view> <movable-view class=”right” direction=”horizontal” x=”{{_sliderMaxLeft}}” animation=”{{!enAnimation}}” bindchange=”sliderChange” data-type=”max” ></movable-view> </movable-area> </view> js Component({ […]

  • Python functions of Python ensemble


    1. Formal parameters and actual parameters When using functions, formal parameters and actual parameters are often used. They are both called parameters. The difference between them will be explained through the function of formal parameters and actual parameters. The differences between formal parameters and actual parameters are as follows Formal parameters: when defining a function, […]

  • Mobile carousel sliding effect (swiper Implementation)


    Swiper website address:https://www.swiper.com.cn/ Practical application of swiper in mobile terminal (Demo) https://www.swiper.com.cn/demo/senior/index.html https://blog.csdn.net/weixin_42931825/article/details/100120922    

  • Gson of Java source code analysis


    1: To the official website, the main function of gson is the mutual conversion between Java objects and JSON. Let’s take a look at the simplest example @AllArgsConstructor public static class Book{ private Integer id; private String name; } public static void main(String[] args) { Map<String,Book> map = Maps.newHashMap(); map.put(“1″, new Book(1,”1”)); map.put(“2″, new Book(2,”2”)); […]

  • How to deal with continuous range in MySQL


    1. Practical issues The continuous range problem is also a very classic SQL programming problem, which is often used in the actual development. There are many methods to deal with it, but it generally uses digital auxiliary table and grouping. Here are some examples create table t(a int unsigned not null primary key); insert into […]

  • Arma-egarch model of R language and integrated prediction algorithm are used to predict the actual volatility of SPX


    Link to the original text:http://tecdat.cn/?p=12174 – introduce This paper compares several time series models to predict the daily growth of the SP500 indexReal volatility. The benchmark is arma-egarch model of SPX daily return series. It is compared with GARCH model   。 Finally, the ensemble prediction algorithm is proposed. Assumptions The actual volatility is invisible, […]

  • Use of golang iris


    Install iris go get github.com/kataras/iris example Register a route to the API of the service app := iris.New() app.Handle(“GET”, “/ping”, func(ctx iris.Context) { ctx.JSON(iris.Map{“message”: “pong”}) }) app.Run(iris.Addr(“:8080″)) A few lines of code can be achieved, through the browser access http://localhost : 8080 / Ping will return {“message”: “Pong”} Use handle function to register method, path […]

  • Oracel empty string to 0, null to 0 processing method


    Case study: Select decode (columnname, value 1, translation value 1, value 2, translation value 2,… Value n, translation value n, default) From talbename Where … practical application decode(cxcygzcg, ”, 0, null, 0, cxcygzcg) cxcygzcg

  • On CSS display:flex;flex :grow, flex:shrink


    The role of flex layout in development: 1. Solve the layout problems that need to be solved by positioning position, floating float and percentage%,2. Solve the vertical align problem which is difficult to grasp before It’s easy to come across a question in an interview 200px on the left, full screen on the right In […]

  • What does it mean to write 1 = 1 after where condition in SQL statement


    preface Where 1 = 1 is the conditional logic judgment expression of SQL statement. Since 1 = 1 is true, the expression 1 = 1 will always return “true”. The actual purpose of this writing method is to obtain the logical value “true”. In fact, writing methods such as 2 = 2, 1 + 2 […]