摘要: 前端开发中自适应布局在实际应用中越来越普遍,特别是随着更多高级浏览器的出现html5和css3得到了更好的应用。 圣杯布局有个好处,完全符合前端开发中渐进增强的理念,由于浏览器解析是从DOM的上至下,这样圣杯布局可以把页面中重要的内容section放到DOM前面先解析,而次要的aside内容则放在D 阅读全文
posted @ 2017-09-25 11:50 mythp 阅读(547) 评论(0) 推荐(0) 编辑
摘要: 我们都知道,固定高宽的div在网页中垂直居中很简单,相信大家也很容易的写出来,但是不是固定高宽的div如何垂直居中呢?我们在网页布局,特别是手机等web端网页经常是不固定高宽的div,那么这些div如何垂直居中呢?这篇文章,我总结一下。 固定高宽div垂直居中 如上图,固定高宽的很简单,写法如下: 阅读全文
posted @ 2017-09-25 11:48 mythp 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 样式的优先级 多重样式(Multiple Styles):如果外部样式、内部样式和内联样式同时应用于同一个元素,就是使多重样式的情况。 一般情况下,优先级如下: (外部样式)External style sheet <(内部样式)Internal style sheet <(内联样式)Inline 阅读全文
posted @ 2017-09-25 11:48 mythp 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 身为一名小小的程序猿,在日常开发中不可以避免的要和where in和like打交道,在大多数情况下我们传的参数不多简单做下单引号、敏感字符转义之后就直接拼进了SQL,执行查询,搞定。若有一天你不可避免的需要提高SQL的查询性能,需要一次性where in 几百、上千、甚至上万条数据时,参数化查询将是 阅读全文
posted @ 2017-09-25 11:46 mythp 阅读(4087) 评论(0) 推荐(0) 编辑
摘要: public static class ChineseToPinYin { private static readonly Dictionary<<span class="keyword">int, string> CodeCollections = newDictionary<<span clas 阅读全文
posted @ 2017-09-25 11:45 mythp 阅读(288) 评论(0) 推荐(0) 编辑
摘要: /TransmitFile实现下载 protected void Button1_Click1(object sender, EventArgs e) { string strFileName = "三部闲置设备管理系统操作手册IEMS.ppt"; Response.ContentType = "a 阅读全文
posted @ 2017-09-25 11:43 mythp 阅读(497) 评论(0) 推荐(0) 编辑
摘要: 18 public static void SaveError(Exception ex,HttpContext hc,HttpRequest hr)19 {20 string temp ;21 StreamWriter sw ;2223 //如果存在文件24 if(File.Exists(hr.P 阅读全文
posted @ 2017-09-25 11:40 mythp 阅读(373) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Syste 阅读全文
posted @ 2017-09-25 11:39 mythp 阅读(1776) 评论(0) 推荐(0) 编辑
摘要: 创建数据库data_Test create database data_Test GO use data_Test GO create table tb_TestTable --创建表 ( id int identity(1,1) primary key, userName nvarchar(20) 阅读全文
posted @ 2017-09-25 11:37 mythp 阅读(299) 评论(0) 推荐(0) 编辑
摘要: // /// 类型转换类 /// 处理数据库获取字段为空的情况 /// public static class DBConvert { #region ToInt32类型转换 /// /// 读取数据库中字符串并转换成Int32 /// 为空时返回0 /// /// object类型的值 /// I 阅读全文
posted @ 2017-09-25 11:37 mythp 阅读(2805) 评论(0) 推荐(0) 编辑