namespace and use in php

For object - oriented programming, the concepts of namespace and use are very important 1. The root namespace is a backslash \, which is a bit similar to the root directory / in linux, but when using the var_dump() function to print, it is actually an empty string 1 var_dump(__NAMESPACE__); 2 //string(0) "" 2. For the child namespace under th ...

Posted on Mon, 18 Nov 2019 09:03:43 -0500 by zoooj

Basic Python-Selenium operations

1. Introduction One core of selenium is WebDriver, which starts the target browser, binds to the specified port, and then communicates directly with it. Install selenium: pip install selenium The following errors may be encountered when using: 'geckodriver' executable needs to be in PATH 'chromedriver' executable needs to be in PATH The instr ...

Posted on Sun, 17 Nov 2019 19:51:47 -0500 by zdzislaw

Two implementation methods of dynamic agent (dynamic agent based on interface and dynamic da based on subclass)

Two implementation methods of dynamic agent (dynamic agent based on interface and dynamic agent based on subclass) I. characteristics of dynamic agent: Bytecode is created on demand and loaded on demand. This is also the difference between it and static agents. Because the static agent is created and loaded as soon as the b ...

Posted on Sun, 17 Nov 2019 15:15:54 -0500 by PureDrive

PHP full stack learning notes 28

Database Mysql overview, database operation, data table operation, data type, management database order by asc; ascending desc descending order sql standard language: Data query language select Data definition language create/alter/drop Data operation language insert delete update grant revoke, a data control language, gives user ...

Posted on Sun, 17 Nov 2019 14:23:35 -0500 by ctcp

Introduction to Python crawler Lesson 8: hummingbird Web picture crawling Part 3

Hummingbird net picture The capacity of the previous tutorials is relatively large. Today, I write a relatively simple one. It's a hummingbird. I still use aiohttp. I hope you like it Crawling to the page https://tu.fengniao.com/15/, this tutorial is based on the purpose of learning. Why choose hummingbirds? I can't help it. I ...

Posted on Sun, 17 Nov 2019 12:18:49 -0500 by WhiteHawk

PHP exports large amount of data (csv)

If you want to export a large number of data at one time, such as hundreds of thousands or millions of data, there are often two problems: 1. Script execution timeout 2. Insufficient PHP memory The first problem is well solved: set ﹣ time ﹣ limit (0); when set to 0, the time of the script is not limited. However, it is not ...

Posted on Sun, 17 Nov 2019 10:34:40 -0500 by n_wattam

asp.net core obtains the real client ip under Nginx+Docker deployment mode

scene The online environment uses nginx (installed on the host) + Docker for deployment. The IP address of the client obtained by the application is incorrect. The code to obtain the IP address of the client is Request.HttpContext.Connection.RemoteIpAddress.MapToIPv4() Process restore Build a sample environment of webapi Create a new project do ...

Posted on Sat, 16 Nov 2019 16:19:22 -0500 by mtorbin

Wechat domain name anti blocking force jump to browser to open HTML page

This method can realize the jump from wechat built-in browser to other mobile browsers. Now, other methods on the Internet are just one page, which allows visitors to manually click the browser in the upper right corner to open, but this difference can be directly and automatically jump. When Android accesses, it can automatically jump to the ...

Posted on Sat, 16 Nov 2019 13:22:35 -0500 by ludjer

Illustration WeChat web page authorizes automatic login (with ThinkPHP5.1 code)

Zero. Preface At the beginning of WeChat development, due to inexperience and unclear official documents of WeChat, only "fool" was left after reading the document. We didn't know what process WeChat development was or how to start, so we had to consult the third-party blog.Finally, the docking between the WeChat Public Number and the ...

Posted on Sat, 16 Nov 2019 05:16:16 -0500 by sirstrumalot

Using Baidu ai to realize text and picture audit

Before the platform content release audit, we built a set of prohibited thesaurus by ourselves. In the code, we use thesaurus to judge the content published by users. Now we can use Baidu ai api to complete this function. Let's talk about how to do it First, open Baidu ai development platform to register an account: Register account and enter ...

Posted on Fri, 15 Nov 2019 13:08:27 -0500 by dbakker