2012年7月13日

C#调用IronPython和C方法效率差别

摘要: 平均调用时间差别一秒左右。C#调用C++代码:[DllImport("UseCPP.dll")]public static extern int Add(int x, int y);C++代码:#include "stdafx.h"extern "C" __declspec(dllexport) int Add(int x, int y) { return x + y;}IronPython:public static int CSUsePyFunc(int x, int y) { ScriptRuntime pyRT = Pytho 阅读全文

posted @ 2012-07-13 21:31 未来无限 阅读(464) 评论(0) 推荐(0) 编辑

MongoDB数据库非正常关闭无法启动问题

摘要: 查看日志文件,启动时留下如下信息:**************检测到不正常关机。请访问http://dochub.mongodb.org/core/repair恢复指令。*************07月0311点00分17秒[initandlisten]异常在initAndListen:12596旧的锁文件,终止07月0311点00分17秒dbexit:英文为:************** Unclean shutdown detected.Please visit http://dochub.mongodb.org/core/repair for recovery instructions. 阅读全文

posted @ 2012-07-13 21:15 未来无限 阅读(776) 评论(0) 推荐(0) 编辑

泛型分页

摘要: using System;using System.Collections.Generic;using System.Text;namespace PublicClass{ public class PaginationInfo<T> { /// <summary> /// 每页记录数 /// </summary> public int PageSize { get; private set; } /// <summary> /// 实际每页记录数,最后一页记录数可能少于每页记录数 /... 阅读全文

posted @ 2012-07-13 21:11 未来无限 阅读(759) 评论(0) 推荐(0) 编辑

导航