• Learn a Linux command every day (72): tcpdump


    Command introduction Tcpdump command is a package capturing tool in UNIX / Linux like environment. Tcpdump uses the command line mode to filter and grab the packets of the interface. If tcpdump without any options, it will grab the first network interface by default, and it will stop capturing packets only when the tcpdump process […]

  • Spring boot oauth2 uses resttemplate to log in automatically in the background


    The content is not limited to the login business, mainly a brief introductionRestTemplateUsage of, including Using resttemplate for post requestpostForObject Use resttemplate with body / form data for post requestMultiValueMap Using resttemplate with Josn for post requestJSONObject Use resttemplate to lead information headers for post requestHttpHeaders Login process Define resttemplate Define multivaluemap and construct the […]

  • Set cookie in response and cookie in request


    Only the client can set a cookie. If the server wants to add a cookie item to the client, it needs to send the cookie item to the client by using set cookie in the HTTP header when answering. In this way, the client will bring the cookie item with it in the next visit. […]

  • Vscode adds file header comments and function comments [korofileheader]


    koroFileHeader In vscode for generating file header comments and function comments plug-in, after multi version iteration, plug-in: support all mainstream languages, flexible and convenient, complete documentation, simple to eat! If you think the plug-in is good, give it a tryStar⭐ Come on~ Application effect: brief introduction Add comments to the file header: Add comments at […]

  • What is a neural network?


    I know a radius r as a parameter, and I want to make a nice face. There are 10 pictures in my brain capacity, which are: obscene man, big beauty, tech house, little Lori, little Zhengtai, grandma, dinosaur sister, Gao fushai, Laozi, Phoenix man. At this time, the user said, these are not good-looking, I’ll […]

  • Delicious chocolate


    Title Description The supermarket is selling chocolates at a special price, and lucky is being greedy_ Dog saw it.Chocolate from left to right in a row, a total of N, m kinds.There is a strange rule in the supermarket, that is, when you buy chocolate, you must provide two numbers a and B, representing that […]

  • Go’s bytes.buffer Buffer


    1、 Create buffer period bytes.buffer Is a buffer byte type buffer 1. Use bytes.NewBuffer Create: if the parameter is [] byte, the buffer contains the slice; if the parameter is nil, an empty buffer is created. 2、 bytes.NewBufferString establish 3、bytes.Buffer{}  func main(){ buf1 := bytes.NewBufferString(“hello”) buf2 := bytes.NewBuffer([]byte(“hello”)) buf3 := bytes.NewBuffer([]byte{‘h’,’e’,’l’,’l’,’o’}) The above three are […]

  • H5 + API sets the color of mobile phone status bar and immersive status bar


    Set status bar background color plus.navigator.setStatusBarBackground(‘#38c’); Set the text color of the status bar (only black or white can be set light > White > dark > black) plus.navigator.setStatusBarStyle(‘light’);   Immersive status bar (system support: Android 4.4 and above, IOS 7.0 and above) 1. Judge whether immersion is supported or not plus.navigator.isImmersedStatusbar() It is not […]

  • HTTP vs http2 details


    Disadvantages of http1 The end of the thread is blockedIn this way, several requests are queued and serialized for single thread processing, and the subsequent requests can only be executed when the previous request returns. Once a request times out, the subsequent requests can only be blocked, and there is no way, that is, the […]

  • Mobile terminal rem.js


    Rem is only related to the font size of HTML, such ashtml{font-size: 16px} body{font-size: 62.5%}So 1rem is still 16px, nothing else The following JS is introduced into the header, and the font size of HTML is automatically set according to the screen width. If the design drawing is 750px wide, 100px on the design drawing […]

  • Problems encountered in golang


    To define a package, the package name is main, because main is the package name of the executable program. All source file headers must have a package declaration statement (package main), because go manages the namespace through the package name

  • Axios various request parameter transfer formats


    HTTP parameter transfer mode header、query、body 1⃣️ header Request Headers cookie: xxx 2⃣️ query url?id=1 3⃣️ body request payload 🚩 axios One A kind of Head pass ginseng axios.post(url, data, { headers: { ‘token’: token } }).then(function(response) { console.log(response) }); 2⃣️ axios#get(url[, config]) // url?id=1 axios.get(url,{ params: { id: 1 } }).then(function (response) { console.log(response); }) […]