Sideway BICK BlogSideway BICK BLOG from Sideway

A Sideway to Sideway Home

Link:http://output.to/sideway/default.asp?qno=170900028

ShuowenJiezi Chinese Character Radicals 夰

Chinese ShuowenJiezi Radical 401 夰(U+5930)

Section 分部Character
漢字 5
U+5930
open
close
放也从大而八分也凡夰之屬𣅜从夰古老切
last updated 2April2017
𥉁
U+25241
open
close
舉目驚𥉁然也从夰从䀠䀠亦聲九遇切
last updated 2April2017
U+5961
open
close
嫚也从𦣻从夰夰亦聲虞書曰「若丹朱奡」讀若傲論語「奡盪舟」五到切
last updated 2April2017
U+6626
open
close
春為昦天元气昦昦从日、夰夰亦聲胡老切
last updated 2April2017
U+81E9
open
close
驚走也一曰徃來也从夰、臦周書曰「伯臩」古文臦古文冏字臣鉉等曰「臦居況切臦猶乖也臦亦聲言古冏字未詳具往切
last updated 2April2017

Link:http://output.to/sideway/default.asp?qno=170900029

Script, Scripting Language, VBScript elements, Server-Side VBScript Function, Math Function,Random Function

VBScript Math Functions

Functions for manipulating mathematics expression.

Rnd Function

last updated 9/21/2017

Get a random number according to a specified number setting.

Syntax

Rnd[(number)]

Argument

numberAny valid numeric expression

Settings

number argument

numberRnd generatesLess than zeroThe same number every time, using number as the seed.Greater than zeroThe next random number in the sequence.Equal to zeroThe most recently generated number.Not suppliedThe next random number in the sequence.

Returns

Returns a Variant of Single data subtype containing a random number generated according to a specified number setting.

Special returns of Rnd function:

numberreturn valueNullRun-time ErrorEmpty=Rnd(0)""Run-time Error

Remarks

  • The Rnd function returns a value less than 1 but greater than or equal to 0.
  • The value of number determines how Rnd generates a random number.
  • For any given initial seed, the same number sequence is generated because each successive call to the Rnd function uses the previous number as a seed for the next number in the sequence.
  • Before calling Rnd, use the Randomize statement without an argument to initialize the random-number generator with a seed based on the system timer.
  • To produce random integers in a given range, use this formula: Int((upperbound - lowerbound + 1) * Rnd + lowerbound);Here, upperbound is the highest number in the range, and lowerbound is the lowest number in the range.
  • To repeat sequences of random numbers, call Rnd with a negative argument immediately before using Randomize with a numeric argument.
  • Using Randomize with the same value for number does not repeat the previous sequence.

Requirement

1

Examples

Examples of Rnd function

