Books Notes

敏捷开发是指将一个很大的版本尽量细分为小的功能、模块或阶段,每次做其中一部分,做完以后立即发布一个小版本给用户。

什么时候适合使用“敏捷开发”呢?我们的经验是需要两点:一、团队有三名或以上的研发工程师;二、团队内有一名合适的Scrum Master。

一、UML中的关系
如果对象X发生变化,引起另一个对象Y的变化,则成Y依赖于X,虚线箭头从X指向Y

Introduction to User Stories:
User stories are first-class citizen for Scrum and Extreme Programming (XP), A user story is a very high-level definition of a requirement,
just include enough information so that developers can estimate the time to implement it.

virtual一般用在基类中,子类中用override
1.无virtual时,编译器就确定方法的类型了。也即:无法实现多态了。
2.有vitual时,方法在运行时确定类型。可以实现多态,只要子类override基类的vitual方法。
new与virtual并没有必然的联系。从字面上看,new声明的方法是一个“新”方法,与基类完全没有关系(虽然不幸与基类的某个方法同名同参)。也即:通过向上
转型(如:基类 引用名=new 子类())得到的引用将无法看到子类中new出来的方法。所以会出现楼主第3点中的结果。


使用栈就象我们去饭馆里吃饭,只管点菜(发出申请)、付钱、和吃(使用),吃饱了就走,不必理会切菜、洗菜等准备工作和洗碗、刷锅等扫尾工作,他的好处
是快捷,但是自由度小。
使用堆就象是自己动手做喜欢吃的菜肴,比较麻烦,但是比较符合自己的口味,而且自由度大。

传递到 ref 参数的参数必须最先初始化。这与 out 不同,后者的参数在传递之前不需要显式初始化 ,out 必须在方法内部赋值
尽管 ref 和 out 在运行时的处理方式不同,但在编译时的处理方式相同。因此,如果一个方法采用 ref 参数,
而另一个方法采用 out 参数,则无法重载这两个方法
属性不是变量,因此不能作为 ref 参数传递

4.DataRow[] LabelTranslationLines = data.Select("F1='_dynamicText'");

6.<%= this.Html.PageList(this.Model.Entities.PageSize, this.Model.Entities.PageNumber, this.Model.Entities.TotalItemCount, "Index", "Report", this.Request.QueryString.ToRouteValueDictionary())%>

public static RouteValueDictionary ToRouteValueDictionary(this System.Collections.Specialized.NameValueCollection queryString)
{
//do we have anything to work with, otherwise return null
if (queryString == null) return null;

//Create our dictionary
RouteValueDictionary dic = new RouteValueDictionary();
//Populate our dictionary with all the parameters in the query string
foreach (string key in queryString.Keys)
{
dic.Add(key, queryString[key]);
}

return dic;
}


安装EntityFramework4.1.exe, 添加引用EntityFramewo.dll;

int? count;
return count ?? 0;

if(string.Equals(values["Product"],PromoCode,StringComparison.OrdinalIgnoreCase)==false) //比较连个字符串,不区分大小写

public string GetCartId(HttpContextBase context)
{
if (context.Session[CartSessionKey] == null)
{
//如果用户已经登陆,那么用户名就是购物车的标识
if (!string.IsNullOrWhiteSpace(context.User.Identity.Name))
{
context.Session[CartSessionKey] = context.User.Identity.Name;
}
else
{
// Generate a new random GUID using System.Guid class

Guid tempCartId = Guid.NewGuid();
// Send tempCartId back to client as a cookie
context.Session[CartSessionKey] = tempCartId.ToString();
}
}
return context.Session[CartSessionKey].ToString();
}

VS2008左上点击断开连接,然后还原数据库。

@Model int

System.Security.Principal.IPrincipal user=this.HttpContext.User;
if(System.Security.Principal.IPrincipal.Identity.IsAuthenticated)

在ASP.NET管线中,HttpHandler应该只有一个,而HttpModule是可选的。

1. 如果要响应一类请求,那么就选择HttpHandler。
2. 如果要修改或者检查所有请求(总之就是不生成响应结果),那就选择HttpModule。


HTML5:
var uname = localStorage.getItem("name");
document.querySelector("#name").value = uname;
localStorage.removeItem('name');

Each label 'for' attribute corresponds to the input's ID;

HTML5 placeholder inserts text in the field that is automatically cleared when the field has focus;


CSS3:
html{height:100%;} 100% height on body fixes issue with CSS gradients on the page body;
background:#5E768D;
background:-moz-linear-gradient(top,#546A7F 0%,#5E768D 20%);/*firefox*/
background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#546A7F),color-stop(20%,#5E768D));/*webkit*/

border-radius:5px; -moz-border-radius:5px;-webkit-border-radius:5px;

-moz-box-shadow:0px 1px 0px #f2f2f2;-webkit-box-shadow:0px 1px 0px #f2f2f2;

input:focus,textares:focus{}

在职考研:http://www.chinadegrees.cn/xwyyjsjyxx/zzgs/zzlkwsbm/


我们要在页面的最顶上添加一行<!DOCTYPE html>


aside 标签,它的说明是这样的:“可以表示页面的一个部分,它的内容与其周围的内容是不相关的 ,可以看作能从页面内容中分离出去”;

section 的定义是这样的:section 元素表示一个普通文档或应用区域。一个section,在上下文中,是页面的主题部分,一般有一个标题,或者还有一个脚标。


新元素布局

所有浏览器对它们“知道”的元素都有默认的设定——元素有多少留白和边距,它是显示为块还是行内元素?除非用CSS重写这些设定,不然它们就会生效。但是浏览器不知道header、nav这类元素,所以也没有默认设定。

这些元素的显示遇到了一些奇怪的问题,直到我显式的声明了:

header, footer, nav, article {display:block;}

一个事实你需要知道,在IE里(9以前的版本)给HTML5新标签添加样式是没用的。你能使用javascript里的 document.createElement('element name'). 来解决这个问题。

没有理由,你不能在页面中使用多个footer,它的描述是“footer元素是其所在部分的脚注”,当然
页面可以有多个部分。描述同样说了“footer不一定非要出现在部分的底部,虽然它经常被放置在
那里”。

当article元素互相嵌套时,里面的article元素代表的文章原则上应该与外边的文章内容相关

原文地址:https://www.cnblogs.com/cw_volcano/p/2876155.html