
C#
文章平均质量分 55
吕秀才
静下心来,每一步都踏踏实实。
展开
-
C# 字符与字符串的操作
1)字符与字符串之间的关系char c = 'a'; string s = "baotiantiantian"; s = "tian";//重新赋值,而不是将s[0]="t",s[1]="i"这样的来改变。// s[2] = 'b';//在数组中是可以改的,但在这里他是字符串是不能改变的,这里的做法是错误的;转载 2012-02-20 09:35:05 · 1517 阅读 · 0 评论 -
C# 遍历文件夹
DirectoryInfo dir = new DirectoryInfo(dicPath); foreach (FileInfo f in dir.GetFiles("*.txt")) { String name = f.Name; long size = f.Length;转载 2012-12-05 16:37:16 · 479 阅读 · 0 评论 -
二分查找判断符串
private int sort_init(ref string[] chars, string str) //数组初始化 { string[] temp = str.Split(' '); //temp. chars = new string[temp.Count()]; int n原创 2012-11-06 11:40:16 · 578 阅读 · 0 评论 -
List Contains 比较器重写
public class PopupComparer : IEqualityComparer> { public static PopupComparer Default = new PopupComparer(); #region IEqualityComparer 成员 public bool Equals原创 2012-11-02 10:03:51 · 3906 阅读 · 0 评论 -
C#版 判断字符编码
public static string GetText(byte[] buff) { string strReslut = string.Empty; if (buff.Length > 3) { if (buff[0] == 239 && buff[1] == 187 && buff[2] == 191) {// utf-8 strReslut转载 2012-10-24 11:23:14 · 5581 阅读 · 0 评论 -
C# list Contains 重载
public class PopupComparer : IEqualityComparer> { public static PopupComparer Default = new PopupComparer(); #region IEqualityComparer 成员 public bool Equals原创 2012-10-29 17:15:47 · 3048 阅读 · 0 评论 -
Reverses the bytes in a file.
// indexer.cs// arguments: indexer.txtusing System;using System.IO;// Class to provide access to a large file// as if it were a byte array.public class FileByteArray{ Stream stream; /转载 2012-09-24 10:47:47 · 508 阅读 · 0 评论 -
C#List自定义排序
List word_info_pre_line = new List(); class words_info //自字义类型 { public string word = null; public double rank = 0.0; public int TF = 0; }word_info_pre_line原创 2012-09-17 13:29:58 · 1264 阅读 · 0 评论 -
C#版后缀树 最长公共串 LCS
看了一些网上的关于后缀树的文章,发现大多是C/C++版的,参照几个版本拼了一个C#版的。using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace test_file{ class fix { private void swap原创 2012-09-12 13:45:52 · 878 阅读 · 0 评论 -
WM多模式字符串匹配
using System;using System.Collections;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;namespace WMCSharp{ //++++++++++++++++++++++++++++++++原创 2012-08-23 18:05:17 · 687 阅读 · 0 评论 -
C# 链接 sql数据库
using System;using System.Collections.Generic;using System.Text;//数据库操作对象库using System.Data;using System.Data.SqlClient;using worddic;namespace testDB{ class Program {转载 2012-07-13 17:00:02 · 490 阅读 · 0 评论 -
C#链接Mysql数据库
using System;using System.Configuration;using MySql.Data.MySqlClient;/// /// TestDatebase 的摘要说明/// public class TestDatebase{ public TestDatebase() { // // TO转载 2012-07-12 16:29:29 · 997 阅读 · 0 评论 -
基于条件随机场的命名实体抽取
本文地址:http://blog.youkuaiyun.com/nocml/article/details/8496534转载请注明出处先声明,本人是菜鸟,这篇文章中的做法也是我的菜鸟做法,如果有大牛看到还请指点一二。勿喷。首先下载CRF++,这个开源工具还是很好用的,当然内存释放可能存在一些问题。下载地址:http://crfpp.googlecode.com/svn/trunk/doc/i原创 2013-01-12 17:56:41 · 3906 阅读 · 23 评论