上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 33 下一页
摘要: 写过两篇关于LUCENE高性能GROUP BY、DISTINCT的文章,最近在研究LUCENE的过程中发现了一个名为FieldCache的东东,于是乎重新改进Lucene高性能GROUP BY、DISTINCT,发现性能有了数量级别的提升,究竟是因为啥让它有了如此之高的性能提升呢?下面我就来为大家揭开这个谜团! FieldCache是啥? 我们知道,如果对每一个文档号都用reader 读取域的值会影响速度,所以Lucene 引入了FieldCache 来进行缓存,而FieldCache 并非在存储域中读取,而是在索引域中读取,从而 不必构造Document 对象,然而要求此索引域是不分词的,有 阅读全文
posted @ 2012-04-20 15:57 ido 阅读(3163) 评论(0) 推荐(0) 编辑
摘要: public Expression<Func<Job, bool>> ToLambda() { Type type = typeof (Job); ParameterExpression parameterExpression = Expression.Parameter(type, "job"); Expression body = Expression.Equal(Expression.Property(parameterExpression, "MemberId"), Expression.Constant(MemberId 阅读全文
posted @ 2012-04-12 08:52 ido 阅读(1930) 评论(2) 推荐(0) 编辑
摘要: 原文地址:http://www.dovetailsoftware.com/blogs/kmiller/archive/2010/07/02/using-the-tika-java-library-in-your-net-application-with-ikvm?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+KevinMiller+(Kevin+Miller)Using the Tika Java Library In Your .Net Application With IKVMThis may sound 阅读全文
posted @ 2012-03-26 10:23 ido 阅读(2247) 评论(0) 推荐(0) 编辑
摘要: 常见问题:无法更改关系,因为一个或多个外键属性不可以为 null。对关系作出更改后,会将相关的外键属性设置为 null 值。如果外键不支持 null 值,则必须定义新的关系,必须向外键属性分配另一个非 null 值,或必须删除无关的对象。解决方法:例如OrderItem和Product是一对多的关系OrderItem.ProductId是关系的外键你要先删除对product的引用,比如表OrderItem里有一个到Product.Id的外键的话,需要将其设为空值对应。所以在删除之前要将OrderItem.ProductId设置为0或null 阅读全文
posted @ 2012-02-23 10:01 ido 阅读(4592) 评论(4) 推荐(0) 编辑
摘要: 对关系使用默认规则与配置In Chapter 3, you learned about convention and configuration that affect attributes of properties and the effects that these have on the database. In this chapter, the focus will be on convention and configuration that affects the relationships between classes. This includes how classes 阅读全文
posted @ 2012-02-22 17:20 ido 阅读(11432) 评论(1) 推荐(1) 编辑
摘要: Earlier this month the data team shipped the Release Candidate of EF 4.1. The most exciting feature of EF 4.1 is Code First, a new development pattern for EF which provides a really elegant and powerful code-centric way to work with data as well as an alternative to the existing Database First and M 阅读全文
posted @ 2011-12-15 16:03 ido 阅读(529) 评论(0) 推荐(0) 编辑
摘要: 在asp.net mvc进行身份验证只用在需要验证的Action或者Controller上标记一个[authorization]即可,如果用户没有登陆,此时将返回的ActionResult是HttpUnauthorizedResultCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->publicclassHttpUnauthorizedResult:ActionResult{publicoverridevoidExecuteResult(Con 阅读全文
posted @ 2011-11-22 17:29 ido 阅读(2557) 评论(0) 推荐(1) 编辑
摘要: Why compiled views?First of all I prefer VS.NET to compile the cshtml code at build time because it will notice syntax errors like on any .cs file. Syntax errors are most important when I have to do a quick check-in of all my sources to repository and I need to make sure I will not crash the next te 阅读全文
posted @ 2011-10-13 10:47 ido 阅读(573) 评论(0) 推荐(0) 编辑
摘要: http://msdn.microsoft.com/en-us/library/bb738523.aspxThis topic provides an example of how to define a transaction that coordinates making changes to objects in an object context with other external operations. For more information, see Managing Connections and Transactions. The example in this t... 阅读全文
posted @ 2011-10-11 10:39 ido 阅读(1043) 评论(0) 推荐(0) 编辑
摘要: Most of the time the Entity Framework (EF) can manage transactions for you. Every time you Add an Entity, Delete an Entity, Change an Entity, Create a Relationship or Delete a Relationship in your .NET code, these changes are remembered by the EF, and when you call SaveChanges()these are convert... 阅读全文
posted @ 2011-10-11 10:36 ido 阅读(6654) 评论(2) 推荐(1) 编辑
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 33 下一页