How to judge whether to submit data to the background only when all three input box conditions for registration are met
/**
*There are three input boxes on the registration page. You need all the conditions of the three input boxes to pass data to the server
*1. Wrap the main body with a function, and set three variables without parameters;
*2. Judge whether the data of each input box is correct, and return true if it is correct; return ...
Posted by nabeelkhan on Sat, 04 Jan 2020 19:59:29 -0800
Format chat list time
Recently, a function similar to customer service chat has been implemented.
But I don't know much about the time format that the list needs to be displayed
Therefore, refer to the time display logic of wechat chat list. I implemented a function myself
Specific rules:
If the time stamp to be formatted (T) > the time stamp in the morning ...
Posted by xcasio on Sat, 04 Jan 2020 11:25:41 -0800
PHP+MYSQL transaction processing
For PHP + MYSQL transaction processing, first of all, transactions must be supported during database design, so when designing data tables, InnoDB is selected as the database engine. If the database engine selected does not support transactions, such as MyISAM, it can be locked through tables
Here is a simple example of a tran ...
Posted by ceci on Sat, 04 Jan 2020 10:47:28 -0800
PHP Socket server building and testing
1.socket server building ideas
1) Objective: to understand the working mechanism of socket server
2) Idea: create socket - > Add socket to connection pool - > process receiving information - > handshake action - > send information
2.socket server code
Note: copy to php file, direct command line can run, no other support is requi ...
Posted by jdiver on Fri, 03 Jan 2020 23:13:03 -0800
phpcmsV9 custom prompt page style
phpcmsV9 custom prompt page style
The corresponding modified file is: phpcms/templates/default/content/message.html
First, let's take a look at the renderings before and after customization, as follows:
Custom UI style - all codes, refer to the following:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//E ...
Posted by edwardp on Fri, 03 Jan 2020 21:26:27 -0800
Nginx tcp reverse agent configuration and installation
Nginx upgrade supports stream module
Nginx is used as the reverse proxy of tcp. Currently, in versions 1.7 to 1.9, the [nginx ﹐ tcp ﹐ proxy ﹐ module] module needs to be loaded. After 1.9, the [with stream] module can be used.
Because LNMP is used for installation( https://lnmp.org/ ), the method of upgrading nginx directly ...
Posted by anthonyv on Fri, 03 Jan 2020 20:48:14 -0800
Using API interface to view, create and delete monitoring host in zabbix monitoring system
What is API:
API (Application Programming Interface) is a pre-defined function, which aims to provide the ability of application program and developers to access a set of routines based on a certain software or hardware without accessing the source code or understanding the details of internal working mechanism. In short, API ...
Posted by richo89 on Fri, 03 Jan 2020 17:28:46 -0800
[PHP] data structure - sequential storage structure of linear table in PHP
1. Arrays in PHP are actually ordered mappings, which can be regarded as arrays, lists, hash tables, dictionaries, collections, stacks, queues, not fixed lengths2. If multiple cells in the array definition use the same key name, only the last one will be used, and the previous ones will be overwritten3. If you want a parameter of a function to ...
Posted by kaveman50 on Fri, 03 Jan 2020 15:21:41 -0800
Cooperative application of swoole
The use of coroutine and goroutine of golang
coroutine's process is released after the trunk is finished, and other processes are executed
Automatically exit after goroutine's trunk ends
When the coroutine process of swoole is used, if a dead loop is used, the trunk is running all the time, and resources will not be released. Therefo ...
Posted by doofystyle on Fri, 03 Jan 2020 11:06:56 -0800
Swordsman (priority queue + input plug-in)
http://acm.hdu.edu.cn/showproblem.php?pid=6396
Title:
Give you group T input. Each group of input contains n (n < = 1E5), m (1 < = m < = 5), and then gives the initial value of your m attributes.
Then for n kinds of monsters, give the M attributes of each monster and the value that can be increased by eating it. If ...
Posted by srboj on Fri, 03 Jan 2020 11:03:11 -0800