• Password based cryptography (PBE)


    Password based cryptography (PBE) Password based encryption (PBE) is a method of generating key based on password and using the key to encrypt. Encryption and decryption use the same key. According to the user’s own password and salt generated password, let’s first look at the encryption process: The encryption process can be divided into the […]

  • MySQL variable description


    #Variable #1、 System variables #1》 Global variables #① View all global variables SHOW GLOBAL VARIABLES; #② View some system variables that meet the conditions SHOW GLOBAL VARIABLES LIKE ‘%char%’; #③ View the value of the specified system variable SELECT @@global.autocommit; #④ Assign a value to a system variable SET @@global.autocommit=0; SET GLOBAL autocommit=0; #2》 Session […]

  • PHP session_ cache_ Expire session function


    Definition and Usage session_cache_expire– returns the expiration time of the current cache grammar session_cache_expire ( [ string $new_cache_expire ] )    session_cache_expire()Return session.cache_ The set value of expire. When the request starts, the cache expiration time is reset to 180 and saved in the session.cache_ Expired configuration item. Therefore, for each request, thesession_start()Call before function […]

  • MySQL lock mechanism


    Interior lock MySQL performs internal locking within its own server to manage contention for table content by multiple sessions. Internal lock can be divided into row lock and table lock. External lock MySQL provides options for client sessions to explicitly acquire table locks to prevent other sessions from accessing tables. You can use the lock […]

  • Zookeeper client API


    Introducing dependencies <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> <version>3.4.6</version> </dependency> Create connection Interface description ZooKeeperConstructor description public ZooKeeper(String connectString, int sessionTimeout, Watcher watcher); public ZooKeeper(String connectString, int sessionTimeout, Watcher watcher, boolean canBeReadOnly); public ZooKeeper(String connectString, int sessionTimeout, Watcher watcher, long sessionId, byte[] sessionPasswd); ZooKeeper(String connectString, int sessionTimeout, Watcher watcher, long sessionId, byte[] sessionPasswd, boolean canBeReadOnly); Parameter interpretation connectString: […]

  • Common middleware (plug-in) of express framework


    1. body-parser For post request parsing req.body Message body 2. express-ip-filter IP filter 3. morgan 、 winston 、 express-winston Logging 4. Cookie parser and cookie session Cookie session middleware is used to establish session session based on cookie 5. request-validate Parameter verification of koa2, express and nodejs 6. config-lite Read configuration file 7. express-session Session […]

  • Oracle operation and maintenance — 07. Check the lock resource


    1. Check the lock table; SELECT /*+ RULE */ Ls.Osuser Os_User_Name, Ls.Username User_Name, Decode(Ls.TYPE, ‘RW’, ‘Row wait enqueue lock’, ‘TM’, ‘DML enqueue lock’, ‘TX’, ‘Transaction enqueue lock’, ‘UL’, ‘User supplied lock’) Lock_Type, o.Object_Name OBJECT, Decode(Ls.Lmode, 1, NULL, 2, ‘Row Share’, 3, ‘Row Exclusive’, 4, ‘Share’, 5, ‘Share Row Exclusive’, 6, ‘Exclusive’, NULL) Lock_Mode, o.Owner, Ls.Sid, […]

  • Zookeeper (3): conversation management


    This paper is first published in a brief book on mooring and floating https://www.jianshu.com/u/204… edition date remarks 1.0 2020.3.29 The first issue of the article 1.1 2020.4.18 Summary of improvement 1.2 2020.5.4 Fix the mistakes preface We know that zookeeper is a distributed collaborative system. In a large-scale distributed system, there must be a large […]

  • How to do session processing in PHP?


    Session processing is an important concept in PHP, which allows user information to remain unchanged on all pages of a website or application. Next, this article will take you to learn the basic knowledge of session processing in PHP, hoping to help you. What is session in PHP? Session is a mechanism to retain information […]

  • Yii uses easywechat to implement an applet to obtain the user’s openid


    1: Installing easywechat Easywechat documentation: https://www.easywechat.com/docs Using easy wechat in Yii, there are two extensions that can be used: jian74 / yii2-easy-wechat for easywechat 4. X, Max Wen / yii2-easy-wechat for easywechat 3. X, here I use jian74 / yii2-easy-wechat extension composer require jianyan74/yii2-easy-wechat 2: Configure easywechat 1: In config/ main.php Added in component of […]

  • Screen command in Linux


    Screen is a free software developed by GNU for command line terminal switching. Users can connect multiple local or remote command-line sessions at the same time through the software, and switch freely between them. GNU screen can be regarded as the command line interface version of window manager. It provides a unified interface for managing […]

  • Sqlserver performance optimization, view CPU, memory intensive sessions and SQL statements


    1. View the sessions and SQL statements with the highest CPU consumption   select spid,cmd,cpu,physical_io,memusage, (select top 1 [text] from ::fn_get_sql(sql_handle)) sql_text from master..sysprocesses order by cpu desc,physical_io desc   2. View SQL statements with less cache reuse times and large memory consumption   SELECT TOP 100 usecounts, objtype, p.size_in_bytes,[sql].[text]  FROM sys.dm_exec_cached_plans p OUTER APPLY […]