php version: filter out sensitive words such as advertisements

Now the network is still very messy, especially full of all kinds of **, **, and ** related content, it is obvious that this is not in accordance with our country's law, so in order to a product can live a long and healthy life, it is better to use a certain strategy to filter or remind users not to send such content. But it's easier said than ...

Posted by jamie85 on Fri, 11 Oct 2019 00:28:28 +0200

7. AOP Creation Agent for Spring Source Analysis 7

1. Prepare to create an agent protected Object wrapIfNecessary(Object bean, String beanName, Object cacheKey) { //1. Finding Enhancers Object[] specificInterceptors = getAdvicesAndAdvisorsForBean(bean.getClass(), beanName, null); if (specificInterceptors != DO_NOT_PROXY) { //2. Creating Agents Object proxy = createProxy(bea ...

Posted by denoteone on Thu, 10 Oct 2019 20:54:33 +0200

Solutions for Packing and Unpacking in Netty

Packet sticking and unpacking are inevitable in TCP network programming. Whether the server or the client, when we read or send messages, we need to consider the underlying TCP packet sticking/unpacking mechanism. TCP sticking and unpacking TCP is a "flow" protocol. The so-called stream is a string of data without boundaries. The ...

Posted by xsaero00 on Thu, 10 Oct 2019 15:49:00 +0200

lombok goes deep into practice

Official website video Official address: https://projectlombok.org The home video of the official website demonstrates how to use Lombok in eclipse. Project Lombok is a java library that automatically plugs into your editor and build tools, spicing up your java. Never write another getter or equals method again, with one annotation your class ...

Posted by Johns3n on Thu, 10 Oct 2019 14:57:24 +0200

21. Behavior-State Model

State Pattern: Allows an object to change its behavior when its internal state changes, and the object appears to modify its class. Its alias is Objects for States, and state mode is an object behavioral mode. The state pattern consists of the following roles: Context: The environment class, also known as the context class, is an object with mu ...

Posted by catreya on Thu, 10 Oct 2019 11:41:38 +0200

python day4 tuple/dictionary/set class knowledge point supplement

Catalog python day4 tuple/dictionary/set class knowledge point supplement 1. tuple knowledge point supplement 2. Knowledge Point Supplement of Dictionary dict 3. Basic data type set 4. Ternary operations, also known as trinomial operations 5. Deep duplication and shallow duplication 6. ...

Posted by DaveTheAve on Thu, 10 Oct 2019 10:38:05 +0200

Python Form Printing

Python programming is a quick way to practice project topics. Welcome to identify and optimize!Write a function called printTable(), which accepts a list of strings and displays it in groupsIn well-woven tables, each column is right-aligned. Assume that all inner lists contain the same number of strings. For example,The value may look like thi ...

Posted by archbeta on Thu, 10 Oct 2019 05:12:58 +0200

AspectJ usage example

1. Enabling AspectJ annotation support in Spring 1 To use AspectJ annotations in Spring applications, you must include AspectJ class libraries under classpath: aopalliance.jar, aspectj.weaver.jar, and spring-aspects.jar maven Introduces <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop< ...

Posted by bibby on Wed, 09 Oct 2019 01:11:21 +0200

Requ. getRequest URL () gets the server address, nginx reverse proxy host configuration, and the use of tomcat embedded in spring boot

tomcat uses the nginx reverse proxy, and the server path obtained becomes the intranet address configured in nginx. If on the same server, it becomes 127.0.0.1 or localhost. What we need is the extranet address. At this time, we need to enable the forwarding request header configuration.   How to enable it? Next, look at the sour ...

Posted by centipede on Tue, 08 Oct 2019 17:21:22 +0200

pygame creates a simple window

Before that, we had a basic understanding of the common modules of Pygame, and some methods and functions of common modules. Now we can simply use pyGame to create a window that can change color. Let's see: First we need to import modules: import pygame, sys Then you need to initialize pygame, and I define a pygame_test() method, so if you ...

Posted by CodeJunkie88 on Tue, 08 Oct 2019 12:34:20 +0200