if (Directory.Exists(path)) { string[] name = Directory.GetFiles(path); foreach (string item in name) { ...
分类:
其他好文 时间:
2014-06-27 18:44:08
阅读次数:
196
使用fstream读取文件,什么时候读到文件结束呢。首先想到的是,将现在的位置与文件的长度对比,然后再fstream中无法直接获取文件长度。可以采用如下方法fstream in;in.open("path",ios::in);in.seekg(0,ios::end);int length=in.te...
分类:
其他好文 时间:
2014-06-27 17:01:50
阅读次数:
939
http://www.cnblogs.com/Leo_wl/archive/2012/04/06/2435511.html以前一直比较好奇,jquery插件是怎么开发的,怎么写属于自己的插件?昨天在逛codeproject网站的时候,突然看到一篇文章:How to write plugin in J...
分类:
Web程序 时间:
2014-06-26 12:44:23
阅读次数:
331
document.write(parseInt(10*Math.random())); //输出0~10之间的随机整数document.write(Math.floor(Math.random()*10+1)); //输出1~10之间的随机整数//输出指定位数的随机数的随机整数function .....
分类:
编程语言 时间:
2014-06-26 11:22:20
阅读次数:
249
1.下载wls_121200.jar,2.输入cnd打开命令提示3.f:进入F盘4.Java -version 验证是否配置Java环境,5.echo %path% 查看环境变量6.set PATH=%PATH%;D:\jdk-7u9-windows-x64\jdk1.7.0_09\bin 在当前进...
分类:
Web程序 时间:
2014-06-26 11:16:55
阅读次数:
390
最近写程序的时候发现一个这样的问题,一个if判断如下:[php]if (!empty(trim($ch_url))) { ...}[/php]执行程序报出如下错误:[code]Fatal error: Can't use function return value in write context ...
分类:
其他好文 时间:
2014-06-26 11:15:31
阅读次数:
195
读者优先
//读者写者问题-读者优先
#include
#include
#include
using namespace std;
HANDLE rmutex,wmutex;
int Readcount=0;
int read_num=10,write_num=5;
DWORD WINAPI read(LPVOID lpParam)
{
WaitForSingleObject(...
分类:
其他好文 时间:
2014-06-26 10:41:57
阅读次数:
185
直接改变环境变量PATH,是不可以更换JDK的...
分类:
其他好文 时间:
2014-06-26 08:02:30
阅读次数:
184
Follow up for "Search in Rotated Sorted Array":
What if duplicates are allowed?
Would this affect the run-time complexity? How and why?
Write a function to determine if a given target is in the...
分类:
其他好文 时间:
2014-06-26 07:09:01
阅读次数:
213
依然,废话不多说直接给命令sudomount-tcifs-ousername=YOURDOMAIN\\username,passwd=‘mypassword‘//10.123.123.123/temp/svrshare$HOME/mymntcdmymntcptemp.txt$HOMEcd~chmod777temp.txt简单讲述一下以上什么意思,第一条就是将//10.123.123.123/temp/svrshare共享目录加载到..