Java Web advanced filter

Filter Chapter 1 basic use of filter 1. Initial filter Filter - filter: Filter is a component of J2EE Servlet module The function of Filter is to block URL s in a unified way Filter is usually used for global processing at the application level Three elements of filter development: *Any filt ...

Posted by robot43298 on Wed, 29 Jan 2020 06:47:14 -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

The AOP operation of Spring's aspectj

  AOP concepts 1 aop: Aspect oriented programming, extensions do not modify the source code implementation.   2 aop takes the horizontal extraction mechanism instead of the traditional vertical inheritance system duplicate code.   3 aop underlying implementation using dynamic proxy (1) In t ...

Posted by fiddlehead_cons on Tue, 28 Jan 2020 17:45:25 -0800

Spring AOP-01 pre enhanced MethodBeforeAdvice

1. Classes to enhance package com.test.springadvicetype; import org.springframework.stereotype.Component; import java.text.SimpleDateFormat; import java.util.Date; /** * Attendants */ @Component public class Waiter { /** * service * @param name */ public String serve(String name) { System.ou ...

Posted by Emperio on Tue, 28 Jan 2020 07:50:07 -0800

Android development case 2 - start and stop service in standard binding mode, and complete addition calculation

Android development case 2 - start and stop the service in the standard binding mode, and complete the addition calculation Preface 1. services When the startService() method is used to start the service, the execution life cycle method is onCreate(), onStartCommand(), and then the service is in the running state until the ...

Posted by PJ droopy pants on Mon, 27 Jan 2020 08:04:04 -0800

Python Basics - day 5

10- iteration What objects in Python support for loops (or traversal)? Answer: iteratable objects, or objects that implement the iterator protocol, support traversal or looping. (e.g. list, tuple, dictionary, file). The feature is the internal implementation of the \. Example: f = open('hello.txt', en ...

Posted by Skull on Sun, 26 Jan 2020 21:14:00 -0800

python crawler - crawl cat-eye movie top100 using requests Library

Use the requests library to capture the contents of the cat-eye movie TOPl100. Target site: https://maoyan.com/board/4 1. Grab Home Page Define the get_one_page method and pass it a url parameterNote: Cat Eye Movie website has anti-crawling measures, you can crawl after setting headers import reque ...

Posted by TylerL on Sun, 26 Jan 2020 20:10:10 -0800

Crawler learning (used by requests Library)

requests Library Although the urlib module in Python's standard library already contains most of the functions we usually use, its API is not very good, and Requests is advertised as "HTTP for Humans", indicating that it is more concise and convenient to use. Installation and documentation address: pip is very convenient to install: p ...

Posted by habuchas on Sun, 26 Jan 2020 03:44:04 -0800

Define custom properties

I need to implement my own properties, such as com.android.R.attr Nothing was found in the official documentation, so I need information on how to define these properties and how to use them from my code. #1st floor Qberticus has a good answer, but lacks a useful detail.If you want to implement these in the library, replace: xmlns:w ...

Posted by Stevan on Sat, 25 Jan 2020 20:50:19 -0800

Spring Road (12) -- assembling bean s in annotation configuration

background The last one talked about how to assemble bean in the xml configuration. In fact, the principle of bean in the annotation configuration is exactly the same as that in xml, and the effect is the same, but it adopts different ways. Therefore, we do not change the examples in this article, but ...

Posted by esport on Fri, 24 Jan 2020 02:18:11 -0800