摘要: 将list转化为IEnumrable可通过new BsonArray(list)实现;class questionInfo { public int _id { get; set; } //试题id public List Samequestions { get; set; } public int... 阅读全文
posted @ 2015-03-01 20:13 jiang_jiang 阅读(207) 评论(0) 推荐(0) 编辑
摘要: mysql -u root -pmysql>use mysql;mysql>select 'host' from user where user='root';mysql>update user set host = '%' where user ='root';mysql>flush privil... 阅读全文
posted @ 2015-02-14 15:33 jiang_jiang 阅读(1296) 评论(0) 推荐(0) 编辑
摘要: MongoClientSettings mongoSettings = new MongoClientSettings(); TimeSpan t = new TimeSpan(100); mongoSettings.ConnectTimeout = t;... 阅读全文
posted @ 2015-01-13 21:11 jiang_jiang 阅读(567) 评论(0) 推荐(0) 编辑
摘要: mongodb中存储的结构如下:public class questionInfo { public int _id { get; set; } //试题id public List Samequestions { get; set; } //与该题分词相似的试题... 阅读全文
posted @ 2015-01-13 21:03 jiang_jiang 阅读(548) 评论(0) 推荐(0) 编辑
摘要: function getQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg)... 阅读全文
posted @ 2014-11-13 17:11 jiang_jiang 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 今天在设置p标签时,为p标签设置了以下属性:p {line-height :70px; margin-left :10px; white-space :nowrap ;width :700px; text-overflow:ellipsis;}发现死活不起作用,连width都不起作用,然后加了个... 阅读全文
posted @ 2014-11-13 15:34 jiang_jiang 阅读(4659) 评论(0) 推荐(0) 编辑
摘要: //把对象序列化为json对象public static string GetJson(T obj){ DataContractJsonSerializer json=new DataContractJsonSerializer(typeof(T)); using(MemoryStream ... 阅读全文
posted @ 2014-11-12 21:10 jiang_jiang 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 1 class ExcelHelper : IDisposable 2 { 3 private string fileName = null; //文件名 4 private IWorkbook workbook = null; 5 ... 阅读全文
posted @ 2014-11-12 20:54 jiang_jiang 阅读(296) 评论(0) 推荐(0) 编辑
摘要: public int calStrLen(string Str){ int i=0; if(Str==null) { return i; } else { foreach(char c in Str) { if(c>0x4e00&&c<=0x9fa5) ... 阅读全文
posted @ 2014-11-12 20:24 jiang_jiang 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 前端水平很差,所以呢只好从零起步,一点一点积累。 通过js给span元素赋值:$("#id").text("要显示的值"); onclick事件后的方法名是用加“()”的; 启动一个定时器,每隔一定的时间(比如1秒)执行一次方法:time=window.setInterval("times... 阅读全文
posted @ 2014-08-26 20:07 jiang_jiang 阅读(128) 评论(0) 推荐(0) 编辑