Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

数据表在不断的被插入,数据量不断增加,直接对满足条件的数据筛选,处理速度很慢。
解决方法: 表横向切割,将满足条件的数据转储到一临时表中,只对此临时表操作。因为此临时表记录数不会增加,且去除上多余的筛选,速度快上诸多。


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

解决方法:
1,优化sql语句。
2,将sql语句利用字符串构造,对于从几百个以上的数据中取出几个值来说,可以直接将值取出。
即:当使用exists或in时,若真正的数据占表中的比例小于10%,可以全部取出,构造sql语句处理。
DECLARE @Query VARCHAR(500)
SET @Query = ”
SET @Query = ‘
SELECT ISNULL(COUNT(1),0) as SalesCount, ISNULL(sum(b.Cash), 0) as Amount
FROM bdOrder a(NOLOCK)
JOIN bdAchievement b(NOLOCK)
ON a.Orderno = b.Orderno
WHERE OrderDate >=”’ + CONVERT(VARCHAR(10),@OrderDate) + ”’ ‘ + ‘ AND OrderDate < ''' + CONVERT(VARCHAR(10),Dateadd(day, 1, @OrderDate),120) + '''' + ' And OrderStatus NOT IN (''01'', ''61'',''04'',''21'',''22'')' DECLARE @DepartmentIDS VARCHAR(500) //存储小范围的数据 SET @DepartmentIDS = '' SELECT @DepartmentIDS = @DepartmentIDS + ',' + CONVERT(VARCHAR(4),pdr.SlaveDepartmentID) FROM permDepartmentRelation pdr WHERE pdr.MasterDepartment = @DepartmentID IF (@DepartmentIDS <> ”)
BEGIN
SET @DepartmentIDS = SUBSTRING(@DepartmentIDS,2,len(@DepartmentIDS))
END
SET @Query = @Query + ‘ AND b.DepartmentID IN(‘ + @DepartmentIDS + ‘)’

EXEC(@Query)

3,若利用了join,且where中有条件对这个连接表进行筛选,则可将条件直接放在join时进行筛选,以减少IO吞吐。
即:利用join时,where中的条件主要针对于主表。


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

1,找到视频的swf地址:http://player.youku.com/player.php/sid/XMTgzOTYyMzk2/v.swf
2,将地址加上partnerid: http://player.youku.com/player.php/partnerid/XNJU2/sid/XMTgzOTYyMzk2/v.swf
3,在地址栏中打开转换出的地址,
得到:http://static.youku.com/v1.0.0115/v/swf/qplayer_skin.swf?VideoIDS=XMTgzOTYyMzk2&embedid=-&isAutoPlay=true& showAd=0&partnerid=XNjU2
引用上述地址即可。


 


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58
  1. On the Webmaster Tools Home page, select the site you want.
  2. Click Diagnostics, and then click Malware.
  3. Click Request a review.
  4. 通过上述方式来让google清除掉恶意记录
  5. 暂时去掉的方法:

firefox:工具??选项??安全??取消选中“阻止已报告的攻击站点”!

chrome:选项??高级设置??取消选中“启用网上诱骗和恶意软件保护功能”!


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

1,列表错误将连接方式改为被动。
?2,Data Socket Error:Connection refused 一般是端口被防火墙拦截或端口关闭造成。,关掉客户机与服务器的防火墙,看了下网络邻居属性,发现TCP端口只允许开放了部分端口,而在与服务器连接时,服务器选任意一个端口,若此端口被不被允许,则就会报出Data Socket Error:Connection refused,解决方法:1,开端口 。 2,为ftp服务器指定限定端口连接,即:令ftp服务器使用的端口来自只被允许的端口。


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

原因:选择的字符编码与原sql数据库的字符编码不一致造成的,原数据库是什么编码,导入的时候就要选择相应的字符编码
1,创建数据库utf8。
2,打开sql文件,将编码格式统一替换为utf8.
3,在查询中运行此sql所有代码


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

发现变量是用static定义的,而这种变量是针对所有用户而言的,对A所得到的权限将会应用到B上,故将其换作ViewState存储,就避免了多个共享的情况发生。


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

1, SEO的主要功能是抓取页面、关键字以达到网站页面收录的目的,从而提高网站知名度,同时,搜索引擎在抓取页面的时候会屏蔽掉所有javascript代码,而基于Ajax技术的Web站点其中所用到的很重要的一项技术就是javascript代码, 那么Ajax载入的内容对于搜索引擎来说也就是是透明的,不可见的。

2,html 到了浏览器上之后,所有的源代码是不会改变的。但是变量确实会变化。变量改变后他的东西是在内存里,而不是修改浏览器的源代码。即若页面在客户端利用js做出的改变只是存在于内存之中,不会改动源文件。可以想一下,假如做出的变量改变可以在源文件中看到,要知道源文件是存在于电脑上的,也就是说可以用js直接改电脑上的文件,这明显是不可实现的。
用JS不可改变源文件,而ajax就是利用js的,可知ajax不能改变源文件,源文件是第一次加载时形成的。


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

?把<customErrors mode=”RemoteOnly” defaultRedirect=”GenericErrorPage.htm“> 改成<customErrors mode=”Off”/> 再运行网站看提示的具体错误, 一般是程序出问题


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

原因:用户名密码验证成功后系统通过js转到系统主页,而恰恰是js在IE中不能执行,通过在地址栏中输入:javascript:alert(‘asd’); 没有任何反应,便确认了这点,操作系统的js dll文件损坏掉了,要重新注册: regsvr32 jscript.dll regsvr32 vbscript.dll
重新注册后成功解决!


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

