要检测文件被那个进程占用,需要使用微软提供的工具Handle.exe,这里有微软提供的下载我们可以在c#中调用Handle.exe 来检测到底哪个进程占用了文件string fileName = @"c:\aaa.doc";//要检查被那个进程占用的文件Process tool = new Proc...
MVC写API接口遇到问题 [HttpPost] [POST("alterScriptParams")] public bool AlterScriptParamsByScriptName(string scriptName,string scriptPar...
分类:
其他好文 时间:
2015-01-13 17:22:26
阅读次数:
114
记录一下平时经常需要运用到得文件相关内容,俗话讲好记性不如烂笔头!
1) /**
* 根据路径获得,某个文件或文件夹所在的存储器的内存空间总大小
*
* @return
*/
public static long getTotalMemorySize(String path) {
StatFs stat = new StatFs(path);
...
分类:
移动开发 时间:
2015-01-13 16:03:28
阅读次数:
193
string strl="";//存储编码 WebRequest request = WebRequest.Create(txtHtmlUrl.Text.Trim());//请求资源 WebResponse respons...
分类:
Web程序 时间:
2015-01-13 15:52:39
阅读次数:
218
。输入一个字符串,查找出出现次数最多的字符 1 public static void main(String[] args) { 2 // TODO Auto-generated method stub 3 4 System.out.println("请输入一个字符...
分类:
其他好文 时间:
2015-01-13 15:48:07
阅读次数:
107
SpannableString 来改变textView中http协议,手机号,已经你想要改变的字的颜色,以及添加onClick事件...
分类:
移动开发 时间:
2015-01-13 14:28:33
阅读次数:
161
前人栽树,后人乘凉
本讲内容:关于交换两个数
对于Java来说,对于基本数据类型,Java传递的是一个拷贝副本,根本不能改变参数的值。可以通过数组来完成,因为数组传递的是地址。
例一:
public class Text {
public static void main(String[] args) {
int a=4;
int b=5...
分类:
其他好文 时间:
2015-01-13 14:26:04
阅读次数:
175
java按文件大小、名称、日期排序方法
代码如下:
//java按文件大小、名称、日期排序
//java按文件大小、名称、日期排序方法
import java.io.*;
import java.util.*;
public class FileOrder{
//按照文件大小排序
public static void orderByLength(String fliePath) ...
分类:
编程语言 时间:
2015-01-13 14:19:56
阅读次数:
171
网上找的抽奖代码都不满意,自己动手丰衣足食,有需要的可以直接拿去用,不收版权费的。/// /// 抽奖/// public class Prize{ /// /// 奖品关键字 /// public string Key { get; set; } /// ...
分类:
编程语言 时间:
2015-01-13 14:13:51
阅读次数:
149
Letter Combinations of a Phone NumberGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit ...
分类:
其他好文 时间:
2015-01-13 14:03:28
阅读次数:
226