03 2013 档案

摘要:字符串:string s = "1,2,3,4,5,"目标:删除最后一个 ","方法:1、用的最多的是Substring,这个也是我一直用的s = s.Substring(0,s.Length - 1)2、用TrimEnd,这个东西传递的是一个字符数组 s=s.TrimEnd(',')//如果要删除"5,",则需要这么写char[] MyChar = {'5',','};s = s.TrimEnd(MyChar);//s = "1,2,3,4"3、用Removestr 阅读全文
posted @ 2013-03-28 17:46 金虹巴巴 阅读(269) 评论(0) 推荐(0) 编辑
摘要:string input = " 里面是不是汉字 ";bool bl= System.Text.RegularExpressions.Regex.IsMatch(input, @"[\u4e00-\u9fa5]+$"); 阅读全文
posted @ 2013-03-27 15:34 金虹巴巴 阅读(118) 评论(0) 推荐(0) 编辑
摘要:如果在一个 List内进行相同对象属性的过滤,用 .Contains 是能完成的。这时候需要用到List.Find(Predicatematch) 这里就是泛型委托 举例 对象 Person public class Person { private int _id; private string _name; public int ID { get{ return _id;} set{ _id = value;}} public int Name { get{ return _name;} set{ _name= value;}} public Person(int id, strin... 阅读全文
posted @ 2013-03-22 12:58 金虹巴巴 阅读(2478) 评论(0) 推荐(0) 编辑
摘要:win7的记事本的状态栏和自动换行不能同时存在,我们可以通过修改注册表来让他们共存。1.开始...运行...输入regedit.打开注册表2.找到HKEY_CURRENT_USER\Software\Microsoft\Notepad3.打开StatusBar4.本来数值数据的值是为0的,我们把它改为15.这时候状态栏显示出来了! 阅读全文
posted @ 2013-03-21 14:20 金虹巴巴 阅读(450) 评论(0) 推荐(0) 编辑
摘要:win7下强制结束进程命令 命令:tasklist 作用:显示当前正在运行的任务 命令:taskkill 作用:结束某任务 用法:同时按键windows+R ——cmd——cd c:/windows/system32——tasklist 此时将出现当前系统正在运行的任务 要终止相应的进程,就用命令taskkill, 用法: “taskkill /im 映像名称.exe /f” 其中,“/im”后面接映像名称,“/f”的意思的强制结束如想看taskkill的更多用法,可用命令“taskkill /?”进行查看 阅读全文
posted @ 2013-03-19 11:48 金虹巴巴 阅读(334) 评论(0) 推荐(0) 编辑
摘要:SQL重复记录查询 1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断 select * from people where peopleId in (select peopleId from people group by peopleId having count(peopleId) > 1)2、删除表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断,只留有rowid最小的记录 delete from people where peopleId in (select peopleId from people group by p... 阅读全文
posted @ 2013-03-18 11:12 金虹巴巴 阅读(224) 评论(0) 推荐(0) 编辑
摘要:C# winfrom定制用户控件时,有时拖到工具栏时会报错,但add进去不报错,可在控件Load事件加入如下代码,就可: if (!(this.GetService(typeof(IDesignerHost)) != null || System.ComponentModel.LicenseManager.UsageMode == System.ComponentModel.LicenseUsageMode.Designtime)) {} 阅读全文
posted @ 2013-03-15 10:45 金虹巴巴 阅读(142) 评论(0) 推荐(0) 编辑
摘要:1、 protectedvoidGridView1_RowDataBound(objectsender,GridViewRowEventArgse){//如果是绑定数据行if(e.Row.RowType==DataControlRowType.DataRow){if(e.Row.RowState==DataControlRowState.Normal||e.Row.RowState==DataControlRowState.Alternate){((LinkButton)e.Row.Cells[9].Controls[0]).Attributes.Add("onclick" 阅读全文
posted @ 2013-03-14 23:04 金虹巴巴 阅读(334) 评论(0) 推荐(0) 编辑
摘要:private void button1_Click(object sender, EventArgs e) { //点击按钮的时候只会显示一个窗体 bool opened = false; foreach (Form f1 in Application.OpenForms) { if (f1 is Form2) { opened = true; break;... 阅读全文
posted @ 2013-03-14 10:36 金虹巴巴 阅读(376) 评论(0) 推荐(0) 编辑
摘要:导出表结构:Tools-->Export User Objects -->选择要导出的表(包括Tirgger、Views等)-->均可以导出导出表数据:1、查询出对应的数据后,找到Export Query Results这个后,如下图所示:点击后选择 SQL file,然后选择好保存的路径即可....2、Tools-->Export Tables-->选择表,选择SQL Inserts-->.sql文件执行这些.sql文件时,要使用新建Command Window来执行. 阅读全文
posted @ 2013-03-11 14:42 金虹巴巴 阅读(468) 评论(0) 推荐(1) 编辑
摘要:Oracle创建删除用户、角色、表空间、导入导出、...命令总结(2012-05-06 19:23:19)[编辑][删除]转载▼标签:oracle杂谈 //创建临时表空间create temporary tablespace zfmi_temptempfile 'D:\oracle\oradata\zfmi\zfmi_temp.dbf'size 32mautoextend onnext 32m maxsize 2048mextent management local;//tempfile参数必须有//创建数据表空间create tablespace zfmiloggingdat 阅读全文
posted @ 2013-03-06 15:27 金虹巴巴 阅读(298) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示