上看下看,系统服务都没有问题,是5分钟自动跑一次,但不规律的是有时会一直停止,不再启动。
解决方案:在系统服务程序代码中所有可能出现问题的地方加上try catch,并在抛出异常时写入日志,观察一段时间,发现是生成邮件的时候mailTo为空生成邮件实例失败造成的!!!在生成实例的时候加上mailTo为空就不产生实例的判断,问题解决!!!

生成日志的方法如下:
?

public static void WriteLog(string context)
        {
            using (StreamWriter w = File.AppendText("c:\\temp.txt"))
            {
                Log(context, w);
                w.Close();
            }

        }

        public static void Log(String logMessage, TextWriter w)
        {
            w.Write("\r\nLog Entry : ");
            w.WriteLine("{0} {1}", DateTime.Now.ToLongTimeString(),
                DateTime.Now.ToLongDateString());
            w.WriteLine("  :");
            w.WriteLine("  :{0}", logMessage);
            w.WriteLine("-------------------------------");
            // Update the underlying file.
            w.Flush();
        }


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

?1,减少表的关联:当两个关联的表数据都很大时,主表关联子表,而主表只是要子表的一、两个字段的数据,此时可将子表的这一两个字段放在主表中,以增加冗余的方式来提高速度。
2,在取数据集时,特别在分页处,一次取出所有的数据速度是不合理的,应是只取当前页要求数量的数据,待用到下一页的时候再取。即:用到再取。
3,添加索引:数据表没有主键,搜索表中的数据时,数据库引擎必须进行全表扫描,效率极其低下。若必须进行全文扫描,可考虑全文检索,创建主键时,会自动创建聚集索引树,表中的所有行会在文件系统上根据主键值进行物理排序,当查询表中任一行时,数据库首先使用聚集索引树找到对应的数据页,然后在数据页中根据主键键值找到目标行
?为下列字段加索引:
 1)搜索时经常使用到的;

  2)用于连接其它表的;

  3)用于外键字段的;

  4)高选中性的;

  5)ORDER BY子句使用到的;
4,建历史表,bdorder ,bdorderhistory, 令bdorder只保持最近几天常用的资料,定时运行job将资料转进bdorderhistory中,
在取数据时:正常时间范围内查bdorder, 之外查询bdorderhistory, 例:
IF(@Adddate >= CONVERT(VARCHAR(10), DATEADD(day, -2, GETDATE()), 20))–3天以内查询
??? BEGIN
??? ??? SELECT *
??? ??? FROM visitCustomer(NOLOCK)
??? ??? WHERE 1 = 1
??? ??? and Adddate > @Adddate and Adddate < Dateadd(day, 1, @Adddate)
??? ??? and charindex(‘nxgao.com‘, href) = 0
??? ??? and charindex(‘nxtall.com‘, href) = 0
??? ??? and charindex(‘lvshou.com‘, href) = 0
??? ??? and charindex(‘lvshou.com.cn‘, href) = 0
??? ??? and charindex(‘lvshou.hk‘, href) = 0
??? ??? and charindex(‘?adsfrompipi’, href) > 0
??? ??? ORDER BY Adddate
??? END
??? ELSE
??? BEGIN
??? ??? SELECT *
??? ??? FROM visitCustomerBak(NOLOCK)
??? ??? WHERE 1 = 1
??? ??? and Adddate > @Adddate and Adddate < Dateadd(day, 1, @Adddate)
??? ??? and charindex(‘nxgao.com‘, href) = 0
??? ??? and charindex(‘nxtall.com‘, href) = 0
??? ??? and charindex(‘lvshou.com‘, href) = 0
??? ??? and charindex(‘lvshou.com.cn‘, href) = 0
??? ??? and charindex(‘lvshou.hk‘, href) = 0
??? ??? and charindex(‘?adsfrompipi’, href) > 0
??? ??? ORDER BY Adddate
??? END

5, sql语句利用构造式,对于小范围的数据,可以直接得到结果,然后查询。???? EXEC(@Query) ?


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

多个table同样的css,tr,td都一样放在一起,但就是上下格对不齐,分析了老久才知是不同的table中存的数据不一样,造成td扩展的宽度也不尽相同,呈现出来的就是不整齐的现象
要设置:td宽度不随内容改变:<table style=”table-layout: fixed” border=”1″ width=”100%”>


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

?在代码中构造table时,tr,td,span混在一起,杂乱无章,可分开,table,tr,td单独,这样对的时候比较容易如:

?//td:订单金额
??????????????? sb.Append(“<td style=\”width:40px;\”>”);
??????????????? sb.Append(dr[“amount”].ToString());
??????????????? sb.Append(“</td>”);
–空一行
??????????????? //td:状态名称
??????????????? sb.Append(“<td style=\”width:8%;\”>”);
??????????????? sb.Append(dr[“StatusName”].ToString());
??????????????? sb.Append(“</td>”);


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

Visual Studio 工具-选项-源代码管理-插件选择-当前源代码管理插件:选择Miscroft visual SourceSafe 而不是Miscroft visual SourceSafe(Internet)即可


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

导出Excel一般是用XML构造的,出现上述的错误一般是XML出现非法结构造成的,根据错误提示,打开C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files\Content.MSO,找到错误日志,据提示右键excel文件进行XML的修改。


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

将项目所在的本机文件夹属性设置为只读即可!


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

?原因在系统中有一笔资料输入时有”<>”,这样在解析成excel时因用的是XML,”<>”为关键符号故不能解析,会错。在系统中找到这笔资料将”<>”改成”()”即可。