09 2012 档案
虚拟机启动时出现"No permission to access this virtual machine. Configuration file: x:\xx\xxx.vmx."
摘要:在windowsXP下启动linux虚拟机报错:No permission to access this virtual machine. Configuration file: x:\xx\xxx.vmx.解决方法: 切换到虚拟系统安装目录下,比如:d:\vm\rhel6.0 在当前目录删除以“.lck”结尾的文件夹。再次启动。原因:出现这个问题的原因一般是因为虚拟机非正常关机导致。
阅读全文
OPC
摘要:OPC: OLE for Process Control 工业自动化的数据交换规范三个主要的OPC规范: 数据访问DA: 当前值 报警和实践A&E: 基于事件的信息借口 历史数据访问: HAD所有接口提供通过地址空间浏览的方法,并提供可用数据的信息。才用客户端/服务器(C/S)方式进行信息交换。OPC服务器封转了过程信息来源,使信息可以通过它的接口访问。经典OPC接口是基于微软的COM和DCOM技术的。OPC DA客户端明确地选择他们需要从服务器读、写或检测的变量(OPC项)。OPC客户端通过创建一个OPC Server对象来建立一个到服务器的连接。该服务器对象提供通过浏览地址空间分层
阅读全文
qdebug使用方法
摘要:首先在头文件中包含#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 读入一个无符号十..
阅读全文
VC高精度定时
摘要:一、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...
阅读全文
CRecordset类
摘要:CRecordset类 CRecordset类代表一个记录集.该类是MFC的ODBC类中最重要、功能最强大的类。10.5.1 动态集、快照、光标和光标库 在多任务操作系统或网络环境中,多个用户可以共享同一个数据源。共享数据的一个主要问题是如何协调各个用户对数据源的修改。例如,当某一个应用改变了数据源中的记录时,别的连接至该数据源的应用应该如何处理。对于这个问题,基于MFC的ODBC应用程序可以采取几种不同的处理办法,这将由程序采用哪种记录集决定。 记录集主要分为快照(Snapshot) 和动态集(Dynaset)两种,CRecordset类对这两者都支持。这两种记录集的不同表现在它们对别...
阅读全文
How to use VS to manipulate Access
摘要: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
阅读全文
How to use VS to manipulate Excel--使用MFC读写Excel
摘要: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
阅读全文
How to slove the problem of Garbage Characters of Chinese and Errors of Images in Qt
摘要: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"
阅读全文
Qt ScrollArea
摘要: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
阅读全文
Qt QPainter
摘要: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.
阅读全文
Qt How to get the width and height of a widget
摘要:QWidget::width();QWidget::height();
阅读全文
Qt QLabel 显示中文
摘要:头文件包含:#include <QTextCodec>在QApplication app(argc,argv);之后加:QTextCodec::setCodecForTr(QTextCodec::codecForName("GBK"));显示中文时调用:QObject::tr("中文")例如:QLabel hello(QObject::tr("你好世界"));
阅读全文
g++宏扩展
摘要:刚和朋友探讨了编译过程的宏扩展,联想到以前自己在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
阅读全文
《SQL入门经典》学习笔记
摘要:RDBMS(relational database management system):关系型数据库管理系统很多公司的趋势是从客户端/服务器模式(Client/Server)转移到Web模式。Client/Server模式与Browser/Server模式构成了目前最流行的两大软件体系结构。C/S模式中,服务器端一般使用高性能计算机,并配合Oracle等大型数据库;客户端需要安装专门的软件。在这种结构下,可以再服务器端和客户端平衡服务处理量,但因为客户端安装了专门的软件,对平台有一定的限制要求,安装和维护的工作量大。ANSI(American National Standards Insti
阅读全文