kevin55

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

10 2013 档案

摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.IO; 6 using System.Diagnostics; 7 8 namespace CSharpIOTest 9 {10 class Program11 {12 static void Main(string[] args)13 {14 string file = @"I:\computer_in... 阅读全文
posted @ 2013-10-20 22:23 kernel_main 阅读(5970) 评论(1) 推荐(0)

摘要:1 环视基础环视只进行子表达式的匹配,不占有字符,匹配到的内容不保存到最终的匹配结果,是零宽度的。环视匹配的最终结果就是一个位置。环视的作用相当于对所在位置加了一个附加条件,只有满足这个条件,环视子表达式才能匹配成功。环视按照方向划分有顺序和逆序两种,按照是否匹配有肯定和否定两种,组合起来就有四种环视。顺序环视相当于在当前位置右侧附加一个条件,而逆序环视相当于在当前位置左侧附加一个条件。表达式说明(?onebbtwocc正则表达式:]+>这个正则的意义就是匹配除或之外的其余标签。匹配过程: 首先由字符“]+”;由“[^>]+”从位置15进行尝试匹配,可以成功匹配到“div”,控制权 阅读全文
posted @ 2013-10-17 23:27 kernel_main 阅读(11401) 评论(2) 推荐(2)

摘要:元字符描述.点匹配任何单个字符。例如正则表达式r.t匹配这些字符串:rat、rut、r t,但是不匹配root。$匹配行结束符。例如正则表达式weasel$能够匹配字符串"He's a weasel"的末尾 ,但是不能匹配字符串"They are a bunch of weasels."^匹配一行的开始。例如正则表达式^When in能够匹配字符串"When in the course of human events"的开始,但是不能匹配"What and When in the"*匹配0或多个正好在它之前 阅读全文
posted @ 2013-10-17 23:17 kernel_main 阅读(713) 评论(0) 推荐(0)

摘要:转自:http://heisetoufa.iteye.com/blog/405317设置字段名设置字段值设定单元格表示 Error图标设定当前单元格取得当前单元格内容取得当前单元格的列 Index取得当前单元格的行 Index向下一行向上一行取消 DataGridView1 为只读设置 DataGridView1 为只读设置 DataGridView1 的第2列整列单元格为只读并变色设置 DataGridView1 的第3行整行单元格为只读并变色设置 DataGridView1 的[0,0]单元格为只读并变色设置 DataGridView1 的第2列整列单元格为只读并变色设置 DataGrid 阅读全文
posted @ 2013-10-16 23:14 kernel_main 阅读(889) 评论(0) 推荐(0)

摘要:1 using System; 2 using System.Threading; 3 using System.Text; 4 using System.Threading.Tasks; 5 6 //多线程调试: 2013.10.08 7 //转自 http://www.cnblogs.com/yank/p/3227324.html 8 namespace ThreadExample 9 { 10 class SpinLockSample 11 { 12 public static void Test() 13 { 14 ... 阅读全文
posted @ 2013-10-13 23:21 kernel_main 阅读(519) 评论(0) 推荐(0)

摘要:1 using System; 2 using System.Threading; 3 4 //多线程调试: 2013.10.08 5 namespace ThreadExample 6 { 7 class App 8 { 9 public struct Data10 {11 public string Message; 12 }13 14 //将消息写入控制台15 static void ThreadMainWithParameter(object o)16 ... 阅读全文
posted @ 2013-10-08 21:52 kernel_main 阅读(468) 评论(0) 推荐(0)

摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class MathOperations { public static double MultiplyByTwo(double value) { return value * 2; } public static double Square(double value) ... 阅读全文
posted @ 2013-10-08 15:43 kernel_main 阅读(1188) 评论(0) 推荐(0)

摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;using System.Collections;namespace ConsoleApplication1{ //这是用来保存信息的数据结构,将作为参数被传递 public class SomeState { public int Cookie; public SomeState(int iCookie) { ... 阅读全文
posted @ 2013-10-03 16:29 kernel_main 阅读(266) 评论(0) 推荐(0)

摘要:1 import ConfigParser 2 3 config = ConfigParser.RawConfigParser() 4 5 # When adding sections or items, add them in the reverse order of 6 # how you want them to be displayed in the actual file. 7 # In addition, please note that using RawConfigParser's and the raw 8 # mode of ConfigParser's r 阅读全文
posted @ 2013-10-01 18:03 kernel_main 阅读(747) 评论(0) 推荐(0)