摘要: $max = strtotime(date("Y-m-d"));$interval=60*60*25*2;header ("Last-Modified: " . gmdate ('r', $max));header ("Expires: " . gmdate ("r", ($max + $interval)));header ("Cache-Control: max-age=$int... 阅读全文
posted @ 2012-12-26 10:48 张保维 阅读(108) 评论(0) 推荐(0) 编辑
摘要: DWZ 中 服务器端响应 Ajax表单提交后服务器端需要返回以下json代码: { "statusCode":"200", "message":"操作成功", "navTabId":"", "rel":"", "callbackType":"closeCurrent", "forwardUrl":"... 阅读全文
posted @ 2012-12-25 18:25 张保维 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 我们既要使用 EF 生成的Model,然而我们又不想在 UI 层上使用 DbContext,所以我们在生成 EF Entity 的时候 将 Entity Container 访问设置 为 internal , 这样就可以将 context进行隐藏, 如果使用 Code First 的时候 ,我们就将 context.tt 中的 public clas... 阅读全文
posted @ 2012-12-25 11:31 张保维 阅读(419) 评论(0) 推荐(0) 编辑
摘要: <add name="MVCWebContext" connectionString="Data Source=(localdb)\v11.0; Initial Catalog=MVCWebContext-20121224135911; Integrated Security=True; MultipleActiveResultSets=True; AttachDbFilename=|DataDi... 阅读全文
posted @ 2012-12-25 11:15 张保维 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 要取得 Conext 中相关的表的信息, 然后在 ContextManger中管理多个 context ,通过 IRespontry《Entity》根据 类型再自动选择 Conext, 从网上看到一个这样的方法:var entities = (context as IObjectContextAdapter).ObjectContext.MetadataWorkspace.GetItems<E... 阅读全文
posted @ 2012-12-22 15:35 张保维 阅读(1813) 评论(0) 推荐(0) 编辑
摘要: WEB API会根据请求的HTTP头自动判断返回是 JSON还是XML,如果同时都支持的情况下,会优先返回 JSON, 这证明MS也对XML的一种态度吧。 public class YourApplication : System.Web.HttpApplication { protected void Application_Start() { ... 阅读全文
posted @ 2012-12-19 16:24 张保维 阅读(248) 评论(0) 推荐(0) 编辑
摘要: "C:/Program Files/Internet Explorer/iexplore.exe" -k "http://www.google.com" 阅读全文
posted @ 2012-12-19 11:31 张保维 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 参考 : http://blog.csdn.net/love_se/article/details/7754274 首先是安装Go,这里有很详细的安装说明,http://code.google.com/p/golang-china/wiki/Install 或者http://golang.org/doc/install 下面我们在window下面安装,google有提供win安装包,对于新手... 阅读全文
posted @ 2012-10-27 10:27 张保维 阅读(329) 评论(0) 推荐(0) 编辑
摘要: 解决 Win8 Pl2302 下不能识别的问题. 官网上说到: “ - Windows 8 is NOT supported in HXA/XA chip versions (will show yellow mark Error Code 10).” 如果它不支持了,难道我就要再装个 2008 R2或win7 之类? 这个问题困扰了我很久很久啊. 原来在win8 RC 版中是没有问题的.... 阅读全文
posted @ 2012-10-13 10:24 张保维 阅读(2602) 评论(2) 推荐(0) 编辑
摘要: 最近用到DEDE cms ,后台登录的验证码死活不能显示了。 开始的时候,我以为是环境问题, GD2是不是出问题了。 而且,我重新安装了一个DEDE ,发现其验证码可以正常显示,由些可排除,不是环境的问题。 那就是代码的问题了,我把所有调用路径上的代码都复查了一次,没问题。 我更多的是想到的是 可能是某个 php 文件中 <?php 标记前可能有空格,或其它什么东西之类,实践证明,是没有的... 阅读全文
posted @ 2012-09-01 11:20 张保维 阅读(426) 评论(0) 推荐(0) 编辑