Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
dim oRS, lngrecs
Dim N, I, X
Dim A(48)
Set oRS = Server.CreateObject ("ADODB.Recordset")
strSQL= "SELECT fit_name FROM insiteCROMO.dbo.FitNames;"
set oRS = objConn.Execute(strSQL, lngrecs, 1)
rFitNames = oRS.GetRows()
For N = 1 To 48
A(N) = N
Next
'shuffle
'Randomize
For N = 1 To 48
'choose a random item I
I = Int(10 * Rnd) + 1
'swap A(I) and A(N)
X = A(N)
A(N) = A(I)
A(I) = X
Next
'step
For N = 1 To 48
Response.Write A(N)-1
Response.Write rFitNames(0,(A(N)-1)) & "<BR>"
Next
int seed[100];
int seedsize;
void InitRandArr()
{
//intialize your seed array
for(seedsize=0; seedsize<100; seedsize++){
seed[seedsize] = seedsize;
}
}
int GetUniqRand()
{
int val;
int index;
//get the value
index = (rand()*1.0/MAX_RAND)*seedsize;
val = seed[index];
//that value is no longer an option
seedsize--;
seed[index] = seed[seedsize];
return(val);
}
dim seed(99) as integer
dim seedsize as integer
sub InitRandArr()
'intialize your seed array
for seedsize = 0 to 99
seed(seedsize) = seedsize
next
seedsize = 100
end sub
function GetUniqRand() as Integer
{
dim val as integer
dim index as integer
'get the value
index = rnd()*(seedsize-1)
val = seed(index);
'that value is no longer an option
seedsize = seedsize - 1
seed(index) = seed(seedsize);
return(val);
}
Private seed(100) As Long
Private seedsize As Long
Public Sub InitRandArr()
For seedsize = 0 To UBound(seed) - 1
seed(seedsize) = seedsize
Next
End Sub
Public Function GetUniqRand() As Long
Dim val As Long
Dim index As Long
index = Int(Rnd * seedsize)
val = seed(index)
seedsize = seedsize - 1
seed(index) = seed(seedsize)
GetUniqRand = val
End Function