总是忘记, 备份一下,方便下次用.第一种:File directory = new 
File("");//参数为空String courseFile = directory.getCanonicalPath() 
;System.out.println(courseFile);结果:C:\Docume...
                            
                            
                                分类:
编程语言   时间:
2014-05-08 12:43:50   
                                阅读次数:
343
                             
                         
                    
                        
                            
                            
                                C#获取当前路径的方法如下:1. 
System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName-获取模块的完整路径。2. 
System.Environment.CurrentDirectory-获取和设置当前目录(该进程从中启动...
                            
                            
                                分类:
其他好文   时间:
2014-05-08 11:52:05   
                                阅读次数:
240
                             
                         
                    
                        
                            
                            
                                1 import java.util.Scanner; 2 3 public class T003 { 
4 5 public static void main(String[] args) { 6 Scanner in = new 
Scanner(System.in);...
                            
                            
                                分类:
编程语言   时间:
2014-05-08 11:24:26   
                                阅读次数:
346
                             
                         
                    
                        
                            
                            
                                Communication SystemTime Limit:1000MSMemory 
Limit:10000KTotal Submissions:22380Accepted:7953DescriptionWe have received an 
order from Pizoor Communica...
                            
                            
                                分类:
其他好文   时间:
2014-05-08 11:19:16   
                                阅读次数:
278
                             
                         
                    
                        
                            
                            
                                --> 增加 using System;using 
System.Collections.Generic;us...
                            
                            
                                分类:
其他好文   时间:
2014-05-08 09:51:40   
                                阅读次数:
323
                             
                         
                    
                        
                            
                            
                                C#部分:1.泛型的出现主要用于解决类、接口、委托、方法的通用性,通过定义泛型类、接口、委托、方法,可以让不同类型的数据使用相同运算规则处理数据,方便了开发。2.利用System.Nullable泛型可以生成可空的值类型变量,值类型的可空泛型可以简写为关键字加问号,如:int? 
val=new in...
                            
                            
                                分类:
编程语言   时间:
2014-05-08 05:33:04   
                                阅读次数:
376
                             
                         
                    
                        
                            
                            
                                我之前一直采用的是System.exit(0);
今天看到有人说这个方法不太好,这是J2SE里的方法,他主要是通过终止正在运行的JAVA虚拟机,导致程序终止。
推荐以下方法:
1.杀死本进程:
android.os.Process.killProcess(android.os.Process.myPid());
2.强制关闭与该包有关的一切活动(杀死其他进程):
ActivityMan...
                            
                            
                                分类:
移动开发   时间:
2014-05-08 04:30:28   
                                阅读次数:
368
                             
                         
                    
                        
                            
                            
                                文件系统管理重新创建文件系统会损坏原有文件。创建某个分区上的文件系统使用mkfs:makefilesystem-tFSTYPE指定文件系统类型mkfs命令比较特殊[root@www~]#whichmkfs.ext2/sbin/mkfs.ext2[root@www~]#ls-l/sbin/mkfs.ext2-rwxr-xr-x3rootroot47312Sep42009/sbin/mkfs.ext2所以:..
                            
                            
                                分类:
系统相关   时间:
2014-05-08 02:33:29   
                                阅读次数:
406
                             
                         
                    
                        
                            
                            
                                1.创建新的字符串 1 public class T004 { 2 public static 
void main(String[] args){ 3 System.out.println(replaceBlank("we are happy")); 4 
} 5 ...
                            
                            
                                分类:
编程语言   时间:
2014-05-08 01:08:18   
                                阅读次数:
364
                             
                         
                    
                        
                            
                            
                                之前都是用扩展方法来copy属性值,不过兼容性不是很好。(关于这个扩展方法可以参照这个博客),不过我们可以通过下方的代码来实现,由于是微软提供的功能,所以不需要考虑兼容性问题:public partial class WebForm2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventAr...
                            
                            
                                分类:
其他好文   时间:
2014-05-08 00:19:02   
                                阅读次数:
326