在Java移动文件夹及其所有子文件与子文件夹可以有如下的一段简单的方法来说明:
public static void moveFolder(String oldPath, String newPath) {
//先复制文件
copyFolder(oldPath, newPath);
//则删除源文件,以免复制的时候错乱
deleteDir(new File(oldPath));
}
不...
分类:
移动开发 时间:
2015-04-16 10:25:11
阅读次数:
203
本篇我们来讨论C#中的Lambda表达式。本篇会使用上一篇文章:C#委托中的Person类,代码如下public delegate void MyDelegate();public class Person
{
public string Name { get; set; }
public int Age { get; set; }
public void ZhuangBi(...
String connString = "Data Source = localhost; Initial Catalog = hkjc;User ID = sa;Pwd = 123"; SqlConnection conn = new SqlConnection(connString); ...
分类:
Web程序 时间:
2015-04-16 10:17:51
阅读次数:
136
配置清单文件加上权限private String getLocalIpAddress() { int paramInt = ((WifiManager) getSystemService("wifi")).getConnectionInfo().getIpAddress(); ...
分类:
移动开发 时间:
2015-04-16 09:05:16
阅读次数:
169
public class Solution { public String multiply(String num1, String num2) { if(num1==null || num2==null || num1.length()*num2.length()==0) re...
分类:
其他好文 时间:
2015-04-16 06:43:13
阅读次数:
94
黑马程序员java培训 第十四天笔记1.正则表达式概述与基本使用正则表达式是用来校验符合正确规则的一串字符。介绍规则:在String类中有一个matcher方法,它有一个正则表达式的连接。package lm.Regex;import java.util.Scanner;/**...
分类:
其他好文 时间:
2015-04-16 01:21:01
阅读次数:
142
黑马程序员java培训第十三天笔记1.字符串缓冲区对象 StringBuffer类对与string类的操作,浪费空间,时间加长。为了提高字符串对象的操作效率,节省空间,开发了字符串的缓冲区对象StringBuffer。线程安全:多个程序一起操作字符串缓冲区可变字符序列: String类和String...
分类:
其他好文 时间:
2015-04-16 01:04:55
阅读次数:
174
namespace 找到一段话中第二个关键字的位置{ class Program { static void Main(string[] args) { //找第二个a string s = "cabcaceadf"; int n = s.IndexOf("a"); //找到第一个a的索引n str...
分类:
其他好文 时间:
2015-04-16 01:03:09
阅读次数:
127
文本1. string:通用字符串操作2. re:正则表达式操作3. difflib:差异计算工具4. textwrap:文本填充5. unicodedata:Unicode字符数据库6. stringprep:互联网字符串准备工具7. readline:GNU按行读取接口8. rlcomplete...
分类:
编程语言 时间:
2015-04-16 01:00:50
阅读次数:
242
namespace 运算符穷举{ class Program { static void Main(string[] args) { //123()45()68=100; 在括号里面添加+-使等式成立 int a; int b; for (int i = 0; i < 2; i++)//有0 和.....
分类:
其他好文 时间:
2015-04-16 00:59:18
阅读次数:
216