自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(28)
  • 收藏
  • 关注

转载 Mvc使用Partial View 来封装上传控件

  在Shared中创建一个uc/_upload.cshtml  这里面的主要的代码是  public class UploadContent { private UploadContent() { } public UploadContent(string name,string src,...

2018-01-30 20:21:00 101

转载 订单页过滤,sql写法

需要过滤 CREATE TABLE wx_products_attr( id INT IDENTITY PRIMARY KEY, productid INT, attrid INT, valueid INT)GOinsert into wx_products_attr(productid,attrid,valueid)va...

2018-01-26 14:13:00 119

转载 防止提交重复订单的方法

背景交代: 使用ajax来提交创建订单,需求是不能创建重复的订单使用js限制提交的频率// 设置内容为可用,但是不能继续操作$.fn.setBtnTxtEnabled = function (func) { if (!this) { throw new Error("element 不能为空"); } this.text(this.dat...

2018-01-10 17:28:00 360

转载 查询数据库所有列

select o.name as table_name,c.name as column_name,t.name as data_type,'' as column_type,c.max_length as character_maximum_length,s.text as column_default,c.is_nullable,casewhen exists(select...

2017-11-27 21:09:00 275

转载 asp.net 异常处理

protected void Application_EndRequest(object sender, EventArgs e){// 在应用程序关闭时运行的代码 HandlerError(); } private void HandlerError() { if (HttpContext.Curre...

2017-11-20 19:27:00 75

转载 8.1.thread

ThreadStateRunningStopRequestedSuspendRequestedBackgroundUnstartedStoppedWaitSleepJoinSuspendedAbortRequestedAborted基本使用构造函数是传递两种delegate,然后start(object)可以给第二种delegate传递参数使用一个类来传递参数...

2017-10-19 21:41:00 207

转载 7. DateTime,TimeSpan

DateTime 和 TimeSpan内部都是用 long来维护一个ticks 的东西,然后能力上略有区别DateTime 独立的能力有 获取当前时间,与utc相关的问题TimeSpan 独立的能力应该是重写了各种+,-的操作符,因此非常方便计算diff转载于:https://www.cnblogs.com/zhangrCsharp/p/7695587.html...

2017-10-19 21:41:00 104

转载 8.2.Task

Task.Run()StackCrawlMark stackMark=StackCrawlMark.LookForMyCaller;return Task.InternalStartNew(null,action,null,default(CancellationToken),TaskScheduler.Default,TaskCreationOptions.DenyChildAt...

2017-10-19 21:41:00 146

转载 2.3.Stack Queue

Stack 在System.dll中,Stack在mscorlib 330行但是我只考虑泛型所以需要调试System.dll在调试符号中选择添加System.dll 符号,即可进入调试,太方便了,我爱vs就这一点,我爱你ide看来以后选ide的标准要换了,唯一标准是能否方便的调试代码Stack内部同样的动态数组int _size; //控制数组中指针,他是一个索引啊,指...

2017-10-19 21:40:00 50

转载 3. LinkedList

双向循环列表1. 区分时候双向,看有没有prev 属性,有就是双向2. 区分是否循环,看head.pref 是否等于null,等于则不是循环1. 双向列表的话只是在中间都添加了prev,next.head的prev=null,last的next=null2. 循环链表是个圈,双向顺换是循环链表中的一种3. 双向循环列表是将head.prev=last,last.next...

2017-10-19 21:40:00 82

转载 5.1. ISet HashSet

ISet:ICollection4个实现类system.dll 1. SortedSet<T> 2. TreeSet<T> 3. TreeSubSetsystem.core.dll4. HashSet<T> ISet methodnew bool Add(T item);//交差并补void UnionWi...

2017-10-19 21:40:00 86

转载 5.2.ISet SortedSet

Node// 这个Node就比二叉树节点多了一个IsRed属性而已啊,有什么不同呢bool IsRed;T Item;Node Left;Node Right;ctor1. public Node(T item){ //默认创建红色节点,我们不需要手动创建黑色节点 this.Item=item; IsRed=true; ...

2017-10-19 21:40:00 71

转载 2.2. Array

Array:ICollection,IList,IStructuralComparable, IStructuralEquatable3300行,但是只是数组的基本操作并不难理解最重要的其实就是两个方法吧BinarySearch()Sort()最常用的方法时IList.this[]Copy()LengthConvertAll()方法列表0. publis stati...

2017-10-19 21:40:00 79

转载 6.1. String

public sealed class String:IComparable,ICloneable,IConvertible,IComparable,IEnumerable,IEquatable这个类才是重点,而且和 System.Text.StringBuilder,StringBuilderCache关系紧密构造函数全部都是extern定义的public extern Str...

2017-10-19 21:40:00 87

转载 4. Dictionary HashTable

struct KeyValuePair<TKey,TValue>public TKey Key{get;}public TValue Value{get;}public string ToString(){return [Key,Value]}IDictionary<TKey,TValue>:ICollection<KeyValuePair<T...

2017-10-19 21:40:00 96

转载 6.2. Encoding

Encoding:ICloneableSystem.Text abstract class Encoding:ICloneable封装了char[] 和byte[] 在不同的编码中转换的细节abstract method1. public abstract int GetByteCount(char[] chars, int index, int count); //计算...

2017-10-19 21:40:00 82

转载 2.1. List

IDisposablevoid Dispose();IEnumerator:IDisposablebool MoveNext();void Reset();object Current{get;}IEnumerator:IEumeratornew Current{get;}IEnumerableIEnumerator GetEnumerator();IEumerabl...

2017-10-19 21:36:00 75

转载 1. 基础类型

System.IComparableint CompareTo(object obj);System.IComparableint CompareTo(T obj);System.IEquatablebool Equals(T other)System.IConvertibleTypeCode GetTypeCode();bool ToBoolean(IFormatPro...

2017-10-19 21:35:00 94

转载 0.源代码代码分布情况

shunxumscorlib SystemSystem.NumericsSystem.SecuritySystem.CoreSystem.XmlSystem.ConfigurationSystem.TransactionsSysteml.ServiceModel.InternalsSMDiagnosticsSystem.DataSystem.Runtime.Ser...

2017-10-19 21:17:00 141

转载 0.2.比较接口Default

abstract class EqualityComparer:IEqualityComparer,IEqualityComparer0static volatitle EqualityComparer<T> defaultComparer;public static EqualityComparer<T> Default{get;} //调用CreateC...

2017-10-19 21:15:00 74

转载 0.1接口

我觉得我在没有调试.net 源代码之前,我都算不上一个.net 程序员IDisposablevoid Dispose();IEnumerator:IDisposablebool MoveNext();void Reset();object Current{get;}IEnumerator:IEumeratornew Current{get;}IEnumerableIE...

2017-10-19 21:13:00 228

转载 0.3.GetHashCode

遵守的原则:1. equals相等则hashcode必须相等2. hashcode相等equals不一定相等3. 哈希表的key尽量使用简单类型,否则的话怎么构造一个有效的hash函数会是一个大问题其他自定义的类一般怎么重写virtual gethashcode1. return string1.GetHashCode()^string2.GetHashCode()2. 这种...

2017-10-19 21:12:00 81

转载 面试sql题目总结

sql经典面试题group bycreate table teacher(teacher nvarchar(10),teach_day int,teach_desc nchar(1));insert into teacher values('老师1',2,'有')insert into teacher values('老师1',3,'有')insert into teache...

2017-10-19 05:22:00 174

转载 一张大图看懂Mvc启动过程

链接地址 https://www.processon.com/view/link/59e71fbbe4b09000f03ce78e总结:1. 在Global.ascx 中我们使用RouteCollection中使用MapRoute注册了自己的RouteData,这里面就引入了IRouteHandler,也就是MvcRouteHandler2. 在UrlRo...

2017-10-18 20:15:00 79

转载 NopCommerce 3. Controller 分析

1. 继承关系,3个abstract类System.Web.Mvc.Controller Nop.Web.Framework.Controllers.BaseController Nop.Admin.Controllers.BaseAdminController2. BaseController 1....

2017-10-17 23:52:00 110

转载 NopCommerce 1. NopCommerce Application_Start启动过程

这里简单介绍整个启动过程,其他具体的后续讲解从Application_Start中执行开始,一开始执行EngineContext.Initialize(false);EngineContext 是对IEngine接口的一个封装,NopEngine则实现了IEngine接口,NopEngine主要是封装了依赖注入(autofac)和AutoMapper的方法,它可以方便呢的注...

2017-10-17 13:54:00 89

转载 sublime addons backup

1.you can create a file to store you installed addons and use git to store github.comjust like that (comma seperate):AdvancedNewFile,AutoFileName,Color Highlighter,ConvertToUTF8,CSS Format,cs...

2017-04-10 12:55:00 59

转载 vs2012中使用localdb实例还原一个sql server 2008r2版本的数据库

use localdb sometime is easy than sql server ,and always use visual studio make you stupid. vs2012中还原数据库到 localdb 实例,在vs的sql server服务器中连接上(localdb)\v11.0后,打开新建查询输入一下语句:使用类似以下语句res...

2015-03-25 21:16:00 284

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除