08 2012 档案

摘要:// 对Date的扩展,将 Date 转化为指定格式的String // 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符, // 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字) // 例子: // (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423 // (new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9: 阅读全文
posted @ 2012-08-25 14:15 cheng1234xiang 阅读(230) 评论(0) 推荐(0)
摘要:Its very easy to serialize an object to .NETSimply create some object, normally a custom class with some attributes.Normally you have a list of these and you want to serialize to JSON to use it from client side code.If you do the followingvar s = new System.Web.Script.Serialization.JavaScriptSeriali 阅读全文
posted @ 2012-08-16 09:06 cheng1234xiang 阅读(559) 评论(0) 推荐(0)
摘要:URL重写通常的URL里面含有index.php,为了达到更好的SEO效果可能需要去掉URL里面的index.php ,通过URL重写的方式可以达到这种效果,通常需要服务器开启URL_REWRITE模块才能支持。下面是Apache的配置过程,可以参考下:1、httpd.conf配置文件中加载了mod_rewrite.so模块2、AllowOverride None 将None改为 All3、确保URL_MODEL设置为24、把下面的内容保存为.htaccess文件放到入口文件的同级目录下<IfModulemod_rewrite.c>RewriteEngineonRewriteCon 阅读全文
posted @ 2012-08-15 14:10 cheng1234xiang 阅读(1020) 评论(0) 推荐(0)
摘要:[转]不要告诉我你懂margin(标题好嚣张啊)练习发表于 2011-6-22 分类表现|7条评论你真的了解margin吗?你知道margin有什么特性吗?你知道什么是垂直外边距合并?margin在块元素、内联元素中的区别?什么时候该用 padding而不是margin?你知道负margin吗?你知道负margin在实际工作中的用途吗?常见的浏览器下margin出现的bug有哪些?……写css,你少不了与margin打交道,而对于这个平时我们最常用的css属性我们并非十分了解。介于此我打算写下这篇文章,一来是自己工作中的总结,也是对自己知识的一次梳理。Margin是什么CSS 边距属性定义元素 阅读全文
posted @ 2012-08-03 08:25 cheng1234xiang 阅读(172) 评论(0) 推荐(0)
摘要:/// <summary> /// 创建缩略图 /// </summary> /// <param name="oldFilePath">旧文件地址</param> /// <param name="newFilePath">新文件地址</param> public void CreatedImg(string oldFilePath, string newFilePath) { System.Drawing.Image originImage = System.Drawing.Im 阅读全文
posted @ 2012-08-02 23:14 cheng1234xiang 阅读(205) 评论(0) 推荐(0)