一、获取当前文件的路径string str1=Process.GetCurrentProcess().MainModule.FileName;//可获得当前执行的exe的文件名。string str2=Environment.CurrentDirectory;//获取和设置当前目录(即该进程从中启动...
1 /// 2 /// 判断字符串是否是数字 3 /// 4 /// 5 /// 6 /// 7 /// 8 public static bool IsNumType(this string str, NumType nt...
分类:
其他好文 时间:
2015-05-23 23:56:17
阅读次数:
330
实例1:简单的饼图public class Test { public static void main(String[] args) { //建立默认的饼图 DefaultPieDataset ds=new DefaultPieDataset(); ds.setValue("苹果",6000); ...
分类:
其他好文 时间:
2015-05-23 23:54:28
阅读次数:
219
看到题目,就应该能想到应该是字符串过长引起的问题。下面咱们分析一下。
报错:
严重: Servlet.service()for servlet jsp threw exception
java.lang.StringIndexOutOfBoundsException:String index out of range: -1
根据代码跟踪,发现是首页数据加载...
分类:
其他好文 时间:
2015-05-23 22:46:22
阅读次数:
143
------- android培训、java培训、期待与您交流! ----------13.01 StringBuffer的概述StringBuffer类概述:线程安全的可变字符序列。一个类似于 String 的字符串缓冲区,但不能修改。虽然在任意时间点上它都包含某种特定的字符序列,但通过某些方法调...
分类:
编程语言 时间:
2015-05-23 22:41:46
阅读次数:
277
public class Triangle{ public static int[] orderby(int[] nums,String str){ if(str.equalsIgnoreCase("desc")){ for(int i=0;inums[j]...
分类:
编程语言 时间:
2015-05-23 22:32:50
阅读次数:
136
一、break终止循环在循环中,遇到break;将会跳出循环,继续往下执行代码public class Test{ public static void main(String[] args){ for(int i=1;i<30;i++){ if(i==15...
分类:
编程语言 时间:
2015-05-23 22:31:19
阅读次数:
130
一、while循环实例:public class Test{ public static void main(String[] args){ int i = 1; while(ir){ System.out.println(...
分类:
编程语言 时间:
2015-05-23 21:25:48
阅读次数:
210
原文转载:http://www.cnblogs.com/luqian5588/p/3228225.html感觉这种最好用: public void showMessage(string str_Message) { Page.ClientScript...
分类:
Web程序 时间:
2015-05-23 21:21:29
阅读次数:
148
下面程序会崩溃:const char* t_objName = (obj!=NULL)?obj->getName(): 0;string objName=t_objName;coutgetName(): 0;string objName=(t_objName==0)?"":t_objName;cou...
分类:
编程语言 时间:
2015-05-23 21:14:53
阅读次数:
123