上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页
摘要: import java.util.StringTokenizer;public class StringTokenizerTest { public static void main(String[] args) { String str="数学::英语::语文::化学"; StringTokenizer st=new StringTokenizer(str,"::"); System.out.println(st.countTokens()); while(st.hasMoreTokens()) ... 阅读全文
posted @ 2013-08-30 15:48 fang_beny 阅读(784) 评论(0) 推荐(0) 编辑
摘要: 1 public class StringBufferTest { 2 public static void main(String[] args) { 3 StringBuffer sb=new StringBuffer(); 4 sb.append("aaa"); 5 sb.append("bbb"); 6 sb.append(123); 7 sb.append(false); 8 sb.insert(3, "tt"); 9 sb.insert(3,true);10 ... 阅读全文
posted @ 2013-08-30 15:38 fang_beny 阅读(196) 评论(0) 推荐(0) 编辑
摘要: public class TypeConvert { public static void main(String[] args) { fromInt(); fromFloat(); fromDouble(); fromChar(); toOther(); } public static void fromInt() { Integer intvar=1; String Strint; Strint=String.valueOf(int... 阅读全文
posted @ 2013-08-30 15:08 fang_beny 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 1 public class StringTest { 2 3 public static void main(String[] args) 4 { 5 String a=new String("sSassasss"); 6 7 System.out.println(a.substring(1)); 8 9 System.out.println(a.substring(2,4));10 11 String[] array=a.split(",", 3);12 ... 阅读全文
posted @ 2013-08-30 14:39 fang_beny 阅读(165) 评论(0) 推荐(0) 编辑
摘要: import java.util.Date;public class datetest { public static void main(String[] args) { Date _date=new Date(); long _time=_date.getTime(); System.out.println(_time); }} 阅读全文
posted @ 2013-08-30 13:46 fang_beny 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 1 import java.util.Hashtable; 2 public class HashTable { 3 public static void main (String[] args) 4 { 5 Hashtable ht=new Hashtable(); 6 ht.put("xiao wang", 30); 7 ht.put("zhang san", "aaa"); 8 ht.put("he hai", true); 9 10 System.out.println(ht.size());11 ht.r 阅读全文
posted @ 2013-08-30 11:17 fang_beny 阅读(307) 评论(0) 推荐(0) 编辑
摘要: 1 import java.util.Vector; 2 3 public class VectorTesting { 4 public static void main(String[] args) { 5 Vector _vector=new Vector(); 6 Integer intObj=new Integer(1); 7 _vector.addElement(intObj); 8 String strObj="1"; 9 _vector.addElement(strObj);10 ... 阅读全文
posted @ 2013-08-30 11:01 fang_beny 阅读(529) 评论(0) 推荐(0) 编辑
摘要: import java.io.*;public class HelloWorld { //Main method. public static void main(String[] args) { CreateFile(); ListFileName(); ShowSeparator(); } //Create a file. //Judge that the file exists. public static void CreateFile() { File f = new File("d:\\hello.xt"); try { if (!f.exists()) { . 阅读全文
posted @ 2013-08-29 15:47 fang_beny 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 添加服务:cd C:\Windows\Microsoft.NET\Framework\v4.0.30319InstallUtil.exe D:\OneKeyWebSiteDeployment\Service\WindowsServerForBuidingMainSite.exe卸载服务:cd C:\Windows\Microsoft.NET\Framework\v4.0.30319installutil /u D:\OneKeyWebSiteDeployment\Service\WindowsServerForBuidingMainSite.exe 阅读全文
posted @ 2013-08-15 11:03 fang_beny 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 背景: 今天遇到了数据合并和拆分的问题,尝试了几种写法。但大致可分为两类:一、原始写法。二、Sql Server 2005之后支持的写法。第一种写法复杂而且效率低下,不推荐。所以下面具体讲一下第二种写法。数据的拆分: 再讲拆分前,首先先介绍两个函数:cross apply和outer apply。这两个函数作用是交叉连接。这两个函数是在sql server 2005之后才有的,在2000与之相似的功能是cross join。虽然相似,但是cross join有一个致命功能缺陷。详看代码:SELECT * FROM TEST01 AS T01 CROSS JOIN FUNC_TB2(T01... 阅读全文
posted @ 2013-08-13 15:08 fang_beny 阅读(14878) 评论(8) 推荐(10) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页