- 博客(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
140
转载 订单页过滤,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
156
转载 防止提交重复订单的方法
背景交代: 使用ajax来提交创建订单,需求是不能创建重复的订单使用js限制提交的频率// 设置内容为可用,但是不能继续操作$.fn.setBtnTxtEnabled = function (func) { if (!this) { throw new Error("element 不能为空"); } this.text(this.dat...
2018-01-10 17:28:00
407
转载 查询数据库所有列
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
322
转载 asp.net 异常处理
protected void Application_EndRequest(object sender, EventArgs e){// 在应用程序关闭时运行的代码 HandlerError(); } private void HandlerError() { if (HttpContext.Curre...
2017-11-20 19:27:00
108
转载 8.1.thread
ThreadStateRunningStopRequestedSuspendRequestedBackgroundUnstartedStoppedWaitSleepJoinSuspendedAbortRequestedAborted基本使用构造函数是传递两种delegate,然后start(object)可以给第二种delegate传递参数使用一个类来传递参数...
2017-10-19 21:41:00
244
转载 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
137
转载 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
168
转载 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
64
转载 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
108
转载 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
113
转载 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
93
转载 2.2. Array
Array:ICollection,IList,IStructuralComparable, IStructuralEquatable3300行,但是只是数组的基本操作并不难理解最重要的其实就是两个方法吧BinarySearch()Sort()最常用的方法时IList.this[]Copy()LengthConvertAll()方法列表0. publis stati...
2017-10-19 21:40:00
102
转载 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
126
转载 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
118
转载 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
104
转载 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
99
转载 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
126
转载 0.源代码代码分布情况
shunxumscorlib SystemSystem.NumericsSystem.SecuritySystem.CoreSystem.XmlSystem.ConfigurationSystem.TransactionsSysteml.ServiceModel.InternalsSMDiagnosticsSystem.DataSystem.Runtime.Ser...
2017-10-19 21:17:00
192
转载 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
103
转载 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
266
转载 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
104
转载 面试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
198
转载 一张大图看懂Mvc启动过程
链接地址 https://www.processon.com/view/link/59e71fbbe4b09000f03ce78e总结:1. 在Global.ascx 中我们使用RouteCollection中使用MapRoute注册了自己的RouteData,这里面就引入了IRouteHandler,也就是MvcRouteHandler2. 在UrlRo...
2017-10-18 20:15:00
94
转载 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
151
转载 NopCommerce 1. NopCommerce Application_Start启动过程
这里简单介绍整个启动过程,其他具体的后续讲解从Application_Start中执行开始,一开始执行EngineContext.Initialize(false);EngineContext 是对IEngine接口的一个封装,NopEngine则实现了IEngine接口,NopEngine主要是封装了依赖注入(autofac)和AutoMapper的方法,它可以方便呢的注...
2017-10-17 13:54:00
127
转载 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
79
转载 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
325
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人