封装加密方法:
public string DecodeBase64(string code_type, string code)
{
string decode = "";
byte[] bytes = Convert.FromBase64String(code);
try
{
decode = Encoding.GetEncoding(code_type).G...
分类:
其他好文 时间:
2015-05-13 10:43:38
阅读次数:
236
封装加密方法:
public string EncodeBase64(string codepe,_ty string code)
{
string encode = "";
byte[] bytes = Encoding.GetEncoding(code_type).GetBytes(code);
try
{
encode = Convert.ToBase64St...
分类:
其他好文 时间:
2015-05-13 10:42:53
阅读次数:
116
String的getBytes()方法是得到一个系统默认的编码格式的字节数组getBytes("utf-8")得到一个UTF-8格式的字节数组把String转换成bytes,各种编码转换成的bytes不同,比如UTF-8每个汉字转成3bytes,而GBK转成2bytes,所以要说明编码方式,否则用....
分类:
其他好文 时间:
2015-05-12 20:48:32
阅读次数:
117
malloc原型:extern void* malloc(unsigned int num_bytes);头文件:#include返回值: 返回void*指针,因此必要时需要进行类型转换备注:void* 表示未确定类型的指针,void *可以指向任何类型的数据,更明确的说是指申请内存空间时还不知道用...
分类:
其他好文 时间:
2015-05-11 19:54:56
阅读次数:
115
===============File===============配置1: file.content.limit 65536 The length limit for downloaded content using the file protocol, in bytes. If thi...
分类:
其他好文 时间:
2015-05-10 12:52:19
阅读次数:
170
1.使用DESedeKeySpec类时,抛了一个异常:InvalidKeyException!
看这个类的源码时才知道:/**
* Creates a new DESedeKeySpec instance from the first 24 (
* {@link #DES_EDE_KEY_LEN}) bytes of the specified k...
分类:
其他好文 时间:
2015-05-10 09:45:03
阅读次数:
157
linux下采用先分割后合并的策略处理大文件第一步:分割文件 splitsplit 参数:-a, --suffix-length=N 指定输出文件名的后缀,默认为2个-b, --bytes=SIZE 指定输出文件的字节数-C, --line-bytes=SIZE 每一输出档中,单行的最大 byte ...
分类:
系统相关 时间:
2015-05-09 21:45:52
阅读次数:
199
#wc-[cmlLw]选项和参数-c,--bytes统计字节数-m,--chars统计字符数-l,--lines统计行数-L,--max-line-length最长行的字符数-w,--words统计单词数例子:root@localhost:~/shell#catfileMassachusettsVirginiaTulsaFallsMassachusettsVirginiaViewMassachusettsviewroot@localhost:..
分类:
系统相关 时间:
2015-05-08 20:30:05
阅读次数:
240
--string.len(s)--返回字符串s的长度--string.rep(s, n)--返回重复n次字符串s的串,你使用string.rep("a", 2^20)可以创建一个1M bytes的字符串(比如,为了测试需要)--string.lower(s)--将s中的大写字母转换成小写(strin...
分类:
其他好文 时间:
2015-05-08 19:58:26
阅读次数:
134
在SQL Server :理解数据页结构我们提到每条记录都有7 bytes的系统行开销,那这个7 bytes行开销到底是一个什么样的结构,我们一起来看下。数据记录存储我们具体的数据,换句话说,它存在堆表里,或者存在聚集索引的叶子节点。数据记录结构是为了让SQL Server更高效的管理数据。我们来看...
分类:
数据库 时间:
2015-05-07 23:39:48
阅读次数:
207