[system log note 1] - rich Log4j2 configuration
Log4j should be more familiar to you. Log4j2 is a relatively large upgrade of log4j. The bottom layer uses disruptor rewriting to optimize the asynchronous output log, which greatly improves the performance. The author has made performance comparison among log4j, logback and log4j2, and log4j2 does show absolute advantages. Not much to say, the ...
Added by npereira on Sat, 02 Nov 2019 22:03:08 +0200
http module and fs module
Article link: http module and fs module
http module
responseObject common methods:
response.writeHead(200,{'Content-Type':'text/plain:charset=UTF-8'});
This method can only be called once on a message and must be calledresponse.end()Before calling.
response.write()Send a corresponding body to send the corresponding data to the client.writeI ...
Added by nrsh_ram on Fri, 01 Nov 2019 21:44:00 +0200
Look at spring 5 annotation AOP
Change AOP in XML mode to annotation mode.
Step 1: annotation configuration business class
Annotate the ProductService class with @ Component("s")
package com.how2java.service;
import org.springframework.stereotype.Component;
@Component("s")
public class ProductService {
public ...
Added by saint959 on Thu, 31 Oct 2019 22:36:10 +0200
Introduction to ORM framework SQLAlchemy
Related information/Official website address
1. Install sqlalchemy and check the version
Execute the following statement under the command line to install:
pip install SQLAlchemy
View version after installation:
import sqlalchemy
print(sqlalchemy.__version__)
In addition, PyMySQL needs to be installed, otherwise an error of modulenotfounderr ...
Added by prasad_deba on Thu, 31 Oct 2019 11:00:31 +0200
Take you to finish the novel sword in Python in 5 minutes (complete code attached)
Train of thought:
step 1: request Sword come. Novel site, get two things
Novel name -- create a folder with novel name under the same directory of Python program
Link address for each chapter of the novel
step 1 corresponds to the get uurl() function in the code, which also includes the multithreaded code used to speed up ...
Added by loquaci on Mon, 28 Oct 2019 22:50:49 +0200
Servlet initialization parameters (Servlet2.5,3.0)
I. use servlet 2.5 to initialize parameters
Servlet 2.5 is configured based on xml, so it is configured in xml.
Servlet 3.0 started to support annotation configuration.
There are two kinds of configurations: valid in the current Servlet and valid in the entire web container.
When the entire web contai ...
Added by dgrinberg on Tue, 22 Oct 2019 21:27:51 +0300
In depth study of Redis, analysis of basic types [Hash]
More wonderful articles, pay attention to the public account [tobetopjava Er], more tens of thousands of excellent vip resources for free waiting for you to take!!!
Next, we will analyze the basic type of Hash. I'm sure you are familiar with Hash. Next, we will go deep into the source code to analyze the implementation of Hash in Redis.
First ...
Added by sullyman on Tue, 22 Oct 2019 14:02:43 +0300
Learn AOP of Spring together
Summary
In the software development, we focus on business logic code, but in the actual development, the code that needs to be written is not only business logic, but also need to deal with logging, exception handling, transaction control and other things unrelated to business. And these codes are also necessary for the server. Codes like this ...
Added by vipes on Sun, 20 Oct 2019 18:13:02 +0300
Use MailKit to send an email with embedded pictures that do not appear as attachments
Use MailKit to send an email with embedded pictures that do not appear as attachments
Reference article: MailKit --- send mail
Be careful
Whether to display embedded pictures as attachments in the mail client is different according to different mails. Outlook and qq are not displayed as attachments after testing temporarily, and Sina mailbox ...
Added by XeoWolf on Sun, 20 Oct 2019 13:41:04 +0300
Summary of crawler's latest library requests HTML Library
Requests html is a relatively new crawler library. The author and requests are the same author.
I. installation dependency
pip install requests-html
When installing, we can see that lxml,reuqests,bs4 are installed... Our common parsing and crawling libraries are installed in him separately.
II. Request initiation
from requests_html import HTMLS ...
Added by kwilder on Thu, 17 Oct 2019 12:58:13 +0300