Climb the treasure net with go language for the first time

Let's use go language to crawl "treasure net" user information. First, the request url is analyzed as follows: http://www.zhenai.com/zhenghun Next, use go to request the url. The code is as follows: package main import ( "fmt" "io/ioutil" "net/http" ) func main() { //Return request get return result resp, err := http.Get("ht ...

Posted by godwheel on Thu, 17 Oct 2019 10:04:30 -0700

File upload of spring MVC

Spring MVC provides direct support for file upload, which is implemented through plug and play MultipartResolver interface. Spring is implemented with its implementation class CommonsMultipartResolver. There is no MultipartResolver in the context of spring MVC, so by default, spring MVC cannot handle th ...

Posted by CONFUSIONUK on Wed, 16 Oct 2019 09:24:55 -0700

Lazy load of spring learning

Lazy Under normal circumstances, bean loading starts after the container is started, so if there is an error in the loading process, it can be found immediately. Due to some specific business requirements, some beans need to be created at the first request of the IoC container. These beans can be marked as delayed loading. XML In the XML config ...

Posted by Robert07 on Tue, 15 Oct 2019 12:53:13 -0700

Android -- base64 encryption and decryption algorithm

Base64 is one of the most common encoding methods used to transmit 8Bit bytecode on the network. Base64 is a method based on 64 printable characters to represent binary data. You can view RFC2045 ~ RFC2049, which has the detailed specification of MIME. Base64 encoding is a binary to character proc ...

Posted by Francois on Tue, 15 Oct 2019 08:52:31 -0700

The naming of spring learning bean

bean name Each bean has one or more identifiers that must be unique in the container. XML If neither id nor name is specified, the IOC container will automatically generate a unique identifier, that is, the full class name. Unique identifier if only id or name is specified. If specified at the same time, id is an identifier and name is an alia ...

Posted by gabrielkolbe on Tue, 15 Oct 2019 07:23:17 -0700

Python 3 reads mail content

Preface Mail collection mainly includes pop (mainly used for remote management of mail on the server on the client) and IMAP (interactive mail access protocol). The relevant modules poplib and imaplib are provided in the corresponding Python. Although POP3 is widely supported, it is outdated, and the implementation of POP3 servers varies grea ...

Posted by dr4296 on Mon, 14 Oct 2019 12:46:10 -0700

How does Redis actually achieve the function of "nearby people"?

Preface For the application scenario of "nearby people" in the field of location-based services, many spatial indexes such as PG, MySQL and Mongo DB can be used to implement it. Redis, which combines its ordered queue zset and geohash coding, achieves the function of spatial search and has a very high operational efficiency. This pap ...

Posted by reidme on Mon, 14 Oct 2019 03:14:34 -0700

Maven: How to add resources and class files when using spring-boot-maven-plugin

When using spring-boot-maven-plugin to package JAR for current projects, it is often necessary to add some resources and class files under non-default paths to the JAR package. The following can be configured in pom.xml <build>     <plugins>         <plugin>             <group ...

Posted by dniezby on Sun, 13 Oct 2019 14:07:57 -0700

Python: Converting txt files to csv

Recently, a lot of txt files need to be converted into csv file format in the project. In the past, excel files were opened manually and then imported into txt to produce csv files. As this has become a weekly need, we decided to use python automation script to achieve this idea: Read all txt files in the folder and save them in the list For ...

Posted by gmann001 on Sun, 13 Oct 2019 12:40:55 -0700

Android Uses Popup Windows to Customize Bubble Bubble Window

As a rookie, he suddenly wanted to know about the bubble pop window, so he wrote a simple pop window to look for information. Personal feeling is in line with the level of novice birds;   First, customize the bubble box public class MyLinear extends LinearLayout { private Paint paint; // ...

Posted by roliver on Sun, 13 Oct 2019 08:55:04 -0700