Deeply decrypt sync.Pool for Go Language

Recently, you have encountered a problem with GC in your work: a lot of objects are created repeatedly in your project, causing a huge amount of GC work and frequent CPU dropouts.Prepare to use sync.Pool to cache objects and reduce GC consumption.In order to make it easier to use, I specially studied it to form this article.This article from th ...

Posted on Sun, 19 Apr 2020 19:43:34 -0700 by tshafer

Application and summary of sequence in MySql

The sequence in Mysql is mainly used for the primary key, which is an incremental field and cannot be repeated. Mysql is different from Oracle in that it does not support the original sequence, and it needs to use the combination of tables and functions to achieve similar sequence functions. 1. First create the main table of the sequence /* N ...

Posted on Sat, 18 Apr 2020 07:58:14 -0700 by dominicd

C ා realize single printing of dense surface

Preface Fengmi face list is the face list of Shunfeng express which hides the personal information of users. This list can hide some information such as mailing, recipient's name, mobile phone and address, so that personal information will not be exposed directly. Let's take a look at two single renderings. Figure 1 Figure 1 is a template of ...

Posted on Sat, 18 Apr 2020 03:24:02 -0700 by mattl

Texting and calling

Let's make an interface like this     1. Click the button to call up the interface of calling and texting 2. Long press button to dial and send SMS directly We bind click monitoring on the interface <Button android:id="@+id/btn_call" android:layout_width="wrap_content" android:layout ...

Posted on Tue, 14 Apr 2020 08:16:26 -0700 by Boz

Using python to record problems encountered in budget system

1, Use df.loc [] to query by criteria File "/Users/jiangmengliang/PycharmProjects/jiang.ml/budget/cost_budget/expense_down_api.py", line 2434, in main rev = ExpenseApiDown(cfg_path, log=logging) File "/Users/jiangmengliang/PycharmProjects/jiang.ml/budget/cost_budget/expense_down_api.py", line 793, in __init__ self.done = self.sp ...

Posted on Tue, 14 Apr 2020 08:06:18 -0700 by grahamb314

Popular understanding of spring source code -- resource location and loading

Popular understanding of spring source (2) -- resource location and loading When you first learn spring, you usually use this method: ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml"); User user = (User)context.getBean("user"); The ApplicationContext here is also a container. It just refers to a Def ...

Posted on Tue, 14 Apr 2020 06:45:02 -0700 by jnutter

Pthon Learning Crawler Network Data Collection

Python gives the impression that it's very convenient to grab web pages, and it provides this productivity mainly throughurllib, requests. urllib for network data collection urllib LibraryOfficial Document Address: https://docs.python.org/3/library/urllib.htmlThe urllib library is python's built-in HTTP request library that contains the follow ...

Posted on Mon, 13 Apr 2020 15:16:28 -0700 by jschofield

Build project series based on. NETCORE 3.1 -- export documents with Swagger (extra chapters)

Preface Review the previous two articles Swagger makes Api interface documents On the whole, we have learned how to build a framework of automatic production API specification documents based on the project of net core 3.1. Originally, on the basis of Swagger, the front and back-end developers could have more convenient communication during t ...

Posted on Sun, 12 Apr 2020 23:26:16 -0700 by Napper

Chinese text classification practice

This blog will systematically introduce the process and related algorithms of Chinese text classification. Starting from the background of text mining and centering on text classification algorithm, this paper introduces the process and related knowledge of Chinese text classification project. Knowledge points involve Chinese word segmentation, ...

Posted on Sun, 12 Apr 2020 23:04:38 -0700 by techjosh

go series tutorial-string

1. What is a string? A string is a byte slice in the Go language.By placing the content between the double quotation marks'', we can create a string. Let's look at a simple example of creating and printing a string. package main import ( "fmt" ) func main() { str := "hello golang" fmt.Println(str) } Run programs online hello go ...

Posted on Sat, 11 Apr 2020 10:51:05 -0700 by gunhoe86