随笔分类 -  C#

该文被密码保护。
posted @ 2019-07-05 16:38 Servant 阅读(2) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2019-06-11 11:18 Servant 阅读(1) 评论(0) 推荐(0)
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 using System.Web.UI; 6 using System.Web.UI.WebControls; 阅读全文
posted @ 2016-08-26 17:09 Servant 阅读(517) 评论(0) 推荐(0)
摘要:1、构造附件 static List<Attachment> BuildAttachments(List<EmailFile> files) { if (files == null || files.Count <= 0) { return null; } List<Attachment> resu 阅读全文
posted @ 2016-03-11 14:54 Servant 阅读(301) 评论(0) 推荐(0)
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Text; 4 using System.Xml.Serialization; 5 using System.IO; 6 using System.Xml; 7 ... 阅读全文
posted @ 2015-04-28 11:11 Servant 阅读(14522) 评论(0) 推荐(0)
摘要:js添加显示loading和取消loading方法 1 function showtbloading() { 2 var target = $("#GridView1"); 3 if (target.length ... 阅读全文
posted @ 2014-07-07 10:34 Servant 阅读(377) 评论(0) 推荐(0)
摘要:Aspose.Cells 导入导出EXCEL修改样式Workbook workbook = new Workbook(); //工作簿Worksheet sheet = workbook.Worksheets[0]; //工作表Cells cells = sheet.Cells;//单元格//样式2Aspose.Cells.Style style2 = workbook.Styles[workbook.Styles.Add()];//新增样式style2.HorizontalAlignment = TextAlignmentType.Center;//文字居中style2.VerticalAl 阅读全文
posted @ 2013-09-26 15:53 Servant 阅读(1086) 评论(0) 推荐(0)
摘要:1 /// 2 /// 总记录数 3 /// 每页记录数 4 /// 当前页数 5 /// Url参数 6 private string pagination(int total, int per, int page, string query_string) 7 { 8 int allpage = 0; 9 int next = 0;10 int pre = 0;11 int startcount = 0;12 int endcount = 0;13 ... 阅读全文
posted @ 2013-07-29 15:29 Servant 阅读(167) 评论(0) 推荐(0)
摘要:首先下载HtmlAgilityPack 官网:http://htmlagilitypack.codeplex.com/根据自己.net的版本引入dll实现抓取博客园首页文章列表中的标题和地址,代码如下: 1 WebClient wc = new WebClient(); 2 wc.Encoding = System.Text.Encoding.UTF8; 3 string mainData = wc.DownloadString("http://www.cnblogs.com/"); 4 HtmlD... 阅读全文
posted @ 2013-05-07 12:06 Servant 阅读(235) 评论(0) 推荐(0)
摘要:原文地址:http://www.cnblogs.com/MeteorSeed/archive/2012/12/24/2703716.html目录一Lucene.Net概述二 分词三 索引四 搜索五 实践中的问题一Lucene.Net概述 Lucene.Net是一个C#开发的开源全文索引库,其源码包括“核心”与“外围”两部分。外围部分实现辅助功能,而核心部分包括:Lucene.Net.Index 提供索引管理,词组排序。Lucene.Net.Search 提供查询相关功能。Lucene.Net.Store 支持数据存储管理,主要包括I/O操作。Lucene.Net.Util 公共类。Lucen. 阅读全文
posted @ 2013-04-19 15:20 Servant 阅读(320) 评论(0) 推荐(0)
摘要:1. 基本应用 using System;using System.Collections.Generic;using System.Text;using Lucene.Net;using Lucene.Net.Analysis;using Lucene.Net.Analysis.Standard;using Lucene.Net.Documents;using Lucene.Net.Index;using Lucene.Net.QueryParsers;using Lucene.Net.Search;using Lucene.Net.Store;using Lucene.Net.Util; 阅读全文
posted @ 2013-04-19 10:25 Servant 阅读(211) 评论(1) 推荐(1)
摘要:1 public void ProcessRequest (HttpContext context) { 2 3 string elxStr = "<table><tbody><tr><td>1</td><td>11</td></tr><tr><td>2</td><td>22</td></tr></tbody></table>"; 4 context.Response.Clear(); 阅读全文
posted @ 2013-04-18 10:29 Servant 阅读(1106) 评论(0) 推荐(0)
摘要:本文转自:http://www.cnblogs.com/peida/archive/2008/11/27/1341920.html在Lucene.net实现自定义排序,需要实现两个Lucene.Net.Search的两个接口: 1 public interface SortComparatorSource 2 { 3 ScoreDocComparator NewComparator(IndexReader reader , System.String fieldname) ; 4 } 5 6 public interface ScoreDocComparator 7 { 8 in... 阅读全文
posted @ 2013-04-17 15:51 Servant 阅读(319) 评论(0) 推荐(0)
摘要:在webconfig文件中的<system.web>节点下加入以下配置: <webServices> <protocols> <add name="HttpSoap"/> <add name="HttpPost"/> <add name="HttpGet"/> <add name="Documentation"/> </protocols> </webServices> 阅读全文
posted @ 2012-12-28 10:48 Servant 阅读(188) 评论(0) 推荐(0)
摘要:ffmpeg.exe -i F:\闪客之家\闪客之歌.mp3 -ab 56 -ar 22050 -b 500 -r 15 -s 320x240 f:\11.flvffmpeg -i F:\01.wmv -ab 56 -ar 22050 -b 500 -r 15 -s 320x240 f:\test.flv使用-ss参数 作用(time_off set the start time offset),可以从指定时间点开始转换任务。如:转换文件格式的同时抓缩微图:ffmpeg -i "test.avi" -y -f image2 -ss 8 -t 0.001 -s 350x240 阅读全文
posted @ 2012-12-25 15:27 Servant 阅读(232) 评论(0) 推荐(0)