b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

tcls188_c2800_x909

电脑杂谈  发布时间:2017-01-29 19:29:36  来源:网络整理

c2800_tcls188_x909

2011年我曾经对手头负责的WAP站的User_Agent分析过,通过当时的分析结果写过一些相应的处理规则。但近两年手机、手机浏览器的发展日新月异,原来的规则就慢慢的出现了不能很好兼容的情况,于是今天(2013.01.04)我又对现在WAP站的访问情况进行了分析。tcls188

借助Sqlserver等关系型可以对这些数据很好的进行分析、统计。tcls188以下是插入用户访问到的方法(我用的是Asp.net):

SqlConnection conn = new SqlConnection("server=.;database=mobile;uid=test2011;pwd=test2011;");
string sqlText = "insert into headerinfo(accept,user_agent,all_http,visit_ip) values(@accept,@user_agent,@all_http,@visit_ip)";
SqlCommand command = new SqlCommand(sqlText, conn);
command.CommandType = CommandType.Text;
try
{
	conn.Open();
	command.Parameters.Add("@accept", SqlDbType.VarChar, 8000);
	command.Parameters.Add("@user_agent", SqlDbType.VarChar, 8000);
	command.Parameters.Add("@all_http", SqlDbType.VarChar, 8000);
	command.Parameters.Add("@visit_ip", SqlDbType.VarChar, 8000);
	command.Parameters[0].Value = FormatInsertData(Request.Headers["Accept"]);
	command.Parameters[1].Value = FormatInsertData(Request.UserAgent);
	command.Parameters[2].Value = FormatInsertData(Request.ServerVariables["ALL_HTTP"]);
	command.Parameters[3].Value = IPAddress;
	command.ExecuteNonQuery();
}
catch (Exception ex)
{
}

finally
{
	if (conn.State == ConnectionState.Open)
	{
		conn.Close();
	}
}

我保存了几分钟内的数据,总共有14899条,下面是我借助SqlServer查询分析器得到的分析结果。

-----------------------------------------------

select count(*) from headerinfo

14899 总共条数

--------------------------------------------

SELECT COUNT(*) AS Expr1

FROM headerinfo


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/shouji/article-29427-1.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    • 杨月鹏
      杨月鹏

      #给烊烊520#1128生日评论

    热点图片
    拼命载入中...