摘要: 1.定义日期型变量:var today = new Date(); 2.日期函数列表:dateObj.getTime()得到时间,dateObj.getYear()得到年份,dateObj.getFullYear()得到四位的年份,dateObj.getMonth()得 到月份,dateObj.ge 阅读全文
posted @ 2021-07-24 09:51 ♩♪♫♬ 阅读(87) 评论(0) 推荐(0)
摘要: window.location.href = window.location.href; 阅读全文
posted @ 2021-07-24 09:46 ♩♪♫♬ 阅读(52) 评论(0) 推荐(0)
摘要: 一个简单的用来清空或则删除数组尾部元素的简单方法就是改变数组的length属性值 const arr = [11, 22, 33, 44, 55, 66]; // truncanting arr.length = 3; console.log(arr); //=> [11, 22, 33] // c 阅读全文
posted @ 2021-07-23 23:32 ♩♪♫♬ 阅读(237) 评论(0) 推荐(0)
摘要: var person = {name :'Saad', age : 26, department : {ID : 15, name : "R&D"} }; var stringFromPerson = JSON.stringify(person); /* stringFromPerson 结果为 " 阅读全文
posted @ 2021-07-23 23:23 ♩♪♫♬ 阅读(50) 评论(0) 推荐(0)
摘要: 1、使用NUnit建立自动单元测试(集成在VS2010 中了); 2、FXCop工具会获取程序集中的IL代码,并将其与异族编码规则和最佳实践对照分析,最后报告违例情况; 3、ILDasm是一个IL反汇编工具,可以帮助我们洞察细节; 4、Shared Source CLI是一个包含.NET框架内核和C 阅读全文
posted @ 2021-07-23 22:58 ♩♪♫♬ 阅读(77) 评论(0) 推荐(0)
摘要: 较正规的编程风格  在一个二元操作符的每一边都加一个空格  在每一个逗号后面而不是前面加一个空格  每一个关键字后面加一个空格  一行一个语句  分号前不要有空格  函数的园括号和参数之间不加空格  在一元操作符和操作数之间不加空格 在一个二元操作符的每一边都加一个空格: Consol 阅读全文
posted @ 2021-07-23 22:20 ♩♪♫♬ 阅读(51) 评论(0) 推荐(0)
摘要: // Stack名字空间namespace Stack{ using System; public class Stack { // first: 栈最上面一个节点 private Node first = null; // count: 栈中节点的数量 private int count = 0; 阅读全文
posted @ 2021-07-23 22:14 ♩♪♫♬ 阅读(141) 评论(0) 推荐(0)
摘要: using System; class Rectangle{ private int iHeight; private int iWidth; // 缺省构造函数 public Rectangle() { Height=0; Width=0; } // 构造函数重载 public Rectangle 阅读全文
posted @ 2021-07-23 22:12 ♩♪♫♬ 阅读(75) 评论(0) 推荐(0)
摘要: using System; class MyClass{ public static void Main() { int varA = 10; //二进制为 00001010 int varB = 20; //二进制为 00010100 // “与”运算 int andResult = varA & 阅读全文
posted @ 2021-07-23 21:59 ♩♪♫♬ 阅读(158) 评论(0) 推荐(0)
摘要: // 声明一个枚举类型Weekday,基类为int,访问范围为public public enum Weekday { Sun, Mon, Tue, Wed, Thu, Fri, Sat } // 功能: 得到某日的下一日(星期几) // 参数: // wd : 枚举类型Weekday // 返回值 阅读全文
posted @ 2021-07-23 21:56 ♩♪♫♬ 阅读(126) 评论(0) 推荐(0)