代码
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;
using System.IO; namespace BaseFunction
{
/// <summary>
/// 常用函数。
/// 作者:苏飞
/// 时间:20090322
/// </summary>
public sealed class Functions
{
static Int32 index; #region 前面补零
/// <summary>
/// 不住位数的数字,前面补零
/// </summary>
/// <param name="value">要补足的数字</param>
/// <param name="size">不齐的位数</param>
/// <returns></returns>
public static string Zerofill(string value, int size)
{
string tmp = "";
for (int i = ; i < size - value.Length; i++)
{
tmp += "";
} return tmp + value;
}
#endregion #region 过滤掉 html代码
/// <summary>
/// 过滤html标签
/// </summary>
/// <param name="strHtml">html的内容</param>
/// <returns></returns>
public static string StripHTML(string strHtml)
{
string[] aryReg ={
@"<script[^>]*?>.*?</script>", @"<(\/\s*)?!?((\w+:)?\w+)(\w+(\s*=?\s*(([""'])(\\[""'tbnr]|[^\7])*?\7|\w+)|.{0})|\s)*?(\/\s*)?>",
@"([\r\n])[\s]+",
@"&(quot|#34);",
@"&(amp|#38);",
@"&(lt|#60);",
@"&(gt|#62);",
@"&(nbsp|#160);",
@"&(iexcl|#161);",
@"&(cent|#162);",
@"&(pound|#163);",
@"&(copy|#169);",
@"&#(\d+);",
@"-->",
@"<!--.*\n"
}; string[] aryRep = {
"",
"",
"",
"\"",
"&",
"<",
">",
" ",
"\xa1",//chr(161),
"\xa2",//chr(162),
"\xa3",//chr(163),
"\xa9",//chr(169),
"",
"\r\n",
""
}; string newReg = aryReg[];
string strOutput = strHtml;
for (int i = ; i < aryReg.Length; i++)
{
System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex(aryReg, System.Text.RegularExpressions.RegexOptions.IgnoreCase);
[i] strOutput = regex.Replace(strOutput, aryRep);
}
//strOutput.Replace("<", "");
//strOutput.Replace(">", "");
strOutput = strOutput.Replace("\r\n", "");
return strOutput;
}
#endregion #region 全角半角转换
/// <summary>
/// 转全角的函数(SBC case)
/// </summary>
/// <param name="input">任意字符串</param>
/// <returns>全角字符串</returns>
///<remarks>
///全角空格为12288,半角空格为32
///其他字符半角(33-126)与全角(65281-65374)的对应关系是:均相差65248
///</remarks>
public static string ToSBC(string input)
{
//半角转全角:
char[] c = input.ToCharArray();
for (int i = ; i < c.Length; i++)
{
if (c == )
{
c = (char);
continue;
}
if (c < )
c = (char)(c + );
}
return new string(c);
} /// <summary> 转半角的函数(DBC case) </summary>
/// <param name="input">任意字符串</param>
/// <returns>半角字符串</returns>
///<remarks>
///全角空格为12288,半角空格为32
///其他字符半角(33-126)与全角(65281-65374)的对应关系是:均相差65248
///</remarks>
public static string ToDBC(string input)
{
char[] c = input.ToCharArray();
for (int i = ; i < c.Length; i++)
{
if (c == )
{
c = (char);
continue;
}
if (c > && c < )
c = (char)(c - );
}
return new string(c);
}
#endregion #region 传入URL返回网页的html代码 /// <summary>
/// 传入URL返回网页的html代码
/// </summary>
/// <param name="Url">URL</param>
/// <returns></returns>
public static string GetUrltoHtml(string Url)
{
try
{
System.Net.WebRequest wReq = System.Net.WebRequest.Create(Url);
// Get the response instance.
System.Net.WebResponse wResp = wReq.GetResponse();
// Read an HTTP-specific property
//if (wResp.GetType() ==HttpWebResponse)
//{
//DateTime updated =((System.Net.HttpWebResponse)wResp).LastModified;
//}
// Get the response stream.
System.IO.Stream respStream = wResp.GetResponseStream();
// Dim reader As StreamReader = New StreamReader(respStream)
System.IO.StreamReader reader = new System.IO.StreamReader(respStream, System.Text.Encoding.GetEncoding("gb2312"));
return reader.ReadToEnd(); }
catch (System.Exception ex)
{
//errorMsg = ex.Message;
}
return "";
} #endregion #region MD5加密字符串。截取字符串 /// <summary>
/// 传入明文,返回用MD%加密后的字符串
/// </summary>
/// <param name="str">要加密的字符串</param>
/// <returns>用MD5加密后的字符串</returns>
public static string ToMD5(string str)
{
return System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str, "md5");
}
/// <summary>
/// 截取字符串。
/// </summary>
/// <param name="str">要接取得字符串</param>
/// <param name="number">保留的字节数。按半角计算</param>
/// <returns>指定长度的字符串</returns>
public static string StringCal(string str, int number)
{
Byte[] tempStr = System.Text.Encoding.Default.GetBytes(str);
if (tempStr.Length > number)
{
return System.Text.Encoding.Default.GetString(tempStr, , number - ) + "..";
}
else
return str;
} #endregion #region 删除文件 /// <summary>
/// 删除文件
/// </summary>
/// <param name="FilePath">文件的物理地址</param>
/// <returns></returns>
public static bool DeleteFile(string FilePath)
{
try
{
System.IO.File.Delete(FilePath);
return true;
}
catch
{
//errorMsg = "删除不成功!";
return false;
}
}
#endregion #region 验证——数字部分
/// <summary>
/// 判断是否是实数,是返回true 否返回false。可以传入null。
/// </summary>
/// <param name="strVal">要验证的字符串</param>
/// <returns></returns>
public static bool IsNumeric(string strVal)
{
//System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex("-?([0]|([1-9]+\\d{0,}?))(.[\\d]+)?$");
//return reg1.IsMatch(strVal);
//string tmp="";
//判断是否为null 和空字符串
if (strVal == null || strVal.Length == )
return false;
//判断是否只有.、-、 -.
if (strVal == "." || strVal == "-" || strVal == "-.")
return false; //记录是否有多个小数点
bool isPoint = false; //是否有小数点 //去掉第一个负号,中间是不可以有负号的
strVal = strVal.TrimStart('-'); foreach (char c in strVal)
{
if (c == '.')
if (isPoint)
return false;
else
isPoint = true; if ((c < '' || c > '') && c != '.')
return false;
}
return true;
} /// <summary>
/// 判断是否为整数。是返回true 否返回false。可以传入null。
/// </summary>
/// <param name="strVal">要判断的字符</param>
/// <returns></returns>
public static bool IsInt(string strVal)
{
if (strVal == null || strVal.Length == )
return false;
//判断是否只有.、-、 -.
if (strVal == "." || strVal == "-" || strVal == "-.")
return false; //去掉第一个负号,中间是不可以有负号的
if (strVal.Substring(, ) == "-")
strVal = strVal.Remove(, ); foreach (char c in strVal)
{
if (c < '' || c > '')
return false;
}
return true;
} /// <summary>
/// 判断是否为ID串。是返回true 否返回false。可以传入null。
/// </summary>
/// <example >
/// ,1,2,3,4,5,6,7,
/// </example>
/// <param name="strVal">要判断的字符串</param>
/// <returns></returns>
public static bool IsIDString(string strVal)
{
bool flag = false;
if (strVal == null)
return false;
if (strVal == "")
return true;
//判断是否只有 ,
if (strVal == ",")
return false; //判断第一位是否是,号
if (strVal.Substring(, ) == ",")
return false; //判断最后一位是否是,号
if (strVal.Substring(strVal.Length - , ) == ",")
return false; foreach (char c in strVal)
{
if (c == ',')
if (flag) return false; else flag = true; else if ((c >= '' && c <= ''))
flag = false;
else
return false;
}
return true;
} /// <summary>
/// 转换为整数。不是整数的话,返回“-1”
/// </summary>
/// <param name="str">要转换的字符</param>
/// <returns></returns>
public static int StringToInt(string str)
{
//判断是否是数字,是数字返回数字,不是数字返回-1
if (IsInt(str))
return Int32.Parse(str);
else
return -;
} /// <summary>
/// 转换为实数。不是实数的话,返回“-1”
/// </summary>
/// <param name="str"></param>
/// <returns></returns>
public static float StrTofloat(string str)
{
//判断是否是数字,是数字返回数字,不是数字返回-1
if (IsNumeric(str))
return float.Parse(str);
else
return -;
} /// <summary>
/// 验证是否是GUID
/// 6454bc76-5f98-de11-aa4c-00219bf56456
/// </summary>
/// <returns></returns>
public static bool IsGUID(string strVal)
{
if (strVal == null)
return false; if (strVal == "")
return false; strVal = strVal.TrimStart('{');
strVal = strVal.TrimEnd('}'); //长度必须是36位
if (strVal.Length != )
return false; foreach (char c in strVal)
{
if (c == '-')
continue;
else if (c >= 'a' && c <= 'f')
continue;
else if (c >= 'A' && c <= 'F')
continue;
else if ((c >= '' && c <= ''))
continue;
else
return false;
}
return true;
}
#endregion #region 验证——处理字符串部分 /// <summary>
/// 去掉两边的空格,把“'”替换为“'”SBC
/// </summary>
/// <param name="str">要处理的字符串</param>
/// <returns></returns>
public static string StringReplaceToSBC(string str)
{
//过滤不安全的字符
string tstr;
tstr = str.Trim();
return tstr.Replace("'", "'");
} /// <summary>
/// 去掉两边的空格,把“'”替换为“''”DBC
/// </summary>
/// <param name="str">要验证的字符串</param>
/// <returns></returns>
public static string StringReplaceToDBC(string str)
{
//过滤不安全的字符
string tstr;
tstr = str.Trim();
return tstr.Replace("'", "''");
}
/// <summary>
/// 去掉两边的空格,把“'”替换为“”
/// </summary>
/// <param name="str">要验证的字符串</param>
/// <returns></returns>
public static string StringReplaceToEmpty(string str)
{
//过滤不安全的字符
string tstr;
tstr = str.Trim();
return tstr.Replace("'", "");
} #endregion #region 验证——时间部分 /// <summary>
/// 转换时间。不正确的话,返回当前时间
/// </summary>
/// <param name="isdt">要转换的字符串</param>
/// <returns></returns>
public static DateTime StringToDateTime(string isdt)
{
//判断时间是否正确
DateTime mydt;
try
{
mydt = Convert.ToDateTime(isdt);
}
catch
{
//时间格式不正确
return mydt = DateTime.Now;
} return mydt;
} /// <summary>
/// 判断是否是正确的时间格式。正确返回“true”,不正确返回提示信息。
///
/// </summary>
/// <param name="isdt">要判断的字符串</param>
/// <returns></returns>
public static bool IsDateTime(string isdt)
{
//判断时间是否正确
DateTime mydt;
try
{
mydt = Convert.ToDateTime(isdt);
return true;
}
catch
{
//时间格式不正确
//errorMsg = "您填的时间格式不正确,请按照2004-1-1的形式填写。";
return false;
} }
#endregion #region 生成查询条件
/// <summary>
/// 组成查询字符串
/// </summary>
/// <param name="columnName">字段名</param>
/// <param name="keyword">查询条件</param>
/// <param name="hasContent">是否已经有查询条件了,true:加and;false:不加and</param>
/// <param name="colType">1:数字;2:字符串,精确查询;3:字符串,模糊查询,包括时间查询</param>
/// <returns></returns>
public static string GetSearchString(string columnName, string keyword, ref bool hasContent, int colType)
{
if (keyword == "" || keyword == "")
{
return "";
}
else
{
System.Text.StringBuilder tmp = new System.Text.StringBuilder();
switch (colType)
{
case :
//数字
tmp.Append(columnName);
tmp.Append(" = ");
tmp.Append(keyword);
break;
case :
//字符串,精确查询
tmp.Append(columnName);
tmp.Append(" = '");
tmp.Append(keyword);
tmp.Append("' ");
break;
case :
//字符串,模糊查询,包括时间查询
tmp.Append(columnName);
tmp.Append(" like '% ");
tmp.Append(keyword);
tmp.Append("%' "); break;
}
if (hasContent)
tmp.Insert(, " and "); hasContent = true;
return tmp.ToString(); } }
#endregion #region ========解密======== /// <summary>
/// 解密
/// </summary>
/// <param name="Text"></param>
/// <returns></returns>
public static string Decrypt(string Text)
{
return Decrypt(Text, "litianping");
} /// <summary>
/// 解密数据
/// </summary>
/// <param name="Text"></param>
/// <param name="sKey"></param>
/// <returns></returns>
public static string Decrypt(string Text, string sKey)
{
DESCryptoServiceProvider des = new DESCryptoServiceProvider();
int len;
len = Text.Length / ;
byte[] inputByteArray = new byte[len];
int x, i;
for (x = ; x < len; x++)
{
i = Convert.ToInt32(Text.Substring(x * , ), );
inputByteArray[x] = (byte)i;
}
des.Key = ASCIIEncoding.ASCII.GetBytes(System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(sKey, "md5").Substring(, ));
des.IV = ASCIIEncoding.ASCII.GetBytes(System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(sKey, "md5").Substring(, ));
System.IO.MemoryStream ms = new System.IO.MemoryStream();
CryptoStream cs = new CryptoStream(ms, des.CreateDecryptor(), CryptoStreamMode.Write);
cs.Write(inputByteArray, , inputByteArray.Length);
cs.FlushFinalBlock();
return Encoding.Default.GetString(ms.ToArray());
} #endregion
} #region 加密、解密字符串
/// <summary>
/// 加密字符串。可以解密
/// </summary>
public class Encryptor
{
#region 加密,固定密钥
/// <summary>
/// 加密
/// </summary>
/// <param name="sourceData">原文</param>
/// <returns></returns>
public static string Encrypt(string sourceData)
{
//set key and initialization vector values
//Byte[] key = new byte[] {0x21, 2, 0x88, 4, 5, 0x56, 7, 0x99};
//Byte[] iv = new byte[] {0x21, 2, 0x88, 4, 5, 0x56, 7, 0x99};
Byte[] key = new byte[] { , , , , , , , };
Byte[] iv = new byte[] { , , , , , , , };
try
{
//convert data to byte array
Byte[] sourceDataBytes = System.Text.ASCIIEncoding.UTF8.GetBytes(sourceData);
//get target memory stream
MemoryStream tempStream = new MemoryStream();
//get encryptor and encryption stream
DESCryptoServiceProvider encryptor = new DESCryptoServiceProvider();
CryptoStream encryptionStream = new CryptoStream(tempStream, encryptor.CreateEncryptor(key, iv), CryptoStreamMode.Write); //encrypt data
encryptionStream.Write(sourceDataBytes, , sourceDataBytes.Length);
encryptionStream.FlushFinalBlock(); //put data into byte array
Byte[] encryptedDataBytes = tempStream.GetBuffer();
//convert encrypted data into string
return System.Convert.ToBase64String(encryptedDataBytes, , (int)tempStream.Length);
}
catch (Exception ex)
{
throw (ex);
}
}
#endregion #region 加密,可以设置密钥
/// <summary>
/// 可以设置密钥的加密方式
/// </summary>
/// <param name="sourceData">原文</param>
/// <param name="key">密钥,8位数字,字符串方式</param>
/// <returns></returns>
public static string Encrypt(string sourceData, string key)
{
//set key and initialization vector values
//Byte[] key = new byte[] {0x21, 2, 0x88, 4, 5, 0x56, 7, 0x99};
//Byte[] iv = new byte[] {0x21, 2, 0x88, 4, 5, 0x56, 7, 0x99}; #region 检查密钥是否符合规定
if (key.Length > )
{
key = key.Substring(, );
}
#endregion char[] tmp = key.ToCharArray();
Byte[] keys = new byte[];
//Byte[] keys = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 };
Byte[] iv = new byte[] { , , , , , , , }; //设置密钥
for (int i = ; i < ; i++)
{
if (tmp.Length > i)
{
keys = (byte)tmp;
}
else
{
keys = (byte)i;
}
} try
{
//convert data to byte array
Byte[] sourceDataBytes = System.Text.ASCIIEncoding.UTF8.GetBytes(sourceData);
//get target memory stream
MemoryStream tempStream = new MemoryStream();
//get encryptor and encryption stream
DESCryptoServiceProvider encryptor = new DESCryptoServiceProvider();
CryptoStream encryptionStream = new CryptoStream(tempStream, encryptor.CreateEncryptor(keys, iv), CryptoStreamMode.Write); //encrypt data
encryptionStream.Write(sourceDataBytes, , sourceDataBytes.Length);
encryptionStream.FlushFinalBlock(); //put data into byte array
Byte[] encryptedDataBytes = tempStream.GetBuffer();
//convert encrypted data into string
return System.Convert.ToBase64String(encryptedDataBytes, , (int)tempStream.Length);
}
catch (Exception ex)
{
throw (ex);
}
}
#endregion #region 解密,固定密钥
/// <summary>
/// 解密
/// </summary>
/// <param name="sourceData">密文</param>
/// <returns></returns>
public static string Decrypt(string sourceData)
{
//set key and initialization vector values
//Byte[] key = new byte[] {0x21, 2, 0x88, 4, 5, 0x56, 7, 0x99};
//Byte[] iv = new byte[] {0x21, 2, 0x88, 4, 5, 0x56, 7, 0x99};
Byte[] keys = new byte[] { , , , , , , , };
Byte[] iv = new byte[] { , , , , , , , };
try
{
//convert data to byte array
Byte[] encryptedDataBytes = System.Convert.FromBase64String(sourceData);
//get source memory stream and fill it
MemoryStream tempStream = new MemoryStream(encryptedDataBytes, , encryptedDataBytes.Length);
//get decryptor and decryption stream
DESCryptoServiceProvider decryptor = new DESCryptoServiceProvider();
CryptoStream decryptionStream = new CryptoStream(tempStream, decryptor.CreateDecryptor(keys, iv), CryptoStreamMode.Read); //decrypt data
StreamReader allDataReader = new StreamReader(decryptionStream); return allDataReader.ReadToEnd();
}
catch (Exception ex)
{
throw (ex);
}
}
#endregion #region 解密,固定密钥
/// <summary>
/// 解密
/// </summary>
/// <param name="sourceData">密文</param>
/// <param name="key">密钥,8位数字,字符串方式</param>
/// <returns></returns>
public static string Decrypt(string sourceData, string key)
{
//set key and initialization vector values
//Byte[] key = new byte[] {0x21, 2, 0x88, 4, 5, 0x56, 7, 0x99};
//Byte[] iv = new byte[] {0x21, 2, 0x88, 4, 5, 0x56, 7, 0x99}; #region 检查密钥是否符合规定
if (key.Length > )
{
key = key.Substring(, );
}
#endregion char[] tmp = key.ToCharArray();
Byte[] keys = new byte[];
//Byte[] keys = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 };
Byte[] iv = new byte[] { , , , , , , , }; //设置密钥
for (int i = ; i < ; i++)
{
if (tmp.Length > i)
{
keys = (byte)tmp;
}
else
{
keys = (byte)i;
}
} try
{
//convert data to byte array
Byte[] encryptedDataBytes = System.Convert.FromBase64String(sourceData);
//get source memory stream and fill it
MemoryStream tempStream = new MemoryStream(encryptedDataBytes, , encryptedDataBytes.Length);
//get decryptor and decryption stream
DESCryptoServiceProvider decryptor = new DESCryptoServiceProvider();
CryptoStream decryptionStream = new CryptoStream(tempStream, decryptor.CreateDecryptor(keys, iv), CryptoStreamMode.Read); //decrypt data
StreamReader allDataReader = new StreamReader(decryptionStream); return allDataReader.ReadToEnd();
}
catch (Exception ex)
{
throw (ex);
}
}
#endregion /// <summary>
/// 对需要加密的字串进行MD5加密(针对密码加密)
/// </summary>
/// <param name="ConvertString">需要加密的字串</param>
/// <returns>加密后的字串</returns>
/// <remarks>
/// Modifier: Xiaoliang Ge
/// Modified Date: 2009-12-26
/// </remarks>
public static string MD5EncryptStr(string ConvertString)
{
MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
string t2 = BitConverter.ToString(md5.ComputeHash(UTF8Encoding.Default.GetBytes(ConvertString)),
, );
return t2;
}
} #endregion }

