摘要: 数据库性能优化的基本原则就是:通过尽可能少的磁盘访问获得所需要的数据。要评价数据库的性能,需要在数据库调节前后比较其评价指标:响应时间和吞吐量之间的权衡、数据库的可用性、数据库的缓冲区命中率以及内存的使用效率,以此来衡量调节措施的效果和指导调整的方向。 索引的建立 在数据库操作中应用最广泛的是查询操作,而对查询最有效的优化是利用索引机制。一个查询在使用索引时,不用对全表的所有数据进行扫描就可以得到想要的数据。在一个基本表上最多只能建立一个聚簇索引,该表的其它索引都是二级索引,由它们只能检索到聚簇索引的键,必须再查聚簇索引才能得到实际记录。因此,这些二级索引的效率比聚簇索引要低。如果在一个连接. 阅读全文
posted @ 2012-01-02 15:56 Joe·Zhou 阅读(201) 评论(0) 推荐(0)
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading; 6 7 namespace Simple 8 { 9 internal delegate void PrintMsg();10 11 class DelegateAsync12 {13 public event PrintMsg PrintMsg;14 15 public DelegateAsync... 阅读全文
posted @ 2011-12-15 11:22 Joe·Zhou 阅读(322) 评论(0) 推荐(0)
摘要: Code 1 using System; 2 3 namespace Demo 4 { 5 class Program 6 { 7 static void Main(string[] args) 8 { 9 //实验110 Console.WriteLine("实验1,弱引用");11 Object obj = new Object();12 WeakReference wr = new WeakReference(obj);13 ... 阅读全文
posted @ 2011-12-07 14:47 Joe·Zhou 阅读(320) 评论(2) 推荐(0)
摘要: 下载 阅读全文
posted @ 2011-12-04 16:20 Joe·Zhou 阅读(173) 评论(0) 推荐(0)
摘要: HTML:<html xmlns="http://www.w3.org/1999/xhtml"><head> <title>错误警告组件</title> <link href="Styles/JExtension.css" rel="stylesheet" type="text/css" /> <script src="Scripts/jquery-1.6.min.js" type="text/javascript&qu 阅读全文
posted @ 2011-11-03 18:02 Joe·Zhou 阅读(401) 评论(0) 推荐(0)
摘要: 效果图: 阅读全文
posted @ 2011-10-25 15:02 Joe·Zhou 阅读(971) 评论(2) 推荐(0)
摘要: /******************************************************CreateBy:joe zhou *CreateDate:2011-10-18 *Description:装饰器模式实现的拦截器*****************************************************/using System;namespace T4Mvp{ /// <summary> /// 组件接口 /// </summary> public interface IComponent { /// <... 阅读全文
posted @ 2011-10-18 10:22 Joe·Zhou 阅读(558) 评论(0) 推荐(0)
摘要: /*****************************************************CreateBy:joe zhou*CreateDate:2011-9-20*Description:数组统计函数****************************************************/$.extend({ max: function (arr) { return cacl(arr, function (item, max) { if (!(max > item)) { return... 阅读全文
posted @ 2011-09-21 09:37 Joe·Zhou 阅读(838) 评论(1) 推荐(0)
摘要: 你值得拥有!!! 阅读全文
posted @ 2011-09-13 09:01 Joe·Zhou 阅读(553) 评论(0) 推荐(1)
摘要: 1 /**************************************************** 2 *CreateBy:joe zhou 3 *CreateDate:2011-9-4 4 *Description:字符串辅助函数 5 ****************************************************/ 6 //String.prototype = { 7 // caption: function () { 8 9 // },10 // leftPad: function (padChar, width) {11 // ... 阅读全文
posted @ 2011-09-08 08:58 Joe·Zhou 阅读(348) 评论(0) 推荐(0)
摘要: 网上看了一些关于整数的正则表达式都不如人意,最大的毛病在于他们不能验证'023'这样的数字的正确性,还有些是不能正确校验负数,我想比较正确的写法应该是这样子的:exp=/^-?([1-9]+\d*|[0])$/; 阅读全文
posted @ 2011-08-09 09:25 Joe·Zhou 阅读(285) 评论(0) 推荐(0)
摘要: Entity:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Runtime.Serialization;namespace Entity{ [DataContract] public class User { [DataMember] public string Name { get; set; } [DataMember... 阅读全文
posted @ 2011-08-04 16:27 Joe·Zhou 阅读(3445) 评论(5) 推荐(1)
摘要: 方法1:str==""方法2:str==string.Empty方法3:str.Length==0方法4:string.IsNullOrEmpty(str)方法3效率最高,原因数字的比较速度最快!!!Reflector查看源码结果: 阅读全文
posted @ 2011-06-25 16:26 Joe·Zhou 阅读(528) 评论(3) 推荐(0)
摘要: 刚刚发现了一款超级好的xml相关的编辑工具Liquid XML Studio,带图形编辑界面,非常好用,特别是在编辑xsd和xslt的时候. XSD Code 1 <?xml version="1.0" encoding="utf-8" ?>2 <!--Created with Liquid XML Studio Developer Edition 9.0.11.3078 (http://www.liquid-technologies.com)-->3 <xs:schema elementFormDefault=" 阅读全文
posted @ 2011-05-23 09:07 Joe·Zhou 阅读(2435) 评论(0) 推荐(0)
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.IO; 4 using System.IO.Compression; 5 using System.Linq; 6 using System.Text; 7 using System.Runtime.Serialization.Formatters.Binary; 8 9 namespace Kingge.Mini.Network10 {11 /// <summary>12 /// 压缩工具类,可以用于减小流量,提升传输效率13 /// </s 阅读全文
posted @ 2011-05-09 10:13 Joe·Zhou 阅读(1739) 评论(0) 推荐(0)
摘要: 样式样式非常有用,它就像是html中的CSS.如果你要将某一样式应用到某一类型元素实例,那么你应该只设置Style的TargetType属性而不设置Key属性(同时设置将不产生作用).Code 1 <Window.Resources> 2 <Style TargetType="Rectangle"> 3 <Setter Property="Fill"> 4 <Setter.Value> 5 <SolidColorBrush Color="Yellow"></SolidC 阅读全文
posted @ 2011-05-04 16:50 Joe·Zhou 阅读(622) 评论(0) 推荐(1)
摘要: 概述在WPF中资源分为两类:静态资源和动态资源,分别可以使用StaticResource和DynamicResource标记进行引用.静态资源不会基于运行时重新求值,你可以根据需要避免大量不必要的动态资源来提高性能.动态资源适用于在运行时才能确定的情况.静态资源:静态资源的查找通过设定属性元素定义的资源字典中查找所请求的键,然后查找过程向上遍历逻辑树,直到到达父元素及其资源字典为止.此行为在到达根元素之前将一直持续.接下来会检查Application对象中定义的资源字典中的资源.根据这个原理,如果你使用静态资源的引用,必须合理的设计资源字典的结构.找不到资源时会发生异常.动态资源:动态资源的查 阅读全文
posted @ 2011-05-03 13:52 Joe·Zhou 阅读(420) 评论(0) 推荐(1)
摘要: SolidColorBrush:单色画刷主要用于设置Fill和BackGroundColor,属性Color用于设置颜色,Opacity用于设置透明度.View Code 1 <Ellipse Height="100" HorizontalAlignment="Left" Margin="39,97,0,0" Name="ellipse2" Stroke="Black" VerticalAlignment="Top" Width="200"> 阅读全文
posted @ 2011-04-26 17:14 Joe·Zhou 阅读(705) 评论(0) 推荐(0)
摘要: StackPanelstackPanel是一种以堆叠方式放置控件的布局方式.Orientation属性有Vertical和Horizontial两种方式可以选择,Vertical表示纵向布局,Horizontial表示横向布局.HorizontalAlignment属性用来调整拓展方向.默认是strentch,即横向延伸.横向占满,除此之外还有Left,Center,Right,这是按照最小占位符分别位于横向的三个位置.相应的有VerticalAlignment属性,与之类似.View Code 1 <StackPanel Orientation="Vertical" 阅读全文
posted @ 2011-04-23 16:58 Joe·Zhou 阅读(1665) 评论(0) 推荐(2)
摘要: 创建类 : usingSystem; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingSystem.ServiceModel.Description; usingSystem.Xml; usingSystem.Runtime.Serialization; namespaceKingge.Mini.Network { publicclassNetDataContractSerializerOperationBehavior:DataContractSerializerOperationBehavi 阅读全文
posted @ 2011-03-14 12:31 Joe·Zhou 阅读(898) 评论(0) 推荐(1)