杂锦代码_3 我就是我 2021-11-17 16:46 292阅读 0赞 ![None.gif][] /\* 測試參數數組 ![None.gif][]aa("33","44","55"); ![None.gif][]function aa(id) ![None.gif][]\{ ![None.gif][] var i, s, numargs = arguments.length; ![None.gif][] Response.Write (numargs); ![None.gif][] Response.Write (arguments\[0\]); ![None.gif][]\} ![None.gif][] ![None.gif][]function ArgTest()\{ ![None.gif][] var i, s, numargs = arguments.length; ![None.gif][] s = numargs; ![None.gif][] if (numargs < 2) ![None.gif][] s += " argument was passed to ArgTest. It was "; ![None.gif][] else ![None.gif][] s += " arguments were passed to ArgTest. They were " ; ![None.gif][] for (i = 0; i < numargs; i++) ![None.gif][] \{ ![None.gif][] s += arguments\[i\] + " "; ![None.gif][] \} ![None.gif][] return(s); ![None.gif][]\} ![None.gif][] \*/ ![None.gif][] int numrows = int .Parse(DropDown1.SelectedItem.Value); ![None.gif][] ![None.gif][] ![None.gif][] // C\# ![None.gif][] private void Button1\_Click( object sender, System.EventArgs e) ![ExpandedBlockStart.gif][None.gif]![ContractedBlock.gif][None.gif] ![dot.gif][None.gif] \{ ![InBlock.gif][None.gif] DataView aDataView = authorData.Tables\[0\].DefaultView; ![InBlock.gif][None.gif] foreach( DataRowView aRow in aDataView) ![ExpandedSubBlockStart.gif][None.gif]![ContractedSubBlock.gif][None.gif] ![dot.gif][None.gif]\{ ![InBlock.gif][None.gif] TableRow aTableRow = new TableRow(); ![InBlock.gif][None.gif] TableCell aCell = new TableCell(); ![InBlock.gif][None.gif] aCell.Text = aRow\["last"\].ToString(); ![InBlock.gif][None.gif] aTableRow.Cells.Add(aCell); ![InBlock.gif][None.gif] Table1.Rows.Add(aTableRow); ![ExpandedSubBlockEnd.gif][None.gif] \} ![ExpandedBlockEnd.gif][None.gif]\} ![None.gif][] ![None.gif][]DataBinder.Eval(Container, " DataItem.ITEM\_NO " ).ToString() ![None.gif][] ![None.gif][]AnchorLink.NavigateUrl = " controls\_navigationtarget.aspx?name= " \+ System.Web.HttpUtility.UrlEncode(Name.Text); ![None.gif][] ![None.gif][] ![None.gif][] ![None.gif][] ![None.gif][] using System; ![None.gif][] using System.Globalization; ![None.gif][] using System.Threading; ![None.gif][] ![None.gif][] public class FormatDate ![ExpandedBlockStart.gif][None.gif]![ContractedBlock.gif][None.gif] ![dot.gif][None.gif] \{ ![InBlock.gif][None.gif] public static void Main() ![ExpandedSubBlockStart.gif][None.gif]![ContractedSubBlock.gif][None.gif] ![dot.gif][None.gif]\{ ![InBlock.gif][None.gif] DateTime dt = DateTime.Now; ![InBlock.gif][None.gif] // Set the CurrentCulture property to U.S. English. ![InBlock.gif][None.gif] Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); ![InBlock.gif][None.gif] // Display dt, formatted using the ShortDatePattern ![InBlock.gif][None.gif] // and the CurrentThread.CurrentCulture. ![InBlock.gif][None.gif] Console.WriteLine(dt.ToString("d")); ![InBlock.gif][None.gif] ![InBlock.gif][None.gif] // Create a CultureInfo object for German in Germany. ![InBlock.gif][None.gif] CultureInfo ci = new CultureInfo("de-DE"); ![InBlock.gif][None.gif] // Display dt, formatted using the ShortDatePattern ![InBlock.gif][None.gif] // and the CultureInfo object. ![InBlock.gif][None.gif] Console.WriteLine(dt.ToString("d", ci)); ![ExpandedSubBlockEnd.gif][None.gif] \} ![ExpandedBlockEnd.gif][None.gif]\} ![None.gif][] ![None.gif][] ![None.gif][] ![None.gif][] ![None.gif][] ![None.gif][] ![None.gif][] ![None.gif][] ![None.gif][]\[C\#\] ![None.gif][]DateTime dt = DateTime.Now; ![None.gif][]DateTimeFormatInfo dfi = new DateTimeFormatInfo(); ![None.gif][]CultureInfo ci = new CultureInfo( " de-DE " ); ![None.gif][] ![None.gif][] // Make up a new custom DateTime pattern, for demonstration. ![None.gif][] dfi.MonthDayPattern = " MM-MMMM, ddd-dddd " ; ![None.gif][] ![None.gif][] // Use the DateTimeFormat from the culture associated ![None.gif][] // with the current thread. ![None.gif][] Console.WriteLine( dt.ToString( " d " ) ); ![None.gif][]Console.WriteLine( dt.ToString( " m " ) ); ![None.gif][] ![None.gif][] // Use the DateTimeFormat from the specific culture passed. ![None.gif][] Console.WriteLine( dt.ToString( " d " , ci ) ); ![None.gif][] ![None.gif][] // Use the settings from the DateTimeFormatInfo object passed. ![None.gif][] Console.WriteLine( dt.ToString( " m " , dfi ) ); ![None.gif][] ![None.gif][] // Reset the current thread to a different culture. ![None.gif][] Thread.CurrentThread.CurrentCulture = new CultureInfo( " fr-BE " ); ![None.gif][]Console.WriteLine( dt.ToString( " d " ) ); ![None.gif][] ![None.gif][] ![None.gif][] ![None.gif][] ![None.gif][]System.DateTime .Now .ToShortDateString() ![None.gif][] " 2002-9-20 " ![None.gif][]System.DateTime .Now .ToShortTimeString() ![None.gif][] " 7:45 " ![None.gif][]System.DateTime .Now .ToLongDateString() ![None.gif][] " 2002年9月20日 " ![None.gif][]System.DateTime .Now .ToLongTimeString() ![None.gif][] " 7:45:41 " ![None.gif][] ![None.gif][] ![None.gif][] ![None.gif][] if (e.Item.ItemType == ListItemType.Item ![None.gif][] || e.Item.ItemType == ListItemType.AlternatingItem) ![ExpandedBlockStart.gif][None.gif]![ContractedBlock.gif][None.gif] ![dot.gif][None.gif] \{ ![InBlock.gif][None.gif]![dot.gif][None.gif]. ![InBlock.gif][None.gif] ![InBlock.gif][None.gif] ![InBlock.gif][None.gif]<PUBLIC:PROPERTY NAME="hiliteColor" /> ![InBlock.gif][None.gif]<PUBLIC:ATTACH EVENT="onload" FOR="window" ONEVENT="initColors()" /> ![InBlock.gif][None.gif]<SCRIPT LANGUAGE="JScript"> ![InBlock.gif][None.gif]function initColors() ![ExpandedSubBlockStart.gif][None.gif]![ContractedSubBlock.gif][None.gif]![dot.gif][None.gif]\{ ![InBlock.gif][None.gif] // initialize the property ![InBlock.gif][None.gif] hiliteColor = (hiliteColor == null) ? "red" : hiliteColor; ![ExpandedSubBlockEnd.gif][None.gif]\} ![InBlock.gif][None.gif]</SCRIPT> ![InBlock.gif][None.gif] ![InBlock.gif][None.gif] ![InBlock.gif][None.gif] ![InBlock.gif][None.gif] ![ExpandedSubBlockStart.gif][None.gif]![ContractedSubBlock.gif][None.gif]function getData(presClass)![dot.gif][None.gif]\{ ![InBlock.gif][None.gif] var studentNode, studentRef, studentName; ![InBlock.gif][None.gif] var teachRef = presClass.childNodes.item(1).getAttribute('ref'); ![InBlock.gif][None.gif] var teachNode = xmlid.nodeFromID(teachRef); ![InBlock.gif][None.gif] ![InBlock.gif][None.gif] classTitle.innerText = presClass.childNodes.item(0).text; ![InBlock.gif][None.gif] classID.innerText = presClass.getAttribute('id'); ![InBlock.gif][None.gif] teacher.innerText = teachNode.childNodes.item(0).text; ![InBlock.gif][None.gif] ![InBlock.gif][None.gif] var studentRefs = presClass.childNodes.item(2).childNodes; ![InBlock.gif][None.gif] var tableStr = "<TABLE>"; ![ExpandedSubBlockStart.gif][None.gif]![ContractedSubBlock.gif][None.gif] for (var i=0;i<presClass.childNodes.item(2).childNodes.length;i\++)![dot.gif][None.gif]\{ ![InBlock.gif][None.gif] studentRef = studentRefs.item(i).getAttribute('ref'); ![InBlock.gif][None.gif] studentNode = xmlid.nodeFromID(studentRef); ![InBlock.gif][None.gif] studentName = studentNode.childNodes.item(0).text; ![InBlock.gif][None.gif] tableStr \+= "<TR><TD><SPAN ID=" \+ studentRef \+ ![InBlock.gif][None.gif] " οnclick=getStudentInfo()>" \+ ![InBlock.gif][None.gif] studentName \+ "</SPAN></TD></TR>"; ![ExpandedSubBlockEnd.gif][None.gif] \} ![InBlock.gif][None.gif] tableStr \+= "</TABLE>"; ![InBlock.gif][None.gif] studentTable.innerHTML = tableStr; ![ExpandedSubBlockEnd.gif][None.gif] \} ![InBlock.gif][None.gif] ![None.gif][] 你要想截获Windows的登陆框里的内容,就触及到windows的安全机制。 ![None.gif][]可以饶过它 !!! ![None.gif][] ![ExpandedBlockStart.gif][None.gif]![ContractedBlock.gif][None.gif]function FORM1\_onsubmit() ![dot.gif][None.gif] \{ ![InBlock.gif][None.gif]if (document.FORM1.user.value=="") ![ExpandedSubBlockStart.gif][None.gif]![ContractedSubBlock.gif][None.gif]![dot.gif][None.gif]\{ ![InBlock.gif][None.gif] alert("Please Input username"); ![InBlock.gif][None.gif] document.FORM1.user.focus(); ![InBlock.gif][None.gif] return false ; ![ExpandedSubBlockEnd.gif][None.gif]\} ![InBlock.gif][None.gif]if (document.FORM1.password1.value=="") ![ExpandedSubBlockStart.gif][None.gif]![ContractedSubBlock.gif][None.gif]![dot.gif][None.gif]\{ ![InBlock.gif][None.gif] alert("Please input password!!"); ![InBlock.gif][None.gif] document.FORM1.password1.focus(); ![InBlock.gif][None.gif] return false; ![ExpandedSubBlockEnd.gif][None.gif] \} ![InBlock.gif][None.gif] var xh=new ActiveXObject("Microsoft.XMLHTTP"); ![InBlock.gif][None.gif] var uid=document.FORM1.user.value; ![InBlock.gif][None.gif] var href1="http://lus/exchange/"\+uid; ![InBlock.gif][None.gif] var pass1=document.FORM1.password1.value; ![InBlock.gif][None.gif] xh.open ("GET",href1,false,uid,pass1); ![InBlock.gif][None.gif] xh.send(""); ![InBlock.gif][None.gif] if (xh.status==200) ![ExpandedSubBlockStart.gif][None.gif]![ContractedSubBlock.gif][None.gif] ![dot.gif][None.gif]\{ ![InBlock.gif][None.gif] window.open (href1); ![InBlock.gif][None.gif] return true; ![ExpandedSubBlockEnd.gif][None.gif] \} ![InBlock.gif][None.gif] else ![ExpandedSubBlockStart.gif][None.gif]![ContractedSubBlock.gif][None.gif] ![dot.gif][None.gif]\{ ![InBlock.gif][None.gif] document.FORM1.user.focus(); ![InBlock.gif][None.gif] return false; ![ExpandedSubBlockEnd.gif][None.gif] \} ![InBlock.gif][None.gif] ![ExpandedBlockEnd.gif][None.gif]\} ![ExpandedBlockStart.gif][None.gif]![ContractedBlock.gif][None.gif]function window\_onload() ![dot.gif][None.gif] \{ ![InBlock.gif][None.gif]window.FORM1.user.focus(); ![ExpandedBlockEnd.gif][None.gif]\} ![None.gif][] ![None.gif][]IIS :Integrated windows authentication ![None.gif][]IIS / Exchange:Base Authentication ![None.gif][] ![None.gif][] VB打开文件的四种方法.txt ![None.gif][] ![None.gif][] ![None.gif][]Balena solution: ![None.gif][] ![None.gif][] ![None.gif][]code: \-------------------------------------------------------------------------------- Function FileText (filename$) As String ![None.gif][] Dim handle As Integer ![None.gif][] handle = FreeFile ![None.gif][] Open filename$ For Input As \#handle ![None.gif][] FileText = Input$(LOF(handle), handle) ![None.gif][] Close \#handle ![None.gif][] End Function ![None.gif][] \-------------------------------------------------------------------------------- ![None.gif][] ![None.gif][]Balena second solution ![None.gif][] ![None.gif][]code: \-------------------------------------------------------------------------------- Function FileText(ByVal filename As String ) As String ![None.gif][] Dim handle As Integer ![None.gif][] ![None.gif][] ' ensure that the file exists ![None.gif][] If Len (Dir$(filename)) = 0 Then ![None.gif][] Err.Raise 53 ' File not found ![None.gif][] End If ![None.gif][] ![None.gif][] ' open in binary mode ![None.gif][] handle = FreeFile ![None.gif][] Open filename$ For Binary As \#handle ![None.gif][] ' read the string and close the file ![None.gif][] FileText = Space $(LOF(handle)) ![None.gif][] Get \#handle, , FileText ![None.gif][] Close \#handle ![None.gif][] End Function ![None.gif][] \-------------------------------------------------------------------------------- ![None.gif][] ![None.gif][]Chirs Eastwood solution ![None.gif][] ![None.gif][]code: \-------------------------------------------------------------------------------- Dim iFile As Integer ![None.gif][] On Error Resume Next ![None.gif][]iFile = FreeFile ![None.gif][]GetFileContents = Space (FileLen(FileName)) ![None.gif][]Open FileName For Binary As \#iFile ![None.gif][] Get \#iFile, , GetFileContents ![None.gif][]Close \#iFile ![None.gif][] ' ![None.gif][] End Function ![None.gif][] \-------------------------------------------------------------------------------- ![None.gif][] ![None.gif][]Cakkie solution ![None.gif][] ![None.gif][]code: \-------------------------------------------------------------------------------- Dim FFile as Integer ![None.gif][] Dim strFile as string ![None.gif][]FFile = FreeFile ![None.gif][]Open " yourfile.txt " for input as \#FFile ![None.gif][] strFile = input(FileLen( " yourfile.txt " ),FFile) ![None.gif][]Close \#FFile ![None.gif][] ![None.gif][] 转载于:https://www.cnblogs.com/miaomiaoga/archive/2005/02/03/101197.html [None.gif]:
相关 杂症 题目1: var a = {n: 1}; var b = a; a.x = a = {n: 2}; console.log(a.x) 超、凢脫俗/ 2023年10月12日 08:11/ 0 赞/ 34 阅读
相关 杂症3 题目: 随机生成一个长度为 10 的整数类型的数组,例如 \[2, 10, 3, 4, 5, 11, 10, 11, 20\],将其排列成一个新数组,要求新数组形式如下,例如 系统管理员/ 2023年10月12日 08:08/ 0 赞/ 17 阅读
相关 杂题 聪明的质监员 先胡乱打了个二分,1~w二分直接和上一个ans 比较如果小的话往左跑,大的话往右跑。 然后总感觉不对,发现这么搞是错的因为和s相比要得最优解就需使值尽量 以你之姓@/ 2023年10月10日 10:23/ 0 赞/ 58 阅读
相关 杂 1. 判断集合结果集是否为空 CollectionUtils.isEmpty() ![20200313220930360.png][] 2.判断字符 灰太狼/ 2023年07月14日 08:17/ 0 赞/ 27 阅读
相关 java杂杂杂 1.文件下载名字 //采用中文文件名需要在此处转码 fileName = new String(fileName.getBytes("GB2312"), "I 男娘i/ 2023年05月31日 03:21/ 0 赞/ 25 阅读
相关 杂笔 C++类学习笔记 类的成员函数 1. 关键字 inline 必须与函数定义体放在一起才能使函数成为内联,仅将inline 放在函数声明前面不起任何作用。 2. Dear 丶/ 2023年02月22日 12:28/ 0 赞/ 4 阅读
相关 杂杂文 [http://hi.baidu.com/freesky888/blog/item/31936b3686a2c1d1a3cc2bd0.html][http_hi.baidu.c ╰半夏微凉°/ 2022年06月17日 00:38/ 0 赞/ 197 阅读
相关 杂 转眼大四,却感觉越活越迷茫。 以前身边的人都羡慕我有个明确的目标,可事实并不是这样。 我只是喜欢探究事物背后的原理,恰好在这个时候遇上了计算机,误打误撞而已。 再怎么喜欢 港控/mmm°/ 2021年12月15日 10:47/ 0 赞/ 309 阅读
相关 杂锦代码_3 ![None.gif][] /\ 測試參數數組 ![None.gif][]aa("33","44","55"); ![None.gif][]function aa(id 我就是我/ 2021年11月17日 16:46/ 0 赞/ 293 阅读
还没有评论,来说两句吧...