1. Linux 参考: archlinux fstab和Solid State Drives 1) 修改fstab开启Trim /dev/sda1 / ext4 noatime,discard 0 1
tmpfs /tmp tmpfs nodev,nosuid,noexec,relatime,mode=1777,size=15% 0 0
tmpfs ...
分类:
其他好文 时间:
2015-08-01 22:10:04
阅读次数:
238
在Windows下用文本编辑器创建的文本文件,如果选择以UTF-8等Unicode格式保存,会在文件头(第一个字符)加入一个BOM标识。
这个标识在Java读取文件的时候,不会被去掉,而且String.trim()也无法删除。如果用readLine()读取第一行存进String里面,这个String的length会比看到的大1,而且第一个字符就是这个BOM。
这种情况会造成一些...
分类:
编程语言 时间:
2015-07-31 15:01:19
阅读次数:
216
三个Trim函数简介 函数原型 function Trim(const S: string): string; 将字符串前后的空白及控制字元清掉. 函数原型 function TrimLeft(const S: string): string; 将字符串左...
function blurCode(id, idErr, errCode) { $(id).blur(function () { var loginCode = $(id).val(); if ($.trim(loginCode).length <= 0) { ...
分类:
其他好文 时间:
2015-07-31 09:02:43
阅读次数:
157
//根据文件路径截取文件名
publicStringgetfileName(Strings)throwsException{
s.trim();
StringfileName=s.substring(s.lastIndexOf("/")+1);
//或者
StringfileName=s.substring(s.lastIndexOf("\\")+1);
System.out.println("fileName="+fileName);
returnfileName;
}参考..
分类:
其他好文 时间:
2015-07-29 19:42:57
阅读次数:
97
noop方法jQuery.noop()函数是一个空函数,它什么也不做。当某些时候你需要传入函数参数,而且希望它什么也不做的时候,你可以使用该函数,也无需再新建一个空的函数。示例:// 传入一个空函数作为参数,返回一个空数组// 空函数的返回值为undefined,而null或undefined值会被...
分类:
Web程序 时间:
2015-07-27 10:52:25
阅读次数:
140
----------------------------------js去空格--------------------------- 去除字符串左右两端的空格,在vbscript里面可以轻松地使用 trim、ltrim 或 rtrim,但在js中却没有这3个内置方法,需要手工编写。下面的实现方法.....
分类:
Web程序 时间:
2015-07-26 12:24:54
阅读次数:
140
function IsNumberic(Vaule:String):Boolean; //判断Vaule是不是数字vari:integer;beginresult:=true; //设置返回值为 是(真)Vaule:=trim(Vaule); //去空格 for i:=1 to length(Vau...
分类:
其他好文 时间:
2015-07-26 11:04:45
阅读次数:
142
trim是ata的一个指令,对应scsi指令是unmap,那么什么是trim呢?trim就是OS发送给ssdorothertypecontroller,告诉它哪些数据对应的LBA地址是无效的。之后trim就不做什么其他操作了。后续的事情由GC来进行。Secureerase是一则ATA安全擦除命令,用户清除磁盘上的所有数据。这则命..
分类:
其他好文 时间:
2015-07-26 06:21:50
阅读次数:
947
Trim the Nails
Time Limit: 2 Seconds Memory Limit: 65536 KB
Robert is clipping his fingernails. But the nail clipper is old and the edge of the nail clipper is potholed.
The nail clipper's...
分类:
其他好文 时间:
2015-07-25 07:10:53
阅读次数:
105