摘要: 首先做一个最简单的cookie web application,代码如下。protected void Page_Load(object sender, EventArgs e){ if (!IsPostBack) { HttpCookie cookie = Request... 阅读全文
posted @ 2014-11-09 21:09 chunyih 阅读(469) 评论(0) 推荐(0) 编辑
摘要: 在写aspx web application时,我们有时会遇到这个问题。很多情况都是由于在线安装的Package引起的。系统尝试去找某一个version的dll,但是你却更新了最新的Package,造成不兼容。解决办法就是检查web.config里如下类似的代码,并手动指定version,并安装或加... 阅读全文
posted @ 2014-10-22 00:15 chunyih 阅读(423) 评论(0) 推荐(0) 编辑
摘要: 这里需要用到jquery + css。原理是在页面加载时用javascript去动态改变一个class的高度和宽度。这样结合javascript能动态获取浏览器/页面的高度和宽度,从而使得div能动态的跟随浏览页面的大小变化而变化并且不影响高宽比。下面的代码创建一个手机页面,每一行三个图片分占33%... 阅读全文
posted @ 2014-10-19 01:22 chunyih 阅读(5484) 评论(0) 推荐(0) 编辑
摘要: 1 如何在finder终打开指定的目录方法一:打开finder按shift+command+g, 打开go to folder输入目录的路径。方法二:打开terminal,cd到指定的目录,然后输入“open .”。2 快捷键command+r: 刷新网页两个手指点击:右键菜单两个手指滑动:滑轮(... 阅读全文
posted @ 2014-10-18 00:58 chunyih 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 我们知道,OAuth2.0使用AuthCode获取AccessToken时,需要提供ResourceUrl作为参数。这个ResourceUrl表示你用这个AccessToken只能读取以ResourceUrl开头的URL资源。比如ResourceUrl = https://test.sharepoi... 阅读全文
posted @ 2014-08-08 23:46 chunyih 阅读(407) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Xml;namesp... 阅读全文
posted @ 2014-08-08 23:39 chunyih 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 这里要用到如下两个namespace:using System.Runtime.Serialization.Json;using System.Runtime.Serialization;定义Json实体类如下:[DataContract]public class TextMessage{ [... 阅读全文
posted @ 2014-07-23 00:33 chunyih 阅读(8292) 评论(0) 推荐(0) 编辑
摘要: 直接贴代码和结果。using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Xml;using System.... 阅读全文
posted @ 2014-07-21 23:29 chunyih 阅读(2279) 评论(0) 推荐(0) 编辑
摘要: List listString = new List();listString.Add("abc");listString.Add("456");listString.Add("bbb");listString.Add("iiiiiiii");var retList = listString.Whe... 阅读全文
posted @ 2014-07-21 23:27 chunyih 阅读(4740) 评论(0) 推荐(1) 编辑