is 5-12 digits! ", 'The address length cannot exceed 50 characters! ',' Is a Chinese character within 10 characters! ',' The mobile phone number is 11 digits! ',' The zip code is a six-digit number! ',' The username must be 3-15 characters long! ',' Domain name format error! ',' This user name has been registered! ',' This email address has been registered! ']
Var ErrorClass = ['msg _ OK ', 'msg _ warning', 'msg _ warning', 'msg _ error', 'msg _ warning', 'msg _ error ', 'msg _ warning', 'msg
lock (into the lock pool); Other threads are still waiting in the pool. Calling this method does not release the lock. The use of the front thread must have been locked or an exception will be thrown.Notifyall (): Calling this method notifies all threads waiting in the pool that will enter the lock pool to attempt to obtain a lock. Calling this method does not release the lock. The use of the front thread must have been locked or an exception will be thrown.Common use:1 #Coding=utf-82 __author_
is 5-12 digits! ", 'The address length cannot exceed 50 characters! ',' Is a Chinese character within 10 characters! ',' The mobile phone number is 11 digits! ',' The zip code is a six-digit number! ',' The username must be 3-15 characters long! ',' Domain name format error! ',' This user name has been registered! ',' This email address has been registered! ']
Var ErrorClass = ['msg _ OK ', 'msg _ warning', 'msg _ warning', 'msg _ error', 'msg _ warning', 'msg _ error ', 'msg _ warning', 'msg
: default no 6. Send an administrator notification to multiple users to edit the mailrule configuration file # vi/etc/mailrule. confNotices To =/etc/mailstores/rules/notices. to. the format of the rules rule file is as follows: # vi/etc/maillogs/rules/notices. to. rules # Add address To: @ domain1.compostmaster@domain.com admin@domain1.comTo: @ domain2.compostmaster@domain.com admin@domain2.comFromOrTo: default postmaster@domain.com 7. Only isolate some viruses To edit the mailbench profile # vi
: you need to add a user named "custom", which is from the host 'localhost', 'server. domain 'and 'whitehouse. gov 'The connection to the database, his password is "stupid", for the database 'bankaccount' he only wants to access from "localhost, the "customer" database should be accessed by the above three hosts. Perform the following SQL statement
.
Shell> mysql.
Mysql> insert into user (host, user, password)
Values ('localhost', 'custom', password
This article mainly introduces functions for detecting ip addresses and domain names in php and js, so that you can detect ip addresses and domain names in programs. For more information, see
Php ip address format detection function
The code is as follows:Function checkIp ($ ip ){$ Ip = str_replace ("", "", $ ip );$ Ip = strtolower ($ ip );$ Ip = str_replace ("http: //", "", $ ip );$ Ip = str_replace ("https: //", "", $ ip );If (preg_match ('/[A-Za-z _-]/', $ ip )){If (preg_match ('/^ ([\ w-]
PHPJSIp address and domain name format detection code. PHPIP address format detection function copy code: functioncheckIp ($ ip) {$ ipstr_replace (, $ ip); $ ipstrtolower ($ ip); $ ipstr_replace (,, $ ip); $ ip
Php ip address format detection function
The code is as follows:
Function checkIp ($ ip ){$ Ip = str_replace ("", "", $ ip );$ Ip = strtolower ($ ip );$ Ip = str_replace ("http: //", "", $ ip );$ Ip = str_replace ("https: //", "", $ ip );If (preg_match ('/[A-Za-z _-]/', $ ip )){If (pre
related to the kernel's power consumption management algorithm ), userspace (indicating that the user can set the cpu frequency), performance (indicating that the CPU always works at the highest frequency ).
Current CPU frequency is 1.60 GHz indicates the current running clock speed.
4. adjust the CPU working mode
1. adjust the overall working mode
cpufreq-set -g performance
If you run the above commands through SSH, the CPU will always work at the highest clock speed (no energy saving, but h
the rules rule file is as follows: # vi/etc/mailrule/rules/spam. actions. rules # add the condition From: domain.com and To: user @ * deliverFromOrTo: domain1.com and FromOrTo: domain2.com delivermorfroto: default store policy 9. use perl To match more advanced rules: rule file format: # match user@domain.com and user@sub.domain.comFrom:/[\ @ \.] domain \. com $/yes # match all. gov From :/\. gov $/yes # m
| COM | gov | GOV | mil | MIL | org | ORG | edu | EDU | int | INT |) $"Var re = new RegExp (regu );If (s. search (re )! =-1 ){Return true;} Else {Window. alert ("enter a valid and valid email address! ")Return false;} 6. ID card:Copy codeThe Code is as follows:"^ // D {17} (// d | x) $" 7.17 Regular ExpressionsCopy codeThe Code is as follows:"^ // D + $" // non-negative integer (positive integer + 0)"^ [0-
be entered:
5. Email address verification:
Var regu = "^ ([0-9a-zA-Z] +) | ([0-9a-zA-Z] + [_. 0-9a-zA-Z-] * [0-9a-zA-Z] +) @ ([a-zA-Z0-9-] + [.]) + ([a-zA-Z] {2} | net | NET | com | COM | gov | GOV | mil | MIL | org | ORG | edu | EDU | int | INT |) $ "var re = new RegExp (regu); if (s. search (re )! =-1) {return true;} else {window. alert ("enter a valid and valid email address! ") Return false ;}
6. ID c
1. Only numbers and English letters can be entered:Onbeforepaste = "clipboardData. setData ('text', clipboardData. getData ('text'). replace (/[^ \ d]/g ,''))"ID = "Text1" NAME = "Text1">2. Only numbers can be entered:Onbeforepaste = "clipboardData. setData ('text', clipboardData. getData ('text'). replace (/[^ \ d]/g ,''))"ID = "Text2" NAME = "Text2">3. Only the fullwidth fields can be entered:Onbeforepaste = "clipboardData. setData ('text', clipboardData. getData ('text'). replace (/[^ \ uFF00
two periods. any other domain requires at least three. the seven special top level domains are: "COM", "EDU", "NET", "ORG", "GOV", "MIL", and "INT ".
Let's see it. It's a pretty cool! In addition to the "COM", "EDU", "NET", "ORG", "GOV", "MIL", and "INT" suffixes, domain names can be configured with secondary scopes, other domain names must be at least three levels. That is to say, you cannot use php to s
grant select,INSERT, UPDATE, DELETE, CREATE, drop on customer. * TO custom @ '%' identified by 'stupid ';
Run these commands by directly modifying the authorization table to set user permissions (Note: flush privileges at the end ):
Shell> MySQL (the best combination with PHP) -- user = root MySQL (the best combination with PHP)MySQL (best combination with PHP)> insert into user (Host, User, Password) VALUES ('localhost', 'custom', PASSWORD ('stupid '));MySQL (best combination with PH
Value, set the name to AllocateFloppies, and change the value to 0 or 1, 0 indicates that the domain can be accessed by all administrators, and 1 indicates that the domain can only be accessed by local administrators.9. added the automatic identification function for the website.If you want to access a website such as www.aaa.com, you only need to enter aaa in the address box, and IE will automatically add it. com suffix for access, saving a lot of trouble. However, if we want to access a websi
Ec (2); nbsp; the Code below copies the code functionmatchdomain ($ q) {preg_match ([a-z0-9] (w | }? [A-z0-9] | [a-z0-9]).) {1 ,} (aero | arpa | asia | biz | cat | com | coop | co | edu | gov | info | int | jobs | mil | mobi | mu script ec (2 ); script
The Code is as follows:
Function matchdomain ($ q ){Preg_match ('/([a-z0-9] (w | }? [A-z0-9] | [a-z0-9]).) {1 ,} (aero | arpa | asia | biz | cat | com | coop | co | edu |
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.