Get-WmiObject -Class Win32_LogicalDisk -Filter "DriveType=3" | Format-Table deviceid, @{Label="free(GB)"; Expression={($_.freespace/1GB).tostring("f1....
分类:
其他好文 时间:
2014-08-08 12:07:55
阅读次数:
238
//c datetime 格式化DateTime dt = DateTime.Now;Label1.Text = dt.ToString();//2005-11-5 13:21:25Label2.Text = dt.ToFileTime().ToString();//1277564168599128...
分类:
其他好文 时间:
2014-08-07 22:03:06
阅读次数:
221
通过html给xls赋值,并下载xls文件一、this.Response.Write(sw.ToString());System.IO.StringWriter sw = new System.IO.StringWriter(); this.Response.Clear(); string strF...
分类:
Web程序 时间:
2014-08-07 17:58:30
阅读次数:
385
第一种方法:1 string s = "abcdeabcdeabcde";2 string[] sArray = s.Split('c');3 foreach (string i in sArray)4 Console.WriteLine(i.ToString());5 Console.ReadKe...
分类:
Web程序 时间:
2014-08-06 18:56:21
阅读次数:
273
实例如下:public String getReportURL() throws Exception { String reportURL = parameterMap.get("showPageUrl").toString() + "showPageNum=1"; Iterator it = pa...
分类:
其他好文 时间:
2014-08-06 17:37:11
阅读次数:
180
string typeName = this.GetType().ToString();//空间名.类名string typeName = this.GetType().Name;//类名new System.Diagnostics.StackTrace().GetFrame(0).GetMetho...
分类:
其他好文 时间:
2014-08-06 14:40:41
阅读次数:
198
连接Access数据库: string con_access=ConfigurationManager.AppSettings["accessCon"].ToString();连接SQLServer string con_sqlserver=ConfigurationManager.Ap...
分类:
数据库 时间:
2014-08-05 19:01:49
阅读次数:
198
很早之前在CSDN上发的博客,现在CSDN上得少了,就把这个转到园子里来//重写toString方法,将时间转换为Y-m-d H:i:s格式Date.prototype.toString = function(){ return this.getFullYear() + "-" + (this.ge...
分类:
Web程序 时间:
2014-08-05 18:38:09
阅读次数:
236
揭示模式可用于将私有方法暴露为公共方法。当为了对象的运转而将所有功能放置在一个对象中以及想尽可能地保护该对象,这种揭示模式就非常有用。板栗: var myarray; (function(){ var astr = "[object Array]", toString = Object...
分类:
编程语言 时间:
2014-08-05 15:42:59
阅读次数:
231
虽然关于null的一切争论永不停息,但根据实际开发经历,很多时候需要判断无聊的null,并且有些的判断是可有可无的,尤其是在表现层。 string e = null; if (e != null) { Console.WriteLine(e.ToString()); }上述代码如果能换成这样...
分类:
其他好文 时间:
2014-08-05 15:26:49
阅读次数:
203