ASP VbScript Command:
<script runat="server" language="VBScript">
cmdb="Rnd":cmdc="Rnd()"
Dim vars,num,cmda,var:var=0
cmda=array("num","Rnd(num)")
Dim ucnt,tmp,i:ucnt=UBound(cmda):If var=1 Then:tmp="":Else:tmp="<b>vars</b>":End If:For i=0 to ucnt:tmp=tmp&"<b>"&rmv_ctrl(cmda(i))&", TypeName</b>":Next:Response.Write "Results on Microsoft Windows 8.1 Pro x64, Microsoft-IIS/8.5, VBScript Version 5.8 of page /internet/users/sideblog/default.asp<br />"&"<i>"&tmp&"</i>"
Function dsp_x:Dim tmp_a,tmp_b,i:If varx=0  Then:Execute vars:End If:If var=1 Then:tmp_a="":Else:tmp_a=rmv_ctrl(vars):End If:For i=0 to ucnt:tmp_b=cmd_b(cmda(i)):if i/2=fix(i/2) Then:tmp_b="<b>"&tmp_b&"</b>":End If:tmp_a=tmp_a&tmp_b:Next:Response.Write "<i>"&tmp_a&"</i>":End Function
Function rmv_ctrl(blk_str):Select Case blk_str:Case chr(0):blk_str="NUL":Case chr(1):blk_str="SOH":Case chr(2):blk_str="STX":Case chr(3):blk_str="ETX":Case chr(4):blk_str="EOT":Case chr(5):blk_str="ENQ":Case chr(6):blk_str="ACK":Case chr(7):blk_str="BEL":Case chr(8):blk_str="BS":Case chr(9):blk_str="HT":Case chr(10):blk_str="LF":Case chr(11):blk_str="VT":Case chr(12):blk_str="FF":Case chr(13):blk_str="CR":Case chr(14):blk_str="SO":Case chr(15):blk_str="SI":Case chr(16):blk_str="DLE":Case chr(17):blk_str="DC1":Case chr(18):blk_str="DC2":Case chr(19):blk_str="DC3":Case chr(20):blk_str="DC4":Case chr(21):blk_str="NAK":Case chr(22):blk_str="SYN":Case chr(23):blk_str="ETB":Case chr(24):blk_str="CAN":Case chr(25):blk_str="EM":Case chr(26):blk_str="SUB":Case chr(27):blk_str="ESC":Case chr(28):blk_str="FS":Case chr(29):blk_str="GS":Case chr(30):blk_str="RS":Case chr(31):blk_str="US":Case chr(127):blk_str="DEL":End Select:rmv_ctrl=blk_str:If IsNull(blk_str) OR IsEmpty(Blk_str) OR blk_str="" OR IsNumeric(Blk_str) Then:Else:rmv_ctrl=Replace(Replace(Replace(Replace(Replace(blk_str,"&","&amp;"),"  "," &nbsp;"),"""","&quot;"),"<","&lt;"),">","&gt;"): End If :End Function
Function cmd_b(blk_str):cmd_b="["&cmd_x(blk_str)&"], "&cmd_x("TypeName("&blk_str&")"):End Function
Function cmd_x(blk_str):On Error Resume Next:Dim xans, tmp:xans="":tmp="":execute "xans="&blk_str:If Err.Number <> 0  Then:xans=cmd_x("TypeName("&blk_str&")"):Select Case xans:Case 9::Case Else:xans="error":End Select:End If:If IsArray(xans)=False Then:cmd_x=rmv_ctrl(xans): Else:tmp=lst_arry(xans):cmd_x=trim(tmp):End If:End Function
Function lst_arry(blk_str):Dim tmp,i,q:q="""":tmp="":For i=0 to UBound(blk_str):if VarType(blk_str(i))>1 And VarType(blk_str(i))<6 Then:q="'":End If:tmp=tmp&" "&q&rmv_ctrl(blk_str(i))&q:Next:lst_arry=trim(tmp):End Function

Response.Write "<i>"&Eval("cmdb")&"<b>=</b>"&cmd_b(cmdb)&"</i>"
Response.Write "<i>"&Eval("cmdc")&"<b>=</b>"&cmd_b(cmdc)&"</i>"
vars="num=Null":x=1:dsp_x
vars="num=Empty":x=1:dsp_x
vars="num=Empty":x=1:dsp_x
vars="num=""""":x=1:dsp_x
vars="num=-1":dsp_x
vars="num=-2":dsp_x
vars="num=0":dsp_x
vars="num=-1":dsp_x
vars="num=0":dsp_x
vars="num=0":dsp_x
vars="num=1":dsp_x
vars="num=1":dsp_x
vars="num=0":dsp_x
vars="num=2":dsp_x
vars="num=2":dsp_x
vars="num=0":dsp_x
vars="num=0":dsp_x
vars="num=1":dsp_x
</script>
HTML Web Page In-line Output:
Results on Microsoft Windows 8.1 Pro x64, Microsoft-IIS/8.5, VBScript Version 5.8 of page /internet/users/sideblog/default.asp
varsnum, TypeNameRnd(num), TypeNameRnd=[0.7055475], SingleRnd()=[0.5795186], Singlenum=Null[], Null[error], errornum=Empty[], Empty[0.2895625], Singlenum=Empty[], Empty[0.2895625], Singlenum=""[], String[error], errornum=-1[-1], Integer[0.224007], Singlenum=-2[-2], Integer[0.7133257], Singlenum=0[0], Integer[0.7133257], Singlenum=-1[-1], Integer[0.224007], Singlenum=0[0], Integer[0.224007], Singlenum=0[0], Integer[0.224007], Singlenum=1[1], Integer[3.584582E-02], Singlenum=1[1], Integer[0.1642639], Singlenum=0[0], Integer[0.1797358], Singlenum=2[2], Integer[0.5732005], Singlenum=2[2], Integer[3.219455E-02], Singlenum=0[0], Integer[0.4033364], Singlenum=0[0], Integer[0.4033364], Singlenum=1[1], Integer[0.6702209], Single

Sources

  •  

Sideway BICK Blog

23/09


Copyright © 2000-2020 Sideway . All rights reserved Disclaimerslast modified on 26 January 2013