2012年10月18日
摘要: 1.设置对话框大小:1 CRect temprect(0,0,1640,1480);2 CWnd::SetWindowPos(NULL,0,0,temprect.Width(),temprect.Height(),SWP_NOZORDER|SWP_NOMOVE);2.使对话框全屏显示:1 //得到显示器大小2 int cx,cy;3 cx = GetSystemMetrics(SM_CXSCREEN);4 cy = GetSystemMetrics(SM_CYSCREEN);5 //再用MoveWindow6 CR... 阅读全文
posted @ 2012-10-18 10:17 Jiang, X. 阅读(28927) 评论(0) 推荐(0) 编辑
摘要: ①在CExampleDlgDlg的头文件中,添加一CBrush的成员变量: class CExampleDlgDlg : public CDialog {... protected: CBrush m_brush; ... }; ---- ②在OnInitDialog()函数中添加如下代码: BOOL CExampleDlgDlg::OnInitDialog() { ... // TODO: Add extra initialization here m_brush.CreateSolidBrush(RGB(0, 255, 0)... 阅读全文
posted @ 2012-10-18 10:11 Jiang, X. 阅读(526) 评论(0) 推荐(0) 编辑
摘要: 1.创建MFC对话框工程,选择在共享库中调用。2.添加文件:MainFrm.h, MyPreviewView.h, WrapperView.h, MainFrm.cpp, WrapperView.cpp分别为:MainFrm.h 1 // MainFrm.h : interface of the CMainFrame class 2 // 3 ///////////////////////////////////////////////////////////////////////////// 4 5 #if !defined(AFX_MAINFRM_H__5C3F89A6_932E_1.. 阅读全文
posted @ 2012-10-18 09:57 Jiang, X. 阅读(8878) 评论(0) 推荐(2) 编辑
2012年10月15日
摘要: 猜测问题在于没有在注册表中进行注册。通过删除注册表中以前的注册信息,重新注册即可解决。 阅读全文
posted @ 2012-10-15 11:06 Jiang, X. 阅读(730) 评论(0) 推荐(0) 编辑
摘要: 进入cmd重新执行OpcEnum.exe /regserver 即可。 阅读全文
posted @ 2012-10-15 11:04 Jiang, X. 阅读(1531) 评论(0) 推荐(0) 编辑
摘要: 1.1 类型名首字母大写,末尾加_T。如: class TnppCoverageArea_T{…};1.2 1.2 变量和函数名 变量和函数名中首字母小写,其后每个英文单词的第一个字母大写,其他小写。 如: int flexPageCount;1.3 全大写函数名有一类函数,它们调用普通函数,只是对普通函数的错误返回做一般化处理。这些函数的名字要和所包含的函数名相同,只是全用大写字母。1.4 宏、常量和模板名全部大写。如: #define PIE 3.14 const int LENGTH = 1024; template<class TYPE_T>1.5 指针标识符名以p或者Pt 阅读全文
posted @ 2012-10-15 08:41 Jiang, X. 阅读(4746) 评论(0) 推荐(0) 编辑
2012年10月12日
摘要: 1.按照上一篇日志“OPC客户端设计”的方法安装动态链接库及相关的注册工作。2.包含头文件: opcda.h opc_ae.h WTclientAPI.h3.添加库文件: WTclient.lib (要被加入解决方案) WTclient.dll4.初始化方法: WTclientCoInit(); CoUninitialize();5.查询所有的OPC server: 1 //得到OPC server个数 2 int serverNumber = NumberOfOPCServers(TRUE, ""); 3 4 //得到所有OPC server的名字 5 ... 阅读全文
posted @ 2012-10-12 11:22 Jiang, X. 阅读(3169) 评论(0) 推荐(0) 编辑
2012年10月11日
摘要: 1. 开发环境配置 要安装和开发OPC程序,安装必要的OPC代理/存根(Proxy/Stub)DLL是必需的,这些文件提供了OPC接口的数据结构定义,可以使OPC客户端程序和服务器程序之间进行有效的通信。 所有文件必须安装在客户端机器和服务器端机器上。要将这些文件放置在system32系统文件夹下。需要文件: 这些文件包括: opc_aeps.dll //警报与时间服务器代理/存根 opccomn_ps.dll //公用的代理/存根(主要服务器都需要) opchda_ps.dll //历史数据存取代理/存根 aprxdist.exe //运行环境需要 opc... 阅读全文
posted @ 2012-10-11 17:09 Jiang, X. 阅读(2681) 评论(0) 推荐(0) 编辑
2012年9月22日
摘要: 在windowsXP下启动linux虚拟机报错:No permission to access this virtual machine. Configuration file: x:\xx\xxx.vmx.解决方法: 切换到虚拟系统安装目录下,比如:d:\vm\rhel6.0 在当前目录删除以“.lck”结尾的文件夹。再次启动。原因:出现这个问题的原因一般是因为虚拟机非正常关机导致。 阅读全文
posted @ 2012-09-22 08:50 Jiang, X. 阅读(1020) 评论(0) 推荐(0) 编辑
2012年9月20日
摘要: OPC: OLE for Process Control 工业自动化的数据交换规范三个主要的OPC规范: 数据访问DA: 当前值 报警和实践A&E: 基于事件的信息借口 历史数据访问: HAD所有接口提供通过地址空间浏览的方法,并提供可用数据的信息。才用客户端/服务器(C/S)方式进行信息交换。OPC服务器封转了过程信息来源,使信息可以通过它的接口访问。经典OPC接口是基于微软的COM和DCOM技术的。OPC DA客户端明确地选择他们需要从服务器读、写或检测的变量(OPC项)。OPC客户端通过创建一个OPC Server对象来建立一个到服务器的连接。该服务器对象提供通过浏览地址空间分层 阅读全文
posted @ 2012-09-20 12:33 Jiang, X. 阅读(1756) 评论(0) 推荐(0) 编辑
2012年9月17日
摘要: 首先在头文件中包含#include <QDebug>在需要使用的地方插入:qDebug("intensity:%d",intensity[0][2]); (%d表示整数)输出结果:intensity:195注:%a,%A 读入一个浮点值(仅C99有效) %c 读入一个字符 %d 读入十进制整数 %i 读入十进制,八进制,十六进制整数 %o 读入八进制整数 %x,%X 读入十六进制整数 %s 读入一个字符串,遇空格、制表符或换行符结束。 %f,%F,%e,%E,%g,%G 用来输入实数,可以用小数形式或指数形式输入。 %p 读入一个指针 %u 读入一个无符号十.. 阅读全文
posted @ 2012-09-17 12:41 Jiang, X. 阅读(32375) 评论(0) 推荐(1) 编辑
2012年9月15日
摘要: 一、VC实现高精度定时器__基本流程 1、头文件包含 #include <MMSystem.h> 2、类成员中添加变量 UINT m_iTimerId; //定时器句柄 3、创建回调函数,响应定时器事件 void CALLBACK CatchTimer ( UINT IDEvent, UINT uReserved, DWORD dwUser, DWORD dwReserved1, DWORD dwReserved2) { //在这里写定时器事件的处理 } 4、开始启动定时器 //设置定时器分辨率,1ms timeBeginPeriod(1); //产生间隔1... 阅读全文
posted @ 2012-09-15 10:42 Jiang, X. 阅读(3415) 评论(0) 推荐(0) 编辑
摘要: CRecordset类 CRecordset类代表一个记录集.该类是MFC的ODBC类中最重要、功能最强大的类。10.5.1 动态集、快照、光标和光标库 在多任务操作系统或网络环境中,多个用户可以共享同一个数据源。共享数据的一个主要问题是如何协调各个用户对数据源的修改。例如,当某一个应用改变了数据源中的记录时,别的连接至该数据源的应用应该如何处理。对于这个问题,基于MFC的ODBC应用程序可以采取几种不同的处理办法,这将由程序采用哪种记录集决定。 记录集主要分为快照(Snapshot) 和动态集(Dynaset)两种,CRecordset类对这两者都支持。这两种记录集的不同表现在它们对别... 阅读全文
posted @ 2012-09-15 10:11 Jiang, X. 阅读(1487) 评论(0) 推荐(0) 编辑
摘要: 1. Import ADO Class:1 #import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF", "adoEOF")This statement should be in the file that we define the objects.We get 3 smart pointer after import, they are: _ConnectionPtr, _RecordsetPtr , _Comma 阅读全文
posted @ 2012-09-15 09:06 Jiang, X. 阅读(356) 评论(0) 推荐(0) 编辑
2012年9月14日
摘要: 1. Build project with MFC Dialogue;2. Open (ctrl + alt + x) class wizard:3. Add class - From a type library4. Choose From File:5. Find the Road of excel.exe5. Add some classes to the project:6. Press F7 to test whether the code works;7. Delete or comment the code in each of the added in files.1 #imp 阅读全文
posted @ 2012-09-14 13:40 Jiang, X. 阅读(586) 评论(0) 推荐(0) 编辑
2012年9月8日
摘要: Sometimes it is miserable to find that the release version of your software has Garbage Characters and Errors in Images.Here is a good solution which has been tested to be ok.1. In the main() function of your program, add this at the very beginning: QApplication::addLibraryPath("./plugins" 阅读全文
posted @ 2012-09-08 16:27 Jiang, X. 阅读(295) 评论(0) 推荐(0) 编辑
2012年9月6日
摘要: We can show a image with automatic scroll bars with the use of QScrollArea.This is a simple application with QScrollArea.#include <QtGui/QApplication>#include <QLabel>#include <QScrollArea>#include "qmlapplicationviewer.h"Q_DECL_EXPORT int main(int argc, char *argv[]){ QA 阅读全文
posted @ 2012-09-06 14:31 Jiang, X. 阅读(1499) 评论(0) 推荐(0) 编辑
摘要: To paint on a device, usually a widget, we need to overload the function void QWidget::paintEvent(QPainteEvent *event){}We also need to construct the object of QPainter in the function of paintEvent like this: QPainter painter(this);Then we will be able to use QPainter whataver we like. 阅读全文
posted @ 2012-09-06 13:48 Jiang, X. 阅读(418) 评论(0) 推荐(0) 编辑
摘要: QWidget::width();QWidget::height(); 阅读全文
posted @ 2012-09-06 13:26 Jiang, X. 阅读(378) 评论(0) 推荐(0) 编辑
2012年9月5日
摘要: 头文件包含:#include <QTextCodec>在QApplication app(argc,argv);之后加:QTextCodec::setCodecForTr(QTextCodec::codecForName("GBK"));显示中文时调用:QObject::tr("中文")例如:QLabel hello(QObject::tr("你好世界")); 阅读全文
posted @ 2012-09-05 21:47 Jiang, X. 阅读(2614) 评论(0) 推荐(0) 编辑
2012年9月4日
摘要: 刚和朋友探讨了编译过程的宏扩展,联想到以前自己在fedora上用g++的-E指令试过,现在在windows上再来一遍。cpp文件:a.cpp#include <stdio.h>int main(){printf("a");return 0;}通过cmd进入g++所在目录并执行指令: g++ a.cpp -E发现程序之间将扩展后的内容打印了出来,于是将其写入文件: g++ a.cpp -E a.out得到a.out文件如下:# 1 "a.cpp"# 1 "<built-in>"# 1 "<comm 阅读全文
posted @ 2012-09-04 23:43 Jiang, X. 阅读(1258) 评论(0) 推荐(0) 编辑
摘要: RDBMS(relational database management system):关系型数据库管理系统很多公司的趋势是从客户端/服务器模式(Client/Server)转移到Web模式。Client/Server模式与Browser/Server模式构成了目前最流行的两大软件体系结构。C/S模式中,服务器端一般使用高性能计算机,并配合Oracle等大型数据库;客户端需要安装专门的软件。在这种结构下,可以再服务器端和客户端平衡服务处理量,但因为客户端安装了专门的软件,对平台有一定的限制要求,安装和维护的工作量大。ANSI(American National Standards Insti 阅读全文
posted @ 2012-09-04 21:21 Jiang, X. 阅读(463) 评论(0) 推荐(0) 编辑
2012年8月27日
摘要: 自定义类CLoginDlg,继承QDialoglogindlg.h//对CLoginDlg的声明,包括构造函数的声明,成员函数,成员变量的声明#ifndef LOGINDLG_H#define LOGINDLG_H#include <QtGui/QDialog>class QLineEdit;//注意:这是类CLineEdit的传递声明,因为在下面使用到了CLineEdit对象指针class CLoginDlg : public QDialog{Q_OBJECTpublic:CLoginDlg(QWidget* = 0);//构造函数的声明,QWidget是它的顶级父类virtua 阅读全文
posted @ 2012-08-27 16:22 Jiang, X. 阅读(515) 评论(0) 推荐(0) 编辑
摘要: There are two main factors to start a Qt program:1. In the 'Project' menu, select 'Release';2. Copy the files in 'bin' to the folder of the program. 阅读全文
posted @ 2012-08-27 15:24 Jiang, X. 阅读(238) 评论(1) 推荐(0) 编辑
2012年7月29日
摘要: Don’t confuse continuity for laziness. On face value, rehashing events already transpired as ‘predictions’ may create the appearance of lethargy. But, it seems that many emergent themes from the 2010/11 Business Intelligence (BI) scene will dominate 2012, having now developed into significant market 阅读全文
posted @ 2012-07-29 17:43 Jiang, X. 阅读(222) 评论(0) 推荐(0) 编辑
2012年7月11日
摘要: Three typical types of Data Mining applications: Classification Regression ClusteringClassificationIn a classification type problem, we have a variable of interest which is categorical in nature. For example, this could be: Classification of credit risk, either good or bad Classifying patients as hi 阅读全文
posted @ 2012-07-11 16:24 Jiang, X. 阅读(308) 评论(0) 推荐(0) 编辑
摘要: To deal with the data, we have to load it to matlab and express it with variables.%load data to matlabrawdata = load('E:\Pattern Recognition\Data Mining Repository\adult\resource\converted_data.data');%get data of all fieldsage = rawdata(:,1)';workclass = rawdata(:,2)';fnlwgt = rawda 阅读全文
posted @ 2012-07-11 11:12 Jiang, X. 阅读(1198) 评论(0) 推荐(0) 编辑
2012年7月10日
摘要: Do you need to say thank you? Here are a variety of quotes you can use to say thank you in a handwritten thank you card, a letter or an email message.Use these thank you quotes as a starting point, then edit and expand on the quote so it fits your personal circumstances and the reason you are writin 阅读全文
posted @ 2012-07-10 08:41 Jiang, X. 阅读(896) 评论(0) 推荐(0) 编辑
2012年7月9日
摘要: Data conversion – the first step towards data processing Convert all string to integers: ranging from 0 to n.Agecontinuous.WorkclassPrivate, Self-emp-not-inc, Self-emp-inc, Federal-gov, Local-gov, State-gov, Without-pay, Never-worked.Fnlwgtcontinuous.EducationBachelors, Some-college, 11th, HS-grad, 阅读全文
posted @ 2012-07-09 20:38 Jiang, X. 阅读(458) 评论(0) 推荐(0) 编辑
摘要: 模式识别网络资源链接一、模式识别相关网址及其论坛网址1、中国模式识别与机器学习论坛http://bbs.pr-ml.cn (推荐)2、振动论坛——人工智能与模式识别http://www.chinavib.com/forum/forum-108-1.html3、研学论坛——人工智能与模式识别http://219.232.49.40/index.php4、中国图像网——模式识别http://www.china-image.cn/mssb/index.aspx5、中国人工智能网 >> 人工智能、模式识别、图像处理 http://www.chinaai.org/6、模式识别国家重点实验室h 阅读全文
posted @ 2012-07-09 16:54 Jiang, X. 阅读(241) 评论(0) 推荐(0) 编辑
摘要: DescriptionIn computer science and data mining, Apriori[1] is a classic algorithm for learning association rules. Apriori is designed to operate on databases containing transactions (for example, collections of items bought by customers, or details of a website frequentation). Other algorithms are d 阅读全文
posted @ 2012-07-09 15:55 Jiang, X. 阅读(430) 评论(0) 推荐(0) 编辑
摘要: Definitions:•Set of items: I={I1,I2,…,Im}•Transactions: D={t1,t2, …, tn}, tj∈I•Itemset: {Ii1,Ii2, …, Iik} ∈I•Support of an itemset: Percentage of transactions which contain that itemset.•Large (Frequent) itemset: Itemset whose number of occurrences is above a threshold.•Association Rule (AR): implic 阅读全文
posted @ 2012-07-09 15:51 Jiang, X. 阅读(199) 评论(0) 推荐(0) 编辑
摘要: A set has closure under an operation if performance of that operation on members of the set always produces a member of the same set. For example, the real numbers are closed under subtraction, but the natural numbers are not: 3 and 8 are both natural numbers, but the result of 3 − 8 is not a natura 阅读全文
posted @ 2012-07-09 13:11 Jiang, X. 阅读(312) 评论(0) 推荐(0) 编辑
摘要: Distribution-based methodsDistance-based methodsDensity-based methodsClustering-based methods 阅读全文
posted @ 2012-07-09 09:27 Jiang, X. 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Outlier mining - A data mining task aiming to find a specific number of objects that are considerably dissimilar, exceptional and inconsistent with respect to the majority records in the input databases.Subspace - A combination of features of attributes of a database.Outlying subspaces -An outlying 阅读全文
posted @ 2012-07-09 09:16 Jiang, X. 阅读(156) 评论(0) 推荐(0) 编辑
2012年7月2日
摘要: In the project of Data Mining, I have to make use of the regular expressions to deal with the large amount of text in html.I used regular expression in Linux (grep) before and find it quite an efficient way to deal with text, especially when their amount is very large.IntroductionRegular expressions 阅读全文
posted @ 2012-07-02 23:41 Jiang, X. 阅读(251) 评论(0) 推荐(0) 编辑
摘要: I have used python for several months and find it important to know how to debug a python program, to toggle breakpoints, to view the stacks and so on.How to run a program in IDLEIn python IDLE, we can click menu Run -- Run Module to execute our program, alse we can use F5.Perhaps the most common wa 阅读全文
posted @ 2012-07-02 12:53 Jiang, X. 阅读(214) 评论(0) 推荐(0) 编辑
2012年6月27日
摘要: In my project of sina spider as well as the course of Operating System, I come up with the use ofSemaphore and Mutex, I make a note here for my study and my work.DefinitionIn computer science, a semaphore is a variable or abstract data type provides a simple but useful abstraction controlling access 阅读全文
posted @ 2012-06-27 11:19 Jiang, X. 阅读(232) 评论(0) 推荐(0) 编辑
2012年6月20日
摘要: 1 # -*- coding: utf-8 -*- 2 from PyQt4.QtGui import * 3 from PyQt4.QtCore import * 4 import sys 5 6 QTextCodec.setCodecForTr(QTextCodec.codecForName("utf8")) 7 8 class Progess(QDialog): 9 def __init__(self,parent=None):10 super(Progess,self).__init__(parent)11 self.setWindowT... 阅读全文
posted @ 2012-06-20 14:29 Jiang, X. 阅读(761) 评论(0) 推荐(0) 编辑
2012年6月19日
摘要: import json jsonobject = json.load(file('1222508030.json')) cnt = 0 for ele in jsonobject['result']: cnt = cnt + 1 print("\n%d#" % cnt) print(ele['content']['text']) raw_input() 阅读全文
posted @ 2012-06-19 21:53 Jiang, X. 阅读(225) 评论(0) 推荐(0) 编辑