The logging module in Python is encapsulated to record bug logs and log levels

Is the log generated by the program Programmer defined Output at the collector and channel level The role of logs and reports: The focus of the report is on the execution results (successful execution failure, how many use cases are covered), and the returned results The focus of the log is on the execution process, exception points, where to ...

Posted on Mon, 06 Jan 2020 09:47:34 -0800 by attock

Store the data crawled by the crawler framework into mysql database

Crawling website data by using scratch is a relatively mainstream crawler framework at present, which is also very simple. 1. After the project is created, change the value of robotstxt'obey to False in settings.py. Otherwise, it will follow the robots protocol by default, and you will not be able to crawl any data. 2. Start ...

Posted on Sun, 05 Jan 2020 12:57:11 -0800 by the max

How to use spiel expression in Spring framework

In the Spring framework's XML configuration mode or annotation configuration mode, we can use spiel expressions, whose syntax is {expression}. 1 XML based configuration In the XML configuration, we can inject dynamic values for the Bean's attributes or constructor input parameters through the spiel expression: <?xml version="1.0 ...

Posted on Sun, 05 Jan 2020 02:33:12 -0800 by riddlejk

windows service uses log4net to record logs

Recently, I wrote a timed mail push service. When I used lognet4 to record logs, I found that the logs were not recorded. Later, I learned that Windows service is generally in C:\Windows\System or C:\Windows\System32 by default, while our own service programs are generally placed in other directories, so the configuration path in log4net.config ...

Posted on Sun, 05 Jan 2020 00:26:22 -0800 by damianjames

Implement custom View components in Android and enable them to follow the mouse

scene The results are as follows     Note: Blog: https://blog.csdn.net/badao_liumang_qizhi Focus on Public Number Domineering program ape Get programming-related e-books, tutorial pushes, and free downloads. Realization New Android project, open activity_main.xml first Modify it to FrameLayout Frame Layout Layout Manager and add Id propertie ...

Posted on Sat, 04 Jan 2020 09:16:20 -0800 by goocharlton

Android learning (12)FremaLayout? Frame layout (frame layout)

Android learning (12)FremaLayout? Frame layout (frame layout) FremaLayout? Frame layout: Frame layout is a relatively simple layout, and all views added to this layout will be displayed in a cascade manner. The top of the code is placed at the bottom, and the bottom is placed at the top. 1. Add five textviews to the layout ...

Posted on Fri, 03 Jan 2020 17:07:56 -0800 by kubis

Android uses Tencent OCR to find controls that are not recognized by UiAutomator

Recently, some colleagues complained that the space of some interfaces of UiAutomator was not recognized, so that some function automation script development was blocked. For this, I studied an adbui library released by Tencent before. This library is python version, and one of them solved the problem of control not recognized ...

Posted on Fri, 03 Jan 2020 15:50:05 -0800 by Manat

RocketMQ source code: communication protocol design and codec

This paper mainly analyzes the design of RocketMQ communication protocol. RocketMQ has designed its own communication protocol for the conversion between message content and binary format. The version of RocketMQ is: 4.2.0 release. 1, Format of communication protocol 1.length: 4-byte integer, total length of two, three and four parts; 2. ...

Posted on Fri, 03 Jan 2020 15:27:21 -0800 by liamthebof

Android control ProgressBar progress bar

Android control -- ProgressBar progress bar Here's a detailed introduction to ProgressBar I. description The visual indicator in the progress of some operations presents the progress of operations for users. Generally, the video has a progress bar to display the intermediate progress, such as the progress of the buffer playe ...

Posted on Fri, 03 Jan 2020 08:33:03 -0800 by superwormy

Design mode: simple factory mode (static Communist method mode)

The simple factory consists of three roles: 1) Abstract product class 2) Specific product class (inherit leisure product class) 3) Factory (production of specific products)   Specific code implementation 1. Abstract product class /** * abstract class */ public abstract class Car { /** * Product abstract methods will b ...

Posted on Thu, 02 Jan 2020 11:01:35 -0800 by evilgenius