Main Code:
Static void main (string [] ARGs)
{
Int A = 49;
Int [] array = new int [49];
// Add the number to array
For (INT I = 0; I
{
Array [I] = I + 1;
}
// New a random number
Random random = new random ();
// Create the subscript of
Using system;
Using system. collections;
Using system. componentmodel;
Using system. Data;
Using system. drawing;
Using system. Web;
Using system. Web. sessionstate;
Using system. Web. UI;
Using system. Web. UI. webcontrols;
Using system. Web. UI.
For each request site of the device terminal, get its MAC address (or IP line), and then use the algorithm f (MAC) = verification Code p, return p to the device Terminal page, the user input the verification code p, as a sign-in!
The principle is so,
Copy Code code as follows:
Using System;
Using System.Data;
Using System.Configuration;
Using System.Web;
Using System.Web.Security;
Using System.Web.UI;
Using System.Web.UI.WebControls;
Using System.Web.UI.WebControls.WebParts;
Using
Color getRandColor (int fc, int bc) {// obtain a random Color from a given rangeRandom random = new Random ();If (fc> 255) fc = 255;If (bc> 255) bc = 255;Int r = fc + random. nextInt (bc-fc );Int g = fc + random. nextInt (bc-fc );Int B = fc + random.
The JavaScript implementation code is switched randomly, and the javascript code is switched
Js achieves random number switching. The code is divided into js and html parts. For more information, see
Js Code:
Arr_wx = new Array ("aaaa", "bbbb",
' Generate a 4-digit random code first.
Ychar= "0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"Yc=split (Ychar, ",")Ynum=4 ' The random code digits here can be changedFor I=1 to YnumRandomizeYCODE=YCODE&YC (Int
Recently, I encountered a problem when I used ASP. NET to write something: that is, after a user submits a form, the user will submit data repeatedly after pressing refresh, that is, the so-called "refresh and submit" problem. Search on the Internet,
Recently, I encountered a problem when I used ASP. NET to write something: that is, after a user submits a form, the user will submit data repeatedly after pressing refresh, that is, the so-called "refresh and submit" problem. Search on the Internet,
Search on the Internet, you can find a lot of information about this, one of which is a solution from MSDN: http://msdn.microsoft.com/library/default.asp? Url =/library/en-us/dnvs05/html/BedrockASPNET. asp. web. UI. when loading a Page, it is a
Search the Internet for a lot of information about this, one of which is a workaround from MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ Dnvs05/html/bedrockaspnet.asp It is by redefining the System.Web.UI.Page class to
PHP inserts a random code into the database based on the ID, and then judges that if the random code already exists in the database, it is randomly inserted into the database.
PHP inserts a random code into the database based on the ID, and then
How to generate and use a graphic verification code for Java Web development, javaweb
This document describes how to generate and use a graphic verification code for Java Web development. Share it with you for your reference. The details are as
Register with ASP. net mvc by using the SMS verification code. asp. netmvc
I used to send text messages to SMS cats. Currently, third-party APIs are mostly used. The general process is:
→ The user enters the mobile phone number on the page→
Register with ASP. net mvc by using the SMS verification code. asp. netmvc
I used to send text messages to SMS cats. Currently, third-party APIs are mostly used. The general process is:
→ The user enters the mobile phone number on the page→
1. Write it by yourselfCodeGenerate a random combination of numbers and letters Query whether the random code already exists in the database for each generated random code. If the random code already exists, re-generate it until it is not
Original address: http://www.blogjava.net/BearRui/archive/2010/10/19/unique_random_code.html
Now the web will often need to generate some invitation code, activation code. The need is unique and random. Here's a summary of some common methods for
An example found: this dynamic page dynamically generates Asx and then plays the mediaplayer.// The directory where the music file is located. I use an absolute path here and I am free to use it.String songid = (string) request. getattribute
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.