我试图在Visual Studio 2010中测量控制台应用程序项目的某些功能和方法的性能.
我将分析方法配置为检测.问题是性能监视器不起作用.我得到输出的消息是:
Profiling started.
Instrumenting w:\MyProject\ProfilingTest\Build\Debug\ProfilingTest.exe in place
Info VSP3049: Small functions will be excluded from instrumentation.
Microsoft (R) VSInstr Post-Link Instrumentation 10.0.40219 x64
Copyright (C) Microsoft Corp. All rights reserved.
File to Process:
w:\MyProject\ProfilingTest\Build\Debug\ProfilingTest.exe --> w:\MyProject\ProfilingTest\Build\Debug\ProfilingTest.exe
Original file backed up to w:\MyProject\ProfilingTest\Build\Debug\ProfilingTest.exe.orig
Successfully instrumented file w:\MyProject\ProfilingTest\Build\Debug\ProfilingTest.exe.
The process cannot access the file 'w:\MyProject\ProfilingTest\Build\Debug\ProfilingTest.exe' because it is being used by another process.
Data written to w:\MyProject\ProfilingTest\ProfilingTest110611(17).vsp.
Profiling finished.
File contains no data buffers
File contains no data buffers …
Run Code Online (Sandbox Code Playgroud) 有人试图用Visual Studio 2010(Beta 2)构建Qt 4.5吗?有关成功的任何提示吗?
稍后编辑 我试图从Visual Studio 2010控制台运行配置.2010年没有makepecs支持,因此配置失败.
我有以下简化方案:
template< typename T>
struct A
{
A() : action_( [&]( const T& t) { })
{}
private:
boost::function< void( const T& )> action_;
};
Run Code Online (Sandbox Code Playgroud)
使用Visual C++ 2010进行编译时,它在构造action_时给出了语法错误:
1>test.cpp(16): error C2059: syntax error : ')'
1> test.cpp(23) : see reference to class template instantiation A<T>' being compiled
Run Code Online (Sandbox Code Playgroud)
奇怪的是,同样的例子,没有模板参数,编译得很好:
struct A
{
A() : action_( [&]( const int& t) { })
{}
private:
boost::function< void( const int& )> action_;
};
Run Code Online (Sandbox Code Playgroud)
我知道问题的一个解决方法是在构造函数体中移动action_初始化,而不是初始化列表,如下面的代码中所示:
template< typename T>
struct A
{
A()
{
action_ = …
Run Code Online (Sandbox Code Playgroud) 有谁知道如何在QT中自定义主窗口的标题栏?我想在"普通"绘画上做一些自定义绘画.
我感兴趣的QT版本是4.5或4.6(测试版)
我试图在创建后直接执行存储过程但是没有被调用.看起来在执行调用期间尚未创建存储过程.
以下是脚本的外观:
CREATE PROCEDURE sp_Transfer_RegionData
AS
BEGIN
INSERT INTO Region (regionName)
SELECT column1
FROM openquery(ITDB, 'select * from db.table1')
END
EXEC sp_Transfer_RegionData
Run Code Online (Sandbox Code Playgroud)
该脚本运行正常,但未填充所需的表.用以下内容替换执行部分后:
IF OBJECT_ID('sp_Transfer_RegionData') IS NOT NULL
begin
exec [dbo].[sp_Transfer_RegionData]
print 'tada'
end
Run Code Online (Sandbox Code Playgroud)
我可以看到存储过程在必须执行时不存在.无法在互联网上找到解决方案......
那么如何让SQL脚本运行同步,以便在执行部分期间存储过程已经存在?
这必须是一个非常简单的问题,我有一个结构中有四个元素,一个结构变量被初始化为一个数组,现在的问题是我可以访问数组的第一行,但我不知道如何访问剩余的行...请指导我!
//structure is defined as follows
typedef struct{
char first_name[100];
char second_name[100];
int x_position;
int y_position;
} names;
int main(void)
{
int i=0;
//here i have initilized structure variable
names my_data[] = {
{"First", "Row", 20, 12},
{"Second", "Row", 55, 30},
{"Third", "Row", 80, 47},
{"Fourth", "Row", 27, 34}
};
//trying to acess the diffrent row elements ....but dont know how??
for(i=0; i<=3; i++)
{
printf("%s\n",my_data->first_name);
printf("%s\n",my_data->second_name);
printf("%d\n",my_data->x_position);
printf("%d\n",my_data->y_position);
}
system("PAUSE");
return 0;
}
Run Code Online (Sandbox Code Playgroud)