老规矩,Talk is cheap, show me your code.#-*-coding:utf-8-*-from math import logdef calcShannonEnt(datsSet): #长度 numEntries = len(dataSet) #字典统计 ...
分类:
其他好文 时间:
2014-10-04 14:58:46
阅读次数:
218
1 业务需求 缓存来自数据库的数据,不用频繁到数据库中加载。2 使用模型 添加一个类 MyCache,然后在里面添加静态属性字段: public static DataTable FolderData { get { string key...
分类:
Web程序 时间:
2014-10-03 23:46:05
阅读次数:
1534
public class CommonService { #region DataReader转化 /// /// 将DataReader转化为Table /// /// /// pub...
分类:
其他好文 时间:
2014-10-03 18:25:25
阅读次数:
266
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Draw...
分类:
其他好文 时间:
2014-09-30 17:12:39
阅读次数:
165
命名空间:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using Excel....
分类:
其他好文 时间:
2014-09-30 17:04:09
阅读次数:
127
privatestringDataTableTojson(DataTabledt){List>list=newList>();foreach(DataRowrowsindt.Rows){Dictionarydict=newDictionary();foreach(DataColumncolindt....
分类:
Web程序 时间:
2014-09-29 23:15:21
阅读次数:
171
一、开工必备1、micorosoft office20072、VS2010、Oracle 11二、界面三、内部代码 (1)获取数据库连接,定义全局变量 private static string connString = System.Configuration.ConfigurationSetti...
分类:
其他好文 时间:
2014-09-29 17:25:11
阅读次数:
251
最近在做Excel导出,看到了这个方法,虽不是自己写的,但值得收藏,但是忘记从那摘抄的,没写原文作者看到望见谅! 1 #region 导出Excel 2 /// 3 /// list 转换Datatable 4 /// 5 /// 6 /// 7 public DataTable DataO...
分类:
其他好文 时间:
2014-09-29 16:49:21
阅读次数:
193
拿来的,望原创见谅!public void EXCELDown(DataTable dt, string strFileName) { Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2...
分类:
其他好文 时间:
2014-09-29 15:38:31
阅读次数:
184
(1)构造函数DataTable()不带参数初始化DataTable类的新实例。DataTable(string tableName)用指定的表名初始化DataTable类的新实例。DataTable(string tableName, string tableNamespace)用指定的表名和命名...
分类:
其他好文 时间:
2014-09-29 14:49:11
阅读次数:
179