var compareTime = DateTime.Now; var start = DateTime.Parse(string.Format("{0:u}", compareTime)); var end = DateTime.Parse(compareTime.ToStr...
分类:
其他好文 时间:
2015-01-24 12:54:51
阅读次数:
116
jQuery.extend({ type: function( obj ) { if ( obj == null ) { return String( obj ); } // Support: Safari <= 5.1 (fun...
分类:
Web程序 时间:
2015-01-24 12:50:15
阅读次数:
176
InputStream 、 InputStreamReader 、 BufferedReader三者的区别|用法|定义...
分类:
其他好文 时间:
2015-01-24 11:41:52
阅读次数:
228
下面以调用:Sql Server 分页存储过程为例
调用代码如下:
string MyConn = "server=数据库服务器Ip;uid=数据库用户名;pwd=密码;database=数据库名称;Trusted_Connection=no";
SqlConnection MyConnection = new SqlConnection(MyConn);...
Valid NumberValidate if a given string is numeric.Some examples:"0"=>true" 0.1 "=>true"abc"=>false"1 a"=>false"2e10"=>trueNote:It is intended for the ...
分类:
其他好文 时间:
2015-01-24 11:30:31
阅读次数:
198
MD5 加密using System.Security.Cryptography;public static string encrypherment(string password) { string StrEncipherment = ""; ...
分类:
其他好文 时间:
2015-01-24 11:22:23
阅读次数:
90
一、获取当前文件的路径string str1=Process.GetCurrentProcess().MainModule.FileName;//可获得当前执行的exe的文件名。 string str2=Environment.CurrentDirectory;//获取和设置当前目录(即该进程从中启...
%1$s表示第一个替换位置是以字符串类型放入
例如
System.out.println(String.format("%1$s 您好%2$s", "某某","!"));输出的是“某某 您好!”
String.format后第一个参数是表达式,后面可以放入N个待放入值
更详细用法参考下面:
import java.math.BigDecimal;
/**
* 1.%[argu...
分类:
其他好文 时间:
2015-01-24 10:17:30
阅读次数:
129
http://blog.chinaunix.net/u1/53027/showart.php?id=482234在shell中常用的特殊符号罗列如下:# ;;; . ,/\'string'|!$${}$? $$$*"string"***? :^ $#$@`command`{} [] [[]]() (...
分类:
系统相关 时间:
2015-01-24 10:07:36
阅读次数:
183
最近GFW为了刷存在感,搞得大家是头晕眼花,修改hosts 几乎成了每日必备工作。索性写了一个小程序,给办公室的同事们分享,其中有个内容 就是抓取网络上的hosts,废了一些周折。我是在一个博客上抓取的。但是这位朋友的博客应该是在做防盗链,但他的方式比较简单就是5位数的一个整形随机数。这里折腾一下就...
分类:
编程语言 时间:
2015-01-24 01:37:10
阅读次数:
319