自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

宋同学的Solution

孔子是理想主义,荀子是现实主义

  • 博客(20)
  • 资源 (6)
  • 收藏
  • 关注

原创 C# MsChart 类似十字光标/交叉线 跟随鼠标移动功能 的优化 [问题点数:88分]

@http://bbs.csdn.net/topics/390744105搜索了很多,自己也尝试了很多,目前还没很好的解决方法,发帖求助。想实现类似CAD制图那种十字光标跟随的效果,其实MsChart是带这功能的设置ChartAre属性: _chartArea.CursorX.IsUserEnabled = true; _chartArea.CursorY.IsUserEnab

2014-03-27 16:59:32 7242 1

转载 C#处理Json数据/Json数据转为对象

From:http://www.cnblogs.com/Gun-N-Rose/archive/2012/09/28/2707053.html 下面我将通过如何用c#的DataContractSerializer将这条记录反序列化。首先你得分析这条记录的结构,然后建出与结构相符的类出来。记得加上reference:using System.Runtime.Serialization.

2014-03-27 15:21:49 1405

原创 Http服务器并发访问压力测试工具(自己方便测试而编写)新附带源码

为了方便对自己的服务器进行一个简单的并发访问测试,自己coding了一个简单的http post/get 并发请求工具环境是基于VS2010  c#  .net4框架,所以运行该exe需要设备上安装了 .net framework 4.0 才可以,安装包大约40多M 可以自己去下载一个。资源已上传到CSDN可以进行下载,免积分的,下载地址:http://download.csdn.net/detail/songqingwei1988/7102283

2014-03-26 16:19:58 10653 20

原创 C# Winform/Server 提交协议冲突 Section=ResponseStatusLine 的解决,可能是服务器引起的异常

把Http异步的操作改为同步操作后出现该异常,网上搜了一下,原因:微软没有容忍不符合RFC 822中的httpHeader必须以CRLF结束的规定的服务器响应所导致对于原因我是不明觉厉。尝试的解决方法:0.几个人都说要改webclient等来提交请求,没有改的想法1.有人说把客户端的KeepLive = false 立竿见影 尝试无效,2.看到这个帖子 http://h

2014-03-26 13:49:47 9618 4

原创 C# 计算时间差/运行耗时计算/时间计数器(非DateTime相减方法,Stopwatch类)及 与DateTime的对比测试

背景:C#写了个Http服务器,中间加一个简单的处理耗时功能,以前都是用两个Time转为标准UTC去相减得到时间差的方法,脑子记忆太差,实在记不住那么多的Time格式。今天搜到一个专门用于实现时间差的类,记录一下。using System.Diagnostics;var stopWatch = new Stopwatch();stopWatch.Start();//开始或继续某

2014-03-26 10:50:33 4279

原创 C# 生成html页面出现乱码的问题

C#服务器处理http请求,通过string方式拼接一个简单的html页面返回给客户端,如果string中有中文的话,可能会出现乱码的问题,原因是没有设置使用TF-8编码设置方式如下: StreamWriter sw = new StreamWriter(fs, Encoding.Default);

2014-03-25 15:19:53 2163

转载 C# Winform 开机自动启动

From:http://write.blog.csdn.net/postedit  /// /// 设置开机自动启用 /// private void SetAutoStart() { try { string reg

2014-03-25 13:13:08 1136

转载 C# WINFORM判断程序是否运行,且只能运行一个实例

判断程序是否已经运行,使程序只能运行一个实例有很多方法,下面记录两种,From:http://www.cnblogs.com/JuneZhang/archive/2012/03/22/2412121.html 方法1:线程互斥static class Program { private static System.Threading.Mutex mute

2014-03-23 20:57:11 903

原创 C# 实现ZIP 压缩和解压

/// /// 创建ZIP压缩文件 /// /// 压缩文件的路径 /// 用户文件名 public static void CreateZipFile(string filePath,string userName) { if (false ==File.

2014-03-23 17:44:48 3255

转载 C#开源资源大汇总

From:http://www.cnblogs.com/MaxIE/archive/2008/04/11/1148745.html 一、AOP框架        Encase 是C#编写开发的为.NET平台提供的AOP框架。Encase 独特的提供了把方面(aspects)部署到运行时代码,而其它AOP框架依赖配置文件的方式。这种部署方面(aspects)的方法帮助缺少经验的开发人员提

2014-03-23 17:42:03 1406

原创 C# 多线程模式 关闭/退出全部线程

