上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页
摘要: 缓存是用来提高应用性能,降低服务器压力。适用于数据不易变,数据易通用的情景, 对于动态查询数据,例如数据分析,最好放弃使用缓存。使用缓存最麻烦的就是保持源数据和缓存的中的数据一致。 缓存(Cache)依赖,就是缓存是否更新依赖于其它Object。.net的缓存依赖主要用到的类就是CacheDepen 阅读全文
posted @ 2016-12-01 13:51 深南大道 阅读(276) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Configuration;using Syst... 阅读全文
posted @ 2016-12-01 11:59 深南大道 阅读(542) 评论(0) 推荐(0)
摘要: Index jquery-validate表单校验验证 用户名: ... 阅读全文
posted @ 2016-11-30 14:41 深南大道 阅读(260) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Sample2 { class Program { static void Main(string[] args)... 阅读全文
posted @ 2016-11-28 20:19 深南大道 阅读(618) 评论(0) 推荐(1)
摘要: Jquery实现数据双向绑定(赋值和取值) jquery数据双向绑定 姓名 ... 阅读全文
posted @ 2016-11-25 16:46 深南大道 阅读(521) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Aliyun.OTS; using Aliyun.OTS.DataModel; using Aliyun.OTS.Request; using Aliyun... 阅读全文
posted @ 2016-11-24 15:19 深南大道 阅读(420) 评论(0) 推荐(0)
摘要: //jquery.datagrid 扩展加载数据Loading效果 (function (){ $.extend($.fn.datagrid.methods, { //显示遮罩 loading: function(jq){ return j... 阅读全文
posted @ 2016-11-22 11:50 深南大道 阅读(3559) 评论(0) 推荐(0)
摘要: 一.WITH AS的含义 WITH AS短语,也叫做子查询部分(subquery factoring),可以让你做很多事情,定义一个SQL片断,该SQL片断会 被整个SQL语句所用到。有的时候,是为了让SQL语句的可读性更高些,也有可能是在UNION ALL的不同部分,作为提供数 据的部分。 特别对于UNION ALL比较有用。因为UNION ALL的每个部分可能相同,但是如果每个部分... 阅读全文
posted @ 2016-11-21 16:32 深南大道 阅读(489) 评论(0) 推荐(0)
摘要: /*带输入输出参数存储过程*/ ALTER PROCEDURE pro_test2 @userID INT, @maxUserID INT OUTPUT, @countUser INT OUTPUT AS BEGIN SELECT * FROM dbo.SY_ADMIN WHERE UserID=@userID --10075 SELECT @maxUser... 阅读全文
posted @ 2016-11-21 14:34 深南大道 阅读(346) 评论(0) 推荐(0)
摘要: EasyUI ComboTree示例 using System; using System.Web; using System.Collections.Generic; using Newtonsoft.Js... 阅读全文
posted @ 2016-11-19 16:54 深南大道 阅读(306) 评论(0) 推荐(0)
摘要: /// /// 反射得到实体类的字段名称和值 /// var dict = GetProperties(model); /// /// 实体类 /// 实例化 /// public static Dictionary GetProperties(T t) { var ret = new Dictionary(); if (t == null) { return null; } Prop... 阅读全文
posted @ 2016-11-18 15:54 深南大道 阅读(437) 评论(0) 推荐(0)
摘要: EasyUI DataGrid示例 编号 ... 阅读全文
posted @ 2016-11-05 17:06 深南大道 阅读(443) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Text;using System.Data;using System.Collections;using ... 阅读全文
posted @ 2016-11-03 10:31 深南大道 阅读(313) 评论(0) 推荐(0)
摘要: public class MessageQueue { #region Private Properties private const string _accessKeyId = ""; private const string _secret... 阅读全文
posted @ 2016-11-01 11:26 深南大道 阅读(332) 评论(0) 推荐(0)
摘要: @using System.Web.Optimization @using MultiPageSimpleTask.Entitys.Dtos; @model IList @{ Layout = null; ProductDto productDto = ViewBag.SingleProduct as ProductDto; } Hello World @Sc... 阅读全文
posted @ 2016-10-27 11:57 深南大道 阅读(295) 评论(0) 推荐(0)
摘要: using System; using System.Linq; using System.Web; using System.Web.Http; using System.Web.Security; namespace OtherApi.Auth { public class AuthFilterOutside : AuthorizeAttribute { /... 阅读全文
posted @ 2016-10-26 17:00 深南大道 阅读(325) 评论(0) 推荐(0)
摘要: using System; using AutoMapper; using Newtonsoft.Json; using Newtonsoft.Json.Linq; namespace ConsoleApplication1 { class Program { private const string ConnStr = "Data Source=192.168... 阅读全文
posted @ 2016-10-25 18:12 深南大道 阅读(245) 评论(0) 推荐(0)
摘要: 你是否曾经或正在为如何能够在最短的时间内完成对一个包含上千个页面的网站的修改而苦恼?那么可以看一下本文的介绍,或许能够对你有所帮助。 什么是SSI? SSI是英文Server Side Includes的缩写,翻译成中文就是服务器端包含的意思。从技术角度上说,SSI就是HTML文件中,可以通过注释行调用的命令或指针。SSI 具有强大的功能,只要使用一条简单的SSI 命令就可以实现整个网站的内容更新... 阅读全文
posted @ 2016-10-21 18:20 深南大道 阅读(563) 评论(0) 推荐(0)
摘要: /* 以下围绕Person类实现,Person类只有Name和Age两个属性 一.List排序 1.1 List提供了很多排序方法,sort(),Orderby(),OrderByDescending(). */ lstPerson = lstPerson.OrderByDescending(x=>x.Name).ToList(); //降序 lstPerson = lstPerson.Orde... 阅读全文
posted @ 2016-10-21 14:58 深南大道 阅读(404) 评论(0) 推荐(0)
摘要: //"{0}-{1}-{2}".format("xx","yy","zz") //显示xx-yy-zz String.prototype.format = function() { var result=this; if (arguments.length == 0) return null; for ( var i = 0; i < arguments.l... 阅读全文
posted @ 2016-10-19 17:51 深南大道 阅读(205) 评论(0) 推荐(0)
摘要: /// /// Winform程序退出删除运行目录 FormClosed调用 /// private void DeletExeFile() { string fileName = @"C:\remove.bat"; StreamWriter bat = new St... 阅读全文
posted @ 2016-10-14 11:11 深南大道 阅读(348) 评论(0) 推荐(0)
摘要: 现在ajax应用已经相当广泛了,有很多不错的ajax框架可供使用。ajax是一个异步请求,也主要是一种客户端的脚本行为。那么,如何在请求之前为请求添加特殊的一些头部信息呢? 下面是一个简单的例子,我用jquery编写,它的ajax函数中,有一个beforeSend方法,这个方法接受一个参数,就代表了发起异步请求的XMLHttpRequest对象,我们可以用该对象的setRequestHeader... 阅读全文
posted @ 2016-10-12 13:43 深南大道 阅读(192) 评论(0) 推荐(0)
摘要: 问题 在某域名下使用Ajax向另一个域名下的页面请求数据,会遇到跨域问题。另一个域名必须在response中添加 Access-Control-Allow-Origin 的header,才能让前者成功拿到数据。 这句话对吗?如果对,那么流程是什么样的? 跨域 怎样才能算跨域?协议,域名,端口都必须相 阅读全文
posted @ 2016-10-11 13:09 深南大道 阅读(241) 评论(0) 推荐(0)
摘要: [HttpPost] public HttpResponseMessage Upload() { string json = "{\"result\":\"true\"}"; return new HttpResponseMessage { Content = new StringContent(json, System.Text.Encoding.UTF8, "application/jso... 阅读全文
posted @ 2016-10-10 17:48 深南大道 阅读(399) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; using System.Linq; using System.Reflection; using System.Text; using System.Threading... 阅读全文
posted @ 2016-09-29 10:24 深南大道 阅读(750) 评论(0) 推荐(0)
摘要: #region 高效比对返回匹配度最高的数据 /// /// 高效比对返回匹配度最高的数据 /// /// 源数据 /// 目标数据 /// public static Lis... 阅读全文
posted @ 2016-09-23 14:27 深南大道 阅读(218) 评论(0) 推荐(0)
摘要: //LD最短编辑路径算法public static int LevenshteinDistance(string source, string target) { int cell = source.Length; int row = target.Length; if (ce... 阅读全文
posted @ 2016-09-19 17:42 深南大道 阅读(366) 评论(0) 推荐(0)
摘要: /*线程池ThreadPool类会在需要时增减池中线程的线程数,直到最大的线程数。池中的最大线程数是可配置的。在双核CPU中,默认设置为1023个工作线程和1000个I/O线程。也可以指定在创建线程池时应立即启动的最小线程数,以及线程池,中可用的最大线程数。如果有更多的作业要处理,线程池中线程的... 阅读全文
posted @ 2016-09-10 21:27 深南大道 阅读(203) 评论(0) 推荐(0)
摘要: //MVC HTML辅助类常用方法记录 (1)@Html.DisplayNameFor(model => model.Title)是显示列名, (2)@Html.DisplayFor(modelItem => item.Title)是显示列的内容 (3)@Html.ActionLink("Create New", "Create")是超链接,跳转到model中的create页面,引用的是co... 阅读全文
posted @ 2016-08-27 22:32 深南大道 阅读(235) 评论(0) 推荐(0)
摘要: 在使用MySQL数据库的时候,经常会遇到这么一个问题,就是“Can not connect to MySQL server. Too many connections”-mysql 1040错误,这是因为访问MySQL且还未释放的连接数目已经达到MySQL的上限。通常,mysql的最大连接数默认... 阅读全文
posted @ 2016-08-23 10:50 深南大道 阅读(535) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页