上一页 1 2 3 4 5 6 7 8 9 ··· 28 下一页

2019年6月19日

Where是浅复制,但对象整体赋值对原对象无影响

摘要: Where、First、FirstOrDefault等都是浅复制。 如:Geom g = Geoms.Where(c => c.id == dt.Rows[i]["IDNUMBER"].ToString()).First(); 后续对g的任何修改,都会影响Geoms中的对应元素。 但是,如果直接对g 阅读全文

posted @ 2019-06-19 10:21 mol1995 阅读(165) 评论(0) 推荐(0) 编辑

2019年6月12日

从DataTable中删除不被控件支持的字段类型

摘要: DataTable dt = DB.GetDataTable(sql); //从dt中删除不被控件支持的字段类型 for (int i = 0; i < dt.Columns.Count; i++) { Type tp=dt.Columns[i].DataType; if (tp == typeof 阅读全文

posted @ 2019-06-12 15:47 mol1995 阅读(122) 评论(0) 推荐(0) 编辑

DataTable CAST 成集合后,进行自定义排序再转换回DataTable

摘要: dt = dt.Rows.Cast<DataRow>().OrderBy(r => Convert.ToInt32(r["数量"])==0?1:0).ThenBy(r=>r["表名"]).CopyToDataTable(); 阅读全文

posted @ 2019-06-12 15:01 mol1995 阅读(609) 评论(0) 推荐(0) 编辑

2019年6月11日

PDM->OOM->C#实体类生成时,对Blob类型字段的处理

摘要: pdm中的Blob字段生成OOM时,自动变成了string类型,再生成实体类时也是string 如何将oom中对应的blob字段设置为Byte[]类型,目前没找到方法, 只能通过脚本,将生成后的OOM中所有特定字段名的类型,设为Byte[]类型。(oom的类型下拉列表中没有Byte[]这个类型,但直 阅读全文

posted @ 2019-06-11 17:31 mol1995 阅读(243) 评论(0) 推荐(0) 编辑

插入blob字段的简单方法

摘要: 1. 按普通方法组织插入语句 ,f2为Blob型字段 insert into table (f1,f2,f3) values ('a',:para,'c') 2.对应每个blob型字段,OracleCommand cmd 增加一个parameter cmd.Parameters.AddWithVal 阅读全文

posted @ 2019-06-11 16:01 mol1995 阅读(1588) 评论(0) 推荐(0) 编辑

GIS

摘要: https://github.com/Turfjs/turf/tree/master/packages https://github.com/Turfjs/turf/blob/master/packages/turf-destination/index.ts //经纬度计算的算法,js方法名就是tu 阅读全文

posted @ 2019-06-11 12:06 mol1995 阅读(282) 评论(0) 推荐(0) 编辑

2019年6月10日

BLOB类型对应Long binary,CLOB对应Long characters

摘要: BLOB类型对应Long binary,CLOB对应Long characters 阅读全文

posted @ 2019-06-10 19:39 mol1995 阅读(268) 评论(0) 推荐(0) 编辑

[\s\S]*?懒惰模式特殊情形

摘要: 通常理解[\s\S]*?X (X代表任意指定字符) 表示匹配任何字符的懒惰模式,一旦遇到后面出现的X便停止匹配,但实际不是如此,会尽可能的把后面的内容也匹配进去。如: 表达式 <tr[\s\S]*?>\s*<td>[\s\S]*?</td>\s*<td>[\s\S]*?</td>\s*</tr> 本 阅读全文

posted @ 2019-06-10 14:14 mol1995 阅读(335) 评论(0) 推荐(0) 编辑

2019年6月9日

递归获取文件夹下特定文件

摘要: public void ReadFilePath(string path) { string[] dirs = Directory.GetFileSystemEntries(path);//获取文件目录和文件名 for (int i = 0; i<dirs.Length; i++) { if (Di 阅读全文

posted @ 2019-06-09 16:43 mol1995 阅读(148) 评论(0) 推荐(0) 编辑

2019年6月5日

设置标题级别

摘要: object st = wordApp.Selection.End;wordDoc.Range(ref st, ref st).set_Style(Word.WdBuiltinStyle.wdStyleHeading1); //设置标题属性只能设置整段,无法在某行局部设置标题属性,在某点设置标题,就 阅读全文

posted @ 2019-06-05 18:12 mol1995 阅读(407) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 ··· 28 下一页

导航