摘要:今天使用VS调试一个Http服务器,其中使用了多个Thread来多线程处理Request,发现在调试模式下,关闭程序时,VS还处于调试模式,猜测是因为有Thread没有结束 Google 一下, 得出以下解决方法Thread.IsBackground 属性:获取或设置一个值,该值指示某个线程是否为后台线程。http://msdn.microsoft.com/zh-cn/l

2014-03-22 23:03:24 11907

原创 续:Java Tomcat 中调用.net DLL的方法 导入文件gacutil 和 regasm

gacutil        64 C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\x64                    32 C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools  Reg

2014-03-21 17:27:37 859

转载 续:Java Tomcat 中调用.net DLL的方法 -- Can't get object clsid from progid

From:http://hi.baidu.com/uniqueness/item/d71912ccc7fd130ac610b235先使用以下测试代码,判断是否时自己的dll出现问题  ActiveXComponent xl = new ActiveXComponent("Excel.Application"); Dispatch xlo = (Dispatch)(xl.g

2014-03-21 11:28:20 26320 3

原创 续:Java Tomcat 中调用.net DLL的方法 - 实际部署中遇到的一些问题解决

项目中需要使用到 jacob, 我是从网上收集到的1.17版本  包含32和64位系统. 资源下载连接如下,免积分Jacob1.17 x86&x64连接失效的话在这里 - > http://download.csdn.net/detail/songqingwei1988/7075755 Exception 1: java.lang.UnsatisfiedLinkError:

2014-03-21 11:11:58 2819

转载 C#版 代码实现 数据拟合,可用于MsChart拟合绘图等

亲测可用,用于MsChart中绘图十分便利 From: http://www.cnblogs.com/cglNet/archive/2012/08/27/2659257.html  /// ///用最小二乘法拟合二元多次曲线 ///例如y=ax+b ///其中MultiLine将返回a,b两个参数。 ///

2014-03-20 13:31:04 5942 4

转载 C#版本拉格朗日插值算法 — 用于MsChart 绘图控件进行插值算法绘图。

亲测整体可用,但是感觉结尾部分或有数据剧烈波动的地方,不是很准确。      From:http://www.cnblogs.com/technology/archive/2011/03/12/1982025.html    实际中有时需要对数据进行分析, 最近就遇到了这样一个情况: 有一系列横坐标是时间, 纵坐标是记录值的一些数据, 但横坐标却不是等距记录的. 就是说在第一分钟记录一

2014-03-20 09:23:34 3709

原创 C# 删除 或移动 文件夹及文件夹内的内容。

/// /// 复制文件夹(及文件夹下所有子文件夹和文件) /// /// 待移动的文件夹路径 /// 目标路径 public static void CopyDirectory(String sourcePath, String destinationPath) {

2014-03-19 23:46:24 1681

原创 使用C#开发ActiveX控件,封装到浏览器使用,出现找不到XXXX.dll的异常解决

背景:项目中使用C#开发一款组件,用于Tomcat+Jsp项目中,在浏览器中通过Active组件的方式调用,部分功能会出现找不到 XXX.dll的问题。 异常原因: 通过浏览器调用C# Active控件时,默认到IE浏览器的Bin目录下寻找 控件的dll文件,所以引发该异常。 解决方案: public XXXActive() {

2014-03-19 19:38:48 3232 1

转载 Java Tomcat 中调用.net DLL的方法

希望在Tomcat中调用C#开发的一个功能模块,网上大概搜了一下,先备份一下。 From:http://www.cnblogs.com/windsor/archive/2010/06/17/1759289.html  背景:  近日一个java的项目,客户要求项目中必须使用其提供的加密机制,扔给了两个.net写的DLL。网络上搜了一圈也没找到啥东西,甚至看到人扬言此事绝无可

2014-03-19 19:31:13 1358

原创 C# 设置文本框等控件只能输入 正负整数或小数

//摘要: C# 文本输入控件,通过KeyPress事件实现只能输入正负正数和小数的功能 private void Value_KeyPress(object sender, KeyPressEventArgs e) { var tb = sender as TextBox; if (null ==

2014-03-19 14:34:31 3399

Http服务器并发访问压力测试工具(修正版,免积分)

因为自己需要写一个Http服务器,不知道能接受多少并发和性能,于是自己写了一个简单的Http Post/Get并发访问测试软件。 项目是基于.Net Framework4 C#开发的,所以运行设备需事先安装该环境,也就40M,自己百度一下。 关于请求数,多说一句,是依次执行N个异步处理的HTTP请求,速度接近于并发,但不是真正的并发,如果测试服务器和本机是同一台设备,也肯定是会受到这个软件影响的。 如果那位需要源代码的话,可以免费提供,为了避免麻烦,这里只上传EXE文件了。联系地址:http://blog.csdn.net/song_qingwei

