반응형

ASP - random 적용 난수 발생

 

	Function fncRandom_str()
		Dim str_rnd, strlen_rnd, rnd_r, rnd_i, rnd_ds, serialCode, nLength '사용되는 변수를 선언
	
		str_rnd = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" '랜덤으로 사용될 문자 또는 숫자

		strlen_rnd = 7 '랜덤으로 출력될 값의 자릿수 ex)해당 구문에서 10자리의 랜덤 값 출력
        
        nLength = Len( str_rnd )
		Randomize '랜덤 초기화
		For rnd_i = 1 To strlen_rnd '위에 선언된 strlen_rnd 랜덤 코드 생성
			rnd_r = Int((nLength - 1 + 1) * Rnd + 1)  ' 36은 str의 문자갯수

			serialCode = serialCode + Mid(str_rnd,rnd_r,1)
		Next
		fncRandom_str = serialCode
	
        'Response.Write  random_str()
	End Function
반응형
반응형
random UL LI 리스트 랜덤















.

반응형
반응형

Chance: Random data generator for automated tests

chance

Homepage: http://chancejs.com/
GitHub: https://github.com/victorquinn/chancejs/

 

Chance - Random generator helper for JavaScript

 

Chance - Random generator helper for JavaScript

Homepage: http://chancejs.com

Many more details on http://chancejs.com but this single library can generate random numbers, characters, strings, names, addresses, dice, and pretty much anything else.

It includes the basic building blocks for all these items and is built on top of a Mersenne Twister so it can generate these things with repeatibility, if desired.

반응형

+ Recent posts