[功能帮助类] 最新的Functions 类 (转载)的更多相关文章

  1. asp.net(C#)实现功能强大的时间日期处理类完整实例

    作者:smartsmile2012 字体:[增加 减小] 类型:转载 时间:2016-06-30我要评论 这篇文章主要介绍了asp.net(C#)实现功能强大的时间日期处理类,封装了针对日期与时间的各 ...

  2. CSerialPort串口类最新修正版(解决关闭死锁问题)

    这是一份优秀的类文件,好多的地方值得我们学习,具体在多线程,事件,自定义消息,类的封装方面等等.Remon提供的串口类网址为:http://codeguru.earthweb.com/network/ ...

  3. CSerialPort串口类最新修正版(解决关闭死锁问题)2014-01-11

    这是一份优秀的类文件,好多的地方值得我们学习,具体在多线程,事件,自定义消息,类的封装方面等等.Remon提供的串口类网址为:http://codeguru.earthweb.com/network/ ...

  4. 简单练习题2编写Java应用程序。首先定义一个描述银行账户的Account类,包括成员变 量“账号”和“存款余额”,成员方法有“存款”、“取款”和“余额查询”。其次, 编写一个主类,在主类中测试Account类的功能

    编写Java应用程序.首先定义一个描述银行账户的Account类,包括成员变 量“账号”和“存款余额”,成员方法有“存款”.“取款”和“余额查询”.其次, 编写一个主类,在主类中测试Account类的 ...

  5. 最新的SqlHelper 类

    最新的SqlHelper 类 摘自:http://www.cnblogs.com/sufei/archive/2010/01/14/1648026.html using System; using S ...

  6. 将封装了envi功能的IDL类导出成java类,方便java调用

    目的:     用IDL将ENVI的功能封装成为IDL的类,并使用IDL的对象导出功能把这些功能类导出为java类,方便java调用.(本来想直接通过GP工具调用的,但是没有授权文件)   操作步骤: ...

  7. Java JVM 类的连接与初始化 [ 转载 ]

    Java类的连接与初始化 (及2013阿里初始化笔试题解析)  转自http://www.cnblogs.com/iceAeterNa/p/4876747.html         Java虚拟机通过 ...

  8. Discuz!数据库操作DB类和C::t类介绍

    类定义文件 DB类: 文件\source\class\class_core.php class DB extends discuz_database {} discuz_database类定义 文件\ ...

  9. ADO.NET基础巩固-----连接类和非连接类

          最近的一段时间自己的状态还是不错的,早上,跑步,上自习看书,下午宿舍里面编程实战,晚上要么练习代码,要么去打球(在不打就没机会了),生活还是挺丰富的. 关于C#的基础回顾就先到前面哪里,这 ...

随机推荐

  1. XtraForm中更换皮肤

    前提: 默认皮肤的显示http://www.cnblogs.com/chucklu/p/4785572.html 1.修改XtraForm的LookAndFeel的SkinName属性,设置为Cara ...

  2. USACO3.44Raucous Rockers

    USACO挂了一小时..我坚持不懈的等..终于打开了  把3章最后一题交了 可以安心的睡去了 之前题意没看清楚 不知道要有序 写了一状压 结果TLE了 再优化也TLE 后来想写状态转移时发现 它必须有 ...

  3. 解决ASP.NET MVC AllowAnonymous属性无效导致无法匿名访问控制器的问题

    在ASP.NET MVC项目中,一般都要使用身份验证和权限控制,但总有部分网页是可以匿名访问的.使用AllowAnonymous属性就可以指定需要匿名访问的控制器,从而跳过身份验证. 但是今天却遇到一 ...

  4. IE浏览器Ajax缓存问题小结

    IE浏览器Ajax缓存问题 在IE下使用ajax的get方法向后台请求数据时,如果请求URL与之前完全一样,则根本不想后台获取,直接返回上一次请求缓存的数据(在缓存过期之前,针对相同地址发起的多个Aj ...

  5. asp.net Post Get提交数据转Model实例

    转自:http://blog.csdn.net/daodaowolf/article/details/8990694 此功能是将客户端HTTP协议POST GET方式提交的数据转换为某个Model实例 ...

  6. T-SQL查询进阶--详解公用表表达式(CTE)

    简介 对于SELECT查询语句来说,通常情况下,为了使T-SQL代码更加简洁和可读,在一个查询中引用另外的结果集都是通过视图而不是子查询来进行分解的. 但是,视图是作为系统对象存在数据库中,那对于结果 ...

  7. Design T-Shirt

    Design T-Shirt Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)To ...

  8. AutoItLibrary

    问题: [ ERROR ] Error in file 'E:\test\test_AutoItLibrary.txt': Initializing test library 'AutoItLibra ...

  9. Unity3d 模拟视锥的实现

    一个独立游戏 Teleglitch 使用了一种欺骗手法来模拟视锥,效果如下: 博主看了看了看提示 Actually, the line of sight shadows aren’t done wit ...

  10. Bzoj 2834: 回家的路 dijkstra,堆优化,分层图,最短路

    2834: 回家的路 Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 62  Solved: 38[Submit][Status][Discuss] D ...