2014-03-26

jacob-1.17-x64 and -x86

从网上收集的 jacob-1.17版本,包含64和32未系统两个版本 我是用来实现在Tomcat中加载c# dll 使用。

2014-03-21

MICROSOFT FOUNDATION CLASS LIBRARY : ThreadDemo

======================================================================== MICROSOFT FOUNDATION CLASS LIBRARY : ThreadDemo ======================================================================== AppWizard has created this ThreadDemo application for you. This application not only demonstrates the basics of using the Microsoft Foundation classes but is also a starting point for writing your application. This file contains a summary of what you will find in each of the files that make up your ThreadDemo application. ThreadDemo.dsp This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally. ThreadDemo.h This is the main header file for the application. It includes other project specific headers (including Resource.h) and declares the CThreadDemoApp application class. ThreadDemo.cpp This is the main application source file that contains the application class CThreadDemoApp. ThreadDemo.rc This is a listing of all of the Microsoft Windows resources that the program uses. It includes the icons, bitmaps, and cursors that are stored in the RES subdirectory. This file can be directly edited in Microsoft Visual C++. ThreadDemo.clw This file contains information used by ClassWizard to edit existing classes or add new classes. ClassWizard also uses this file to store information needed to create and edit message maps and dialog data maps and to create prototype member functions. res\ThreadDemo.ico This is an icon file, which is used as the application's icon. This icon is included by the main resource file ThreadDemo.rc. res\ThreadDemo.rc2 This file contains resources that are not edited by Microsoft Visual C++. You should place all resources not editable by the resource editor in this file. ///////////////////////////////////////////////////////////////////////////// AppWizard creates one dialog class: ThreadDemoDlg.h, ThreadDemoDlg.cpp - the dialog These files contain your CThreadDemoDlg class. This class defines the behavior of your application's main dialog. The dialog's template is in ThreadDemo.rc, which can be edited in Microsoft Visual C++. ///////////////////////////////////////////////////////////////////////////// Other standard files: StdAfx.h, StdAfx.cpp These files are used to build a precompiled header (PCH) file named ThreadDemo.pch and a precompiled types file named StdAfx.obj. Resource.h This is the standard header file, which defines new resource IDs. Microsoft Visual C++ reads and updates this file. ///////////////////////////////////////////////////////////////////////////// Other notes: AppWizard uses "TODO:" to indicate parts of the source code you should add to or customize. If your application uses MFC in a shared DLL, and your application is in a language other than the operating system's current language, you will need to copy the corresponding localized resources MFC42XXX.DLL from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. For example, MFC42DEU.DLL contains resources translated to German.) If you don't do this, some of the UI elements of your application will remain in the language of the operating system. /////////////////////////////////////////////////////////////////////////////

2012-07-25

基于MFC实现的远程视频监控系统源代码.rar

基于MFC实现的远程视频监控系统源代码 程序运行在Windows 98/2000/XP/2003平台下,可在VC++ 6.0或.NET中调试。调试前请先安装Microsoft DirectX 9.0 SDK。

2012-04-19

VC++ 6.0编程助手

RT 亲测可用,免费下载 需要的自便

2012-04-17

学习VC MFC开发必须了解的常用宏和指令

1、#include指令 包含指定的文件 2、#define指令 预定义,通常用它来定义常量(包括无参量与带参量),以及用来实现那些“表面似和善、背后一长串”的宏,它本身并不在编译过程中进行,而是在这之前(预处理过程)就已经完成了 3、#typedef指令 常用来定义一个标识符及关键字的别名它是语言编译过程的一部分,但它并不实际分配内存空间。 4、#ifndef #else #endif指令 条件编译。一般情况下,源程序中所有的行都参加编译。但是有时希望对其中一部分内容只在满足一定条件才进行编译,也就是对一部分内容指定编译的条件,这就是“条件编译”。有时,希望当满足某条件时对一组语句进行编译,而当条件不满足时则编译另一组语句。 条件编译命令最常见的形式为: #ifdef 标识符 程序段1 #else 程序段2 #endif 它的作用是:当标识符已经被定义过(一般是用#define命令定义),则对程序段1进行编译,否则编译程序段2。

2012-04-17

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除