The use of KeytoolThe Keytool program is provided by the JDK to generate and view certificates and keys. The KeyStore is a key container that can hold multiple key and related information.Each key is referenced by an alias aliases. You can export the key in KeyStore to a certificate file. cer. Obviously, the. cer generated with Keytoolis a certificate that is not signed by the CA.
Add a key
Keytool-genkey-alias acosta-keyalg rsa-keysize 1024-keystore acosta.keystore
View all key in KeyStore
Key
How to use the Excel2010 data validation function
① or the old rules, first start Excel2010, input basic data, this time we want to use the data validity function to enter Evergrande Boss's name, enter other name to prompt error.
Excel2010
② Click the A11 cell and click on the menu bar--
Java Forms validation1. Thinking: Through the form selector, the form attribute filter extracts the value of each form submission for validation2. Implementation: JavaScript through OnSubmit () event, judge, return value false not commit, return true commit, jquery through the Submit () event3. Forms validation common methods and eventsA: Event onblur loses focus, onfocus gets focusB: Method Blur () Move th
1. Open Excel, click on the toolbar "file" → "option"
2. Select "Advanced" in the Excel option, find "Display options for this workbook" in the Advanced, change "Show for object" to all and click OK.
3. Return to Excel table and click on the toolbar "data" → "Data Validation"
4. Change the validity condition to a sequence in the
Client | data//client validation of user input data
If the entered content is not satisfied, it is not committed and the focus automatically jumps to that location.
More useful than verifying data on the server side after sending!
Scripting code:
"}; Onestring[] IDArray =NewString[18]; A intIntstrlen =idcard.length (); -String Idstr =Idcard; - intsum = 0; the - //Regular verify that the ID card format is correct -Pattern pattern =pattern.compile (regex); -Matcher Matcher =Pattern.matcher (idcard); + if(!matcher.matches ()) { - return false; + } A at //Verify that the ID number algorithm is legal - for(inti = 0; i ){ -Idarray[i] = Idstr.charat (i) + "";
Password Verification requirements:1) Password control can only enter letters, numbers, special symbols ([email protected]#$%^* () _+[]{}|\;: ' ",./2) length 6-16 digits, must include 2 kinds of letters, numbers, special symbols3) password cannot contain user name informationDetermine if the password contains a number: contains return 1, does not contain return 0int i = newpwd.matches (". *\\d+.*")? 1:0;Determine if the password contains letters: contains return 1, does not contain return 0Int j
for(inti = 0; i ) { the //ensure that a continuous string B matches a segment in a the if(A_t[i] = = B_t[j] J b_t.length) { thetemp++;117J + +;118 //The continuous string b matches a segment in a119 if(temp = =b_t.length) { -count++;121temp = 0;122j = 0;123 }124 } the //as long as there is a character mismatch, the temp count is never126 Else {127temp = 0; -j = 0;129 } the
First step, open Excel2013, select A2 cell, click "Data Validation";
The second step, under the "Settings" column, allows the choice of "custom", and input the following figure formula;
The third step, in the "Error Warning" column, enter the error message;
The fourth step, fills the A2 formula to the A3-A10 unit, the following figure;
The fifth step, then if there is a dupli
Shortcut keys, functions, and data validation for Excel names
1, the definition of the name directly using CTRL+F3, so you do not have to go to the menu to look for. Insert, name, definition. Sick of it.
2, paste the name of all, direct use of F3, we do not need to use the insertion, name, paste.
3, the batch definition name, direct use CTRL+SHIFT+F3 directly to the batch name def
Data validation of a subexpression (subexpressions), which decomposes the subexpression of a regular expression by means of parentheses "()";
Then use the subscript designator [], output the corresponding subexpression, "0" on behalf of the whole, "1" for the first bracket, followed by accumulator;
Verify the match of the regular expression by matching the question mark item?
Code:
#include
Output:
Label: Public UserInfo Create (UserInfo entity)
{
try
{
context.} Userinfoes.add (entity);
Context. SaveChanges ();
}
Catch (Exception ex)
{
throw;
}
return entity;
}Look for the reason for the error by looking for the first element in Entityvalidationerrors--validationerrors in the local variable box--errormessage
original string. If you do not simply run S1.replace (' A ', ' C '), the contents of S1 will not change.If you connect a string class object that you have created with an assignment symbol to another string class object, the effect will be different, as shown in the code:1String S1 = "ABS";2 3String s2 = "ABS";4 5String s3 =NewString ("ABS");6 7System.out.println ("Before Change:");8 9System.out.println ("S1 is" +s1);Ten OneSystem.out.println ("S2 is" +S2); A -System.out.println ("S3 is" +S3)
Regular expressions are often used to validate various forms, Java forms register common Regular Expression validation tool classes, and common regular expression large collections.
1. Telephone number
2. zip Code
3. QQ
4. E-Mail
5. Mobile phone number
6. URL
7. Whether it is a digital
8. Whether it is Chinese
9. Identity card
10. Domain Name
IP .....
Common
As we all know, many Java books say that the contents of a string object cannot be modified, but in practice the assignment notation can still be used in the created String class object, as shown in the following code:650) this.width=650; "style=" border:medium none; "alt=" Copy Code "src=" Http://common.cnblogs.com/images/copycode.gif "/ >1Strings1= "ABS";2 strings2= "ABS"; 3system.out.println ("Beforechange:" ); 4system.out.println ("s1is" +s1);5 sy
In the project we use Java often have the use of authentication function, such as mobile phone number, password and other authentication.To summarize, write a tool class to facilitate the use of the next time directly cited.Package com.common.utils;Import Org.apache.commons.lang3.StringUtils;Import Java.util.regex.Matcher;Import Java.util.regex.Pattern;public class Validationutil {public static Boolean IsMobile (String Mobile, Boolean isrequired) {if
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.