分类目录

链接

2024 年 4 月
1234567
891011121314
15161718192021
22232425262728
2930  

近期文章

热门标签

新人福利,免费薅羊毛

lucene.net demo

  Lucene.net是Lucene的.net移植版本,是一个开源的全文检索引擎开发包,即它不是一个完整的全文检索引擎,而是一个全文检索引擎的架构,提供了完整的查询引擎和索引引擎。 开发人员可以基于Lucene.net实现全文检索的功能。 Lucene.net是Apache软件基金会赞助的开源项目,基于Apache License协议。 Lucene.net并不是一个爬行搜索引擎,也不会自动地索引内容。我们得先将要索引的文档中的文本抽取出来,然后再将其加到Lucene.net索引中。标准的步骤是先初始化一个Analyzer、打开一个IndexWriter、然后再将文档...

.NET 暂无评论 阅读(446)

自己写的一个英汉互翻译的词典,附源码

支持: 1.英汉互翻译 2.历史记录 3.句子翻译 4.CTRL+F 自动呼出   先上图:     关键源代码(很简单):     private void FrmTranslation_Load(object sender, EventArgs e)         {             this.txtWord.Focus();             this.txtWord.Select();         }           void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)         {             this.txtResult.Text = Result;         }           void bw_DoWork(object sender, DoWorkEventArgs e)   ...

.NET 暂无评论 阅读(533)

asp.net mvc auth2.0简化版——客户端

 public partial class Login : Page     {         public string client_id = "123456789";         public string getCodeUrl = "http://localhost:8080/?client_id={0}>response_type={1}>redirect_uri={2}>scope={3}>state={4}";         public string getTokenUrl = "http://localhost:8080/Auth/Token?code={0}>grant_type={1}>client_id={2}";         public string getUserUrl = "http://localhost:8080/Auth/UserInfo?token={0}";         protected void Page_Load(object sende...

.NET 暂无评论 阅读(454)

asp.net mvc auth2.0简化版——服务端

 public class AuthController : Controller     {         private static readonly List<string> client_id_list = new List<string>() { "123456789" };         private static readonly List<string> response_type_list = new List<string>() { "code" };         private static readonly List<UserInfo> user_list = new List<UserInfo>();         private static readonly List<UserCode> user_code_list = new List<UserCode>();         private s...

.NET 暂无评论 阅读(506)

ASP.NET MVC分页 demo

//servcie using System; using System.Collections.Generic; using System.Linq; using System.Web; using StaticMvc.Models;   using Webdiyer.WebControls.Mvc; namespace StaticMvc {     public class ArticleService     {         public PagedList<Article> GetPagedList(int page, int count)         {             PagedList<Article> result = GetList().ToPagedList(page, count);             result.TotalItemCount = GetList().Count();             result.CurrentPageIndex = pag...

.NET 暂无评论 阅读(505)

asp.net mvc静态化

        public class StaticFileFilterAttribute : FilterAttribute, IResultFilter     {         public void OnResultExecuted(ResultExecutedContext filterContext)         {             filterContext.HttpContext.Response.Filter = new StaticFileWriteResponseFilterWrapper(filterContext.HttpContext.Response.Filter, filterContext);         }           public void OnResultExecuting(ResultExecutingContext filterContext)         {           }           class Sta...

.NET 暂无评论 阅读(411)

数据库 面试记录(面试题)

1.面像对像三大特性是什么?什么是多态?多态我有什么优缺点? 三大特性是:封装,继承,多态 所谓封装,也就是把客观事物封装成抽象的类,并且类可以把自己的数据和方法只让可信的类或者对象操作,对不可信的进行信息隐藏。封装是面向对象的特征之一,是对象和类概念的主要特性。 简单的说,一个类就是一个封装了数据以及操作这些数据的代码的逻辑实体。在一个对象内部,某些代码或某些数据可以是私有的,不能被外界访问。通过这种方式,对象对内部数据提供了不同级别的保护,以防止程序中无关的部分意外的改变或错...

.NET, Access, MySQL, NoSQL, Oracle, SQL Server, SQLite 暂无评论 阅读(629)

linq左连接

linq左连接 linq join默认是Inner join,如果要使用Left join的话,需要使用Into 关键词,会生成left join 的SQL DataClasses1DataContext db = new DataClasses1DataContext(); var leftJoinSql = from student in db.Student join book in db.Book on student.ID equals book.StudentID into temp from tt in temp.DefaultIfEmpty() select new { sname= student.Name, bname = tt==null??""//这里主要第二个集合有可能为空。需要判断 };   如果使用 lambda表达式来实现Left Join和Join的方法如下: ...

.NET 暂无评论 阅读(434)

搜索利器Solr

搜索利器Solr        分库分表后的关联查询,大段文本的模糊查询,这些要如何实现呢?显然传统的数据库没有很好的解决办法,这时可以借助专业的检索工具。全文检索工具Solr不仅简单易用性能好,而且支持海量数据高并发,只需实现系统两边数据的准实时或定时同步即可。下图是Solr的工作原理。

.NET 暂无评论 阅读(473)

C#打开文件夹并定位到指定的文件

public void PositionFile(string sFileFullName)        {            if (!System.IO.File.Exists(sFileFullName)) return;               System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo("Explorer.exe");            //string file = @"c:/windows/notepad.exe";            psi.Arguments = " /select," + sFileFullName;            System.Diagnostics.Process.Start(psi);        }   C#打开文件夹并定位到指定的文件

.NET 暂无评论 阅读(424)