摘要: 什么是缓存? 1、并不是指计算机的内存或者CPU的缓存。 2、缓存是指为了降低应用程序对物理数据源的访问的频次,从而提高应用程序运行性能的一种策略。 为什么使用缓存? 1、程序访问数据库的效率直接影响应用程序的运行速度,提升和优化程序的执行效率至关重要。 2、缓存的使用是提升和优化代码执行效率的重要 阅读全文
posted @ 2016-01-29 16:53 可可味 阅读(196) 评论(0) 推荐(0)
摘要: /* - - - - - - - - - - - - - - - - - - - - - - - - * Stream 和 byte[] 之间的转换 * - - - - - - - - - - - - - - - - - - - - - - - */ /// <summary> /// 将 Stre 阅读全文
posted @ 2016-01-29 16:03 可可味 阅读(339) 评论(0) 推荐(0)
摘要: 邮件帮组类 using System; using System.Collections.Generic; using System.IO; using System.Net; using System.Net.Mail; using System.Net.Mime; using System.Te 阅读全文
posted @ 2016-01-29 16:00 可可味 阅读(304) 评论(0) 推荐(0)
摘要: 最近在许多论坛上看到关于了ref和out的区别,发现解释的都不非常理想。 我想抄写点官方的解释,然后再来我自己的解释//如下方法参数上的 out 方法参数关键字使方法引用传递到方法的同一个变量。当控制传递回调用方法时,在方法中对参数所做的任何更改都将反映在该变量中。 当希望方法返回多个值时,声明 o 阅读全文
posted @ 2016-01-29 15:51 可可味 阅读(127) 评论(0) 推荐(0)
摘要: 1、首先需要定义页面标签 <form id="fileUploadForm" method="post" enctype="multipart/form-data"> </form> 2、定义JQuery方法 function file_onChange(srcElement) { $("#file 阅读全文
posted @ 2016-01-29 15:49 可可味 阅读(186) 评论(0) 推荐(0)
摘要: 需要使用iTextSharp库文件 using System.Collections; using System.Collections.Generic; using System.Data; using System.IO; using System.Linq; using System.Net; 阅读全文
posted @ 2016-01-29 14:13 可可味 阅读(432) 评论(0) 推荐(0)
摘要: .net 后台生成Excel文件 //获取文件路径 string path = ConfigurationManager.AppSettings[EnumAppSettingKey.UploadFilePath.ToString()]; string msg00_sendsq = rblModel. 阅读全文
posted @ 2016-01-29 14:10 可可味 阅读(453) 评论(0) 推荐(0)
摘要: JSONP前台调用代码: 1、Jquery第一种方式: $.ajax({ "url": "http://localhost:59403/api/Login", //url自行设定 "type": "get", "timeout": 1000, "async": false, "data": { "u 阅读全文
posted @ 2016-01-29 14:04 可可味 阅读(458) 评论(0) 推荐(0)
摘要: .net MVC 自定义错误页面 阅读全文
posted @ 2016-01-29 13:55 可可味 阅读(1955) 评论(0) 推荐(0)
摘要: 在前端中,我们需要对浏览器的渲染操作做一个了解,不然的话,我们可能在做前端开发过程中会找不出错误的原因,因此 能够了解浏览器的渲染操作的顺序有助于我们对问题的排除。 页面加载网页-浏览器渲染操作的顺序 1、解析HTML结构 2、加载外部脚本和样式表文件 3、解析并执行脚本代码 4、构造HTML DO 阅读全文
posted @ 2016-01-29 13:09 可可味 阅读(200) 评论(0) 推荐(0)
摘要: 在开发中我们经常会请求一些资源,在请求的过程中会有一些状态需要我们去了解,以便找到错误的原因, 下面列举了我们常见的网页请求的状态已经引发的原因. HTTP状态码: 1XX表示请求已经成功 2XX表示请求已经接受并且已经处理 3XX表示重定向,需要更近一步的操作 4XX 表示客户端错误 5XX 表示 阅读全文
posted @ 2016-01-29 12:57 可可味 阅读(104) 评论(0) 推荐(0)