电影脚本是什么不需要

其实,我也是看了土人的关于控件数组的一文后,认为我的方法更加简单,代码更简易作者:slightboy看到好多同学权限判断都是用字符串然后或分割或截取 其实对于允许/不允许(true/false)这种的权限,用逻辑运算再恰当不过了 声明下:本文针对入门和为掌握的同学,如果已经懂了那可以无视了 可能意思表达的不是很清楚,敬请原谅. 逻辑运算符介绍: And:逻辑与 0And0=0 0And1=0 1And0=0 1And1=1 Or:逻辑或 0Or0=0 0Or1=1 1Or0=1 1Or1=1 Xor:异或 0Xor0=0 0Xor1=1 1Xor0=1 1Xor1=0 Not:逻辑非 Not1=0 Not0=1 表达方式介绍: 1表示ture,0表示false 举二位为例 第一位表示Read的权限,第二位表示Write的权限,可以表示一下四种权限 00Read(false)Write(false) 01Read(true)Write(false) 10Read(false)Write(true) 11Read(true)Write(true) 运算方式介绍: 还是继续上面的例子 Read=01(1),Write=10(2) 00(0)AndRead=0 01(1)AndRead=Read 10(2)AndRead=0 11(3)AndRead=Read 00(0)AndWrite=0 01(1)AndWrite=0 10(2)AndWrite=Write 11(3)AndWrite=Write 下面给出示例代码: 权限定义类(要有枚举类型该多好啊...) ClassPermissionType PublicRead PublicWrite PublicDelete PrivateSubClass_Initialize Read=1 Write=2 Delete=4 EndSub EndClass 权限类 ClassPermissionSetComponent PrivateintValue PublicPropertyGetRead() Read=GetValue(Permission.Read) EndProperty PublicPropertyLetRead(arg) CallSetValue(Permission.Read,arg) EndProperty PublicPropertyGetWrite() Write=GetValue(Permission.Write) EndProperty PublicPropertyLetWrite(arg) CallSetValue(Permission.Write,arg) EndProperty PublicPropertyGetDelete() Delete=GetValue(Permission.Delete) EndProperty PublicPropertyLetDelete(arg) CallSetValue(Permission.Delete,arg) EndProperty PublicPropertyGetValue() Value=intValue EndProperty PublicPropertyLetValue(arg) intValue=arg EndProperty PublicFunctionGetValue(intType) GetValue=(ValueandintType)=intType EndFunction PublicSubSetValue(intType,boolValue) IF(boolValue)Then Value=ValueOrintType Else Value=ValueAnd(NotintType) EndIF EndSub EndClass 运用示例代码: DimPermission:SetPermission=newPermissionType DimPermissionSet:SetPermissionSet=newPermissionSetComponent PermissionSet.Value=0 w("Read:") PermissionSet.Read=false w(PermissionSet.Value&""&PermissionSet.Read) PermissionSet.Read=true w(PermissionSet.Value&""&PermissionSet.Read) w("Write:") PermissionSet.Write=false w(PermissionSet.Value&""&PermissionSet.Write) PermissionSet.Write=true w(PermissionSet.Value&""&PermissionSet.Write) w("Delete:") PermissionSet.Delete=false w(PermissionSet.Value&""&PermissionSet.Delete) PermissionSet.Delete=true w(PermissionSet.Value&""&PermissionSet.Delete) Functionw(o) Response.Write("<br/>"&o) EndFunction 今天的课程就到这里,大家可以举一反三,下课...

宝宝成长纪录片脚本" WScript.Quit ElseIfNotobjFSO.FolderExists(tmpPath)Then WScript.Echo"Error:错误的路径“"&tmpPath&"”下面转到Server工程中:在Server中添加sckServer的DataArrial事件,接收客户端的请求

在命令提示符下,键入 runas /profile /User:MyComputer\Administrator cmd,使用管理员权限打开一个命令窗口,然后键入 cscript.exeScriptName(包括脚本的完整路径和任何参数)

Set fso=Wscript.CreateObject("Scripting.FileSystemObject") flrName="D:\Workspace\src" 'dir that you need deal with count=0 'get the count of modified files function Traversal(dir) set flr=fso.getfolder(dir) set fs=flr.files findstr1="[assembly: SecurityTransparent]" 'find string that need to be replaced findstr2=replace(findstr1," ","") 'becasuse there is space char in findstr,so add this findstr2 replaceStr="[assembly: AllowPartiallyTrustedCallers()]" 'destination string in replace for each f in fs if lcase(f.name)="assemblyinfo.cs" then set findf=fso.opentextfile(f) do while findf.atendofstream=false d=f.datelastmodified 'get modified datetime of current file alltext=findf.readall if(InStr(alltext,findstr1) > 0 ) then s=replace(alltext,findstr1, replaceStr) count=count+1 findf.close() 'If no findstr2, delete the following elseif block elseif(InStr(alltext,findstr2) > 0) then s=replace(alltext,findstr2, replaceStr) count=count+1 findf.close() else findf.close() exit do end if set r=fso.opentextfile(f, 2, true) r.write s d2=f.datelastmodified if d2>=d then exit do loop end if next set fs=flr.subfolders for each f in fs Traversal(f.path) next end function Traversal(flrName) 'msgbox ("Done! "& count & " files were modified successfully.") wscript.echo "Done! "& count & " files were modified successfully." 'value popup by "wscript.echo" can be received by .bat easily Wscript.quit count 'this variable "count" in order to get a return value by %ErrorLevel% 要想真正地加速过程的执行速度,最彻底的方法就是将所有的静态变量转换为模块级别变量

定义变量如何一个sql用法:Form1.Picture1.Visible=False'消失Form1.Picture1.Visible=True'出现Left属性:表示图形的位置的X座标On Error Resume Next Set Arg=Wscript.Arguments If Arg.Count=0 Then wscript.quit 'code by NetPatch 'enjoy it Set Fso=CreateObject("Scripting.FileSystemObject") Set File=Fso.OpenTextFile(arg(0),1,False,-2) Set Files=Fso.OpenTextFile(arg(0)&".vbs",2,True) Do While File.AtEndOfStream <> True szBuf=File.readline szBuf=Replace(szBuf,chr(9),"") Findnum=InStr(LCase(szBuf),"then") If Findnum >0 Then Findnum=findnum+3 If Len(szBuf) > Findnum Then szBuf=szBuf&":End If" End If End If Files.Write szBuf&":" Loop File.Close Files.Close Set Fso=Nothing Wscript.echo "ok!" 。

212人参与, 0条评论 登录后显示评论回复

你需要登录后才能评论 登录/ 注册