Remote http file upload and file2multipartfile in java

There are times when you encounter various needs in your work, and you have to change your approach to solving them. Of course, what is important is in what scenarios to complete them. For example, how the file type in Strut2 is converted to the multipartfile type, I looked for a few days and found a workaround documented below (although it did ...

Posted by PascalNouma on Fri, 31 Jan 2020 12:38:47 -0800

Spring Security Series (7) remember user name login function

Remember the basics of my function The user sends a request to UsernamePasswordAuthenticationFilter. When the user authenticates successfully, a service like RemeberMeService will be called. There is a Token repository in the service, which will generate a Token, write the Token to the Cookie of the browser, and at the same ...

Posted by genistaff on Fri, 31 Jan 2020 07:29:57 -0800

21 days to build a distributed crawler (I) urllib Library

1.1.usage of urlopen function #encoding:utf-8 from urllib import request res = request.urlopen("https://www.cnblogs.com/") print(res.readlines()) #urlopen Parameters #def urlopen(url, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, # *, cafile=None, capath=None, cadefault=False, context=None): 1.2.urlretriev ...

Posted by greywire on Thu, 30 Jan 2020 20:29:55 -0800

Come on, Wuhan! Crawling Baidu migration map data

Recently, in order to build a model to predict the spread of the virus, we need to crawl the data on Baidu's migration, and write here 1, Find the law First of all, we open http://qianxi.baidu.com/, and randomly query the information of a city, such as Beijing 29: You can find the data here. Let's lo ...

Posted by heckenschutze on Thu, 30 Jan 2020 07:49:47 -0800

Implement dataTable plug-in in SSM to realize paging

01 download resource file The following three JS and CSS resource files are introduced into the project in the BootStrap front-end framework <!-- DataTables --> <script src="/static/assets/bower_components/datatables.net/js/jquery.dataTables.min.js"></script> <script src="/stat ...

Posted by DaZZleD on Thu, 30 Jan 2020 06:43:38 -0800

Web front-end knowledge combing -- Javascript common syntax

JavaScript, like HTML and CSS, is the three necessary modules for Web front-end development. In addition, JavaScript is also the basic language of Vue, Ext, jQuery and other frameworks, so the learning of JavaScript is crucial. In fact, after learning the C + + language and Java, I feel that the basi ...

Posted by smiley_kool on Wed, 29 Jan 2020 21:06:05 -0800

[blockchain] Tendermint - local single node deployment

Tendermint Due to work reasons, I began to contact Hyperledger Fabric two years ago, and its community is still very active. It has developed from v0.7 in that year to v2.0 now. But I have to say that Fabric's consideration is still very big, which is difficult for secondary development. So recently, ...

Posted by dayang on Wed, 29 Jan 2020 03:26:18 -0800

vscode compiles c + + files using (msvc)cl.exe and (MingW)g++.exe at the same time

I did not find what I wanted on the Internet. I made a great success. I hereby record it for your reference. Vscode download and installation are very simple, smart you will see. This paper focuses on how to use vscode in the same c + + project to freely switch between using Microsoft msvc's cl.exe and ...

Posted by wizzard on Wed, 29 Jan 2020 02:46:08 -0800

Python 3 requests module usage example

Requests automatically send HTTP/1.1 requests through urlib3. It can easily implement cookies, login verification, proxy settings and other operations. Python's built-in urllib module is used to access network resources. However, it is troublesome to use and lacks many practical advanced functions. ...

Posted by Cerebral Cow on Wed, 29 Jan 2020 01:30:35 -0800

Using enumeration in Java well, it's not so simple!

Recently, I revisited Java enumeration and saw this article that I thought was good, so I simply translated and improved some content and shared it with you. I hope you can also get something. In addition, don't forget that there is a supplement at the end of the article! ps: here is an enumeration article, which is also a very practical pract ...

Posted by habib009pk on Wed, 29 Jan 2020 00:19:07 -0800