Based on Dapper, two easy to use ORM tools category: SqlDapperUtil

Based on Dapper, we encapsulate an easy-to-use ORM tool class: SqlDapperUtil, which simplifies and encapsulates all kinds of CRUDs that can be used everyday, so that ordinary programmers only need to pay attention to business, because it is very simple, so we can paste the source code directly, if we need to use it, we can directly encapsulate it.Copied to the project, the SqlDapperUtil has been widely used in company projects. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Dapper; using System.Data; using Syst...

HTML image flipping

var Lb = false; var Ub = false; function rotate(obj) { if (obj == "L") { if (Lb == false) { //For the first time document.getElementById("img1").classList.add("flipx"); } else { document.getElementById("img1").classList.remove("flipx"); } Lb = !Lb; } if (obj == "U") { if (Ub == false) { //For the first time document.getElementById("img1").classList.add("flipy"); } else { ...

Long string

  To represent a long string (strings spanning multiple lines), use three single quotes or three double quotes. >>> print('''This is a long story. >>> print("""This is a long story. ... It continues here.      ... It continues here. ... And it not over yet. ... And it not over yet. ... Hello World''') ... Hello World""") This is a long story. This is a long story. It continues here.      It continues here. And it not over yet. ...

MySQL calculate the distance between two longitude and latitude, including specific SQL statements.

/*The incoming parameters are latitude latitude longitude ASC ascending order from near to far DESC descending order from far to near * / SELECT *, ROUND( 6378.138 * 2 * ASIN( SQRT( POW( SIN( ( 40.0497810000 * PI() / 180 - lat * PI() / 180 ) / 2 ), 2 ) + COS(40.0497810000 * PI() / 180) * COS(lat * PI() / 180) * POW( SIN( ( 116.3...

Implementation of a simple JavaScript throttle

Throttle javascriptThrottler is mainly used to delay the execution of certain actions, such as Ajax requests, if the input box registered the input event, then when the user input will continue to trigger this event, if the callback function continues to call the background interface through ajax, it will produce a certain serverPressure. Consider some way to defer Ajax requests, for example, by delaying 0.5s calls to the back-end interface when an input event is triggered, thus relieving the pressure on the server to some extent.Here is a simple throttle. 1 /** 2 * Throttle 3 * @param [f...

JVM

1. jvm Principle: Reference: https://baijiahao.baidu.com/s? Id=1606480770208000096& wfr=spider& for=pc Description: JVM tuning is mainly to optimize Heap heap and Method Area method area. Heap heap The heap is the largest area in the JVM. The object and data of the application are in this area. This area is also shared by threads. It is also the main recovery area of gc. A JVM instance has only one heap class memory. The size of the heap memory can be adjusted. The class loader reads the class file and needs to do so.To put classes, methods, and constants in the heap memory for easy ...