Use and introduction of Facade

What is the Facade? At present, it is a class that is used to facilitate the static method call of the original class (undefined static method).The specific implementation of Facade is as follows:First look at the core document:\thinkphp\base.php`//Register static proxy of core classFacade::bind([ facade\App::class => App::class, facade ...

Posted by jsnyder2k on Fri, 06 Dec 2019 09:31:57 -0800

Statistics of on-line number of listeners

Implementation ideas The common process is that the standard mvc is the login form. The user submits the data to the login check. If the login check is passed, the session event will be triggered, saved and entered the online personnel list. The page will jump to the online user list. If the user logs out, it will be deleted from the online lis ...

Posted by Kurrel on Fri, 06 Dec 2019 00:03:33 -0800

nextcloud and oauth2 integration tutorial

Basic environment Nextcloud 15.0.5 oauth2 Install sociallogin Download in the official app store sociallogin Extract and copy sociallogin to app directory Open Nextcloud and enable it in the application Configure oauth2 Use the administrator account to open Nextcloud to find the sociallogin settings, select Custom OAuth2 and add oauth2 in ...

Posted by apaxson on Thu, 05 Dec 2019 21:30:04 -0800

Django 2.1.3 middleware use

Environmental Science Win10 Python3.6.6 Django2.1.3 Middleware role Middleware is used to globally modify the input or output of Django. Common uses of Middleware cache Session authentication Log record abnormal Middleware execution process image Global exception capture implementation Create django project & add app ...

Posted by piet123 on Thu, 05 Dec 2019 11:03:17 -0800

iOS Development -- MQTT real-time data processing

I. MQTT MQTT protocol is used in an Internet of things project, which can be used to communicate between devices and software MQTT: instant messaging protocol, transport layer protocol Two. Commonly used: 1. Mqttkit (no longer maintained) 2.MQTTClient a. set address port, account password and other basic information b. subscribe to topic ...

Posted by conor.higgins on Thu, 05 Dec 2019 04:59:50 -0800

02 flask user authentication and role management database design

Authentication management New database create database `flasky` default character set utf8 collate utf8_general_ci; Required plug-ins Flash mail: used to send authentication information Flask login: used to manage session s Werzeug + its dangerous: used for adding salt to the password hash Flash WTF: form object creation Flash bootstrap: bo ...

Posted by gladiator83x on Wed, 04 Dec 2019 23:29:13 -0800

Spring boot integrates shiro configuration

1. Configure lifecycle bean postprocessor to manage lifecycle 2. Configure ShiroFilterFactoryBean to set which paths require authentication and which do not 3. Enable shiro Aop annotation to support AuthorizationAttributeSourceAdvisor 4. Configure SecurityManager to manage custom realms, session s, and caches Realm realizes logi ...

Posted by Wintergreen on Wed, 04 Dec 2019 20:33:14 -0800

Hibernate -- learning (12) -- one to one association based on foreign key mapping

1. For the 1-1 association based on foreign key, the foreign key can be stored on either side, and the many to one element can be added at the end where the foreign key needs to be stored. Add unique = "true" attribute to many to one element to represent 1-1 Association 2. The other end needs to use the one-to-one ...

Posted by zemerick on Wed, 04 Dec 2019 16:10:41 -0800

Basic use of crawler Requests

Basic use of Requests install pip install requests I. Requests module request Get web page (without parameters) r = requests.get('http://www.chinahufei.com') r = requests.post('http://www.chinahufei.com') r = requests.delete('http://www.chinahufei.com') r = requests.head('http://www.chinahufei.com') r = requests.options('http://www.chinahuf ...

Posted by wefollow on Wed, 04 Dec 2019 15:37:24 -0800

Spring security personalized user authentication process: handling of success / failure of custom login

1. User defined login processed successfullyWhat needs to be handled successfully is user-defined login, because there is more than one login behavior, which may be ajax request, and the default is form submit jump behavior, which is not a result we want at this time. If you want to customize the behavior after successful login? Only the Authe ...

Posted by Paghilom on Wed, 04 Dec 2019 11:30:05 -0800