小编Dan*_*tin的帖子

OLAP多维数据集部署问题

我对此很陌生,所以我可能犯了一个简单的错误.

我需要使用远程数据库创建OLAP多维数据集.在设置维度和度量并创建多维数据集后,我无法将多维数据集启动到本地服务器.我不断收到错误,"由于以下连接问题,项目无法部署到'localhost'服务器:无法建立连接.确保服务器正在运行.要验证或更新目标服务器的名称,在解决方案资源管理器中右键单击项目,选择"项目属性",单击"部署"选项卡,然后输入服务器的名称."

但是,本地SQL服务器正在运行(据我所知),我不知道如何解决这个问题.我试过用"."替换"localhost".和知识产权,但这也没有奏效.

以下是我关注的指南:http: //www.mssqltips.com/sqlservertip/1532/build-a-cube-from-an-existing-data-source-using-sql-server-analysis-services/

也许SQL Server没有真正运行?我怎么检查?或者,当我尝试处理多维数据集时,我是否正在跳过重要的内容?

sql connection olap ssas cube

12
推荐指数
4
解决办法
3万
查看次数

NSAutoLayoutConstraints崩溃的应用程序

我已经按照了一些教程,但我似乎无法让我的应用程序接受我为NSAutoLayoutConstraints设定的规则.

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unable to parse constraint format: 
Unable to interpret '|' character, because the related view doesn't have a superview 
V:|-[signupBtn][signupWithFacebookBtn]-| 
Run Code Online (Sandbox Code Playgroud)

在我的viewLoad方法中:

-(void)loadView
{
    [super loadView];



    //Create the background view
    [self.view setBackgroundColor:[UIColor whiteColor]];


    //Set up the buttons, labels, and textfields
    signupBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    [signupBtn setTitle:@"Sign Up!" forState:UIControlStateNormal];
    [signupBtn setTranslatesAutoresizingMaskIntoConstraints:NO];
    [signupBtn setFrame:CGRectMake(50, 350, 220, 40)];
    signupWithFacebookBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    [signupWithFacebookBtn setTitle:@"Sign Up with Facebook" forState:UIControlStateNormal];
    [signupWithFacebookBtn setTranslatesAutoresizingMaskIntoConstraints:NO];
    [signupWithFacebookBtn setFrame:CGRectMake(50, 400, 320, 40)]; …
Run Code Online (Sandbox Code Playgroud)

objective-c ios nsautolayout

6
推荐指数
1
解决办法
5261
查看次数

可以在D中获取变量的名称吗?

我目前正在尝试在D中编写一个程序,当调用并传递一个对象时,它会将对象序列化为XML文档.我想让它像传递对象一样简单,但我不能完全确定它可以完成.例:

class A
{
    //Constructors and fluff
    ....

    int firstInt;
    int secondInt;
}

.....
A myObj = new A();
XMLSerialize(myObj);
Run Code Online (Sandbox Code Playgroud)

输出将是

<A.A>
    <firstInt></firstInt>
    <secondInt></secondInt>
</A.A>
Run Code Online (Sandbox Code Playgroud)

那么,我是否有可能在对象内部获取变量的名称,或者是否必须手动完成?

xml serialization d variable-names

2
推荐指数
1
解决办法
112
查看次数

iOS之间的时间点击

我试图在水龙头之间保持节奏.但是,我随机获得巨大的价值,我不知道为什么.

@implementation GameScene
{
   CFTimeInterval previousFrameTime;
   SKLabelNode* myLabel;
}

-(void)didMoveToView:(SKView *)view {
   previousTimeFrame = 0.0f;
   myLabel = [SKLabelNode labelNodeWithFontNamed:@"Chalkduster"];

   myLabel.text = @" ";
   myLabel.fontSize = 12;
   myLabel.position = CGPointMake(CGRectGetMidX(self.frame), CGRectGetMidY(self.frame));
[self addChild:myLabel];
}

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    myLabel.text = [NSSTring stringWithFormat: @"%f", previousFrameTime];
}

//Called every frame
-(void)update:(CFTimeInterval)currentTime {
    //get the time between frames
    previousFrameTime = CACurrentMediaTime() - previousFrameTime;
}
Run Code Online (Sandbox Code Playgroud)

产量:0.65323 0.93527 1.65326 5866.42930 < - ???? 2.52442 5.23156 5888.21345 < - ?????

什么会导致这些随机跳跃?

timing objective-c ios

2
推荐指数
1
解决办法
124
查看次数

未解析的外部符号,即使已定义?

我没有使用任何模板,它不是静态类或函数,所以我完全不知道为什么它定义时会给我一个LNK2001错误.这是完整的错误:

1>mapgenerator.obj : error LNK2019: unresolved external symbol "private: class std::vector<int,class std::allocator<int> > __thiscall MapGenerator::Decode(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?Decode@MapGenerator@@AAE?AV?$vector@HV?$allocator@H@std@@@std@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@@Z) referenced in function "private: void __thiscall MapGenerator::GenerateTileLayer(class TiXmlNode *)" (?GenerateTileLayer@MapGenerator@@AAEXPAVTiXmlNode@@@Z)
Run Code Online (Sandbox Code Playgroud)

我的MapGenerator类;

class MapGenerator
{
public:
    //Constructor and destructor
    MapGenerator(std::string tmxfile) : doc(tmxfile.c_str()) { Load(); }
    ~MapGenerator();

    //Loads in a new TMX file
    void Load();

    //Returns a map
    void GetMap();


    //Reads the TMX document
    void Read();


private:
    //The TMX document
    TiXmlDocument doc;



    //Generates a tile layer
    void GenerateTileLayer(TiXmlNode* node);

    //Generates a …
Run Code Online (Sandbox Code Playgroud)

c++ lnk2001

1
推荐指数
1
解决办法
2268
查看次数

消除整数列表输入中的逗号

我有一个文件,用逗号分隔整数值.例:

10, 5, 213
6, 21, 1
9, 21, 2
Run Code Online (Sandbox Code Playgroud)

我在C中使用我的文件IO生锈了,我只是在输入的第一个整数值中读取了无限循环(10).为什么我陷入了循环?它不应该读取3个数字(忽略逗号和空格)并转到下一行吗?

int main(void)
{
//Open a file to read
FILE *_file = fopen("input.txt", "r");
//Used for scanning characters
int i[3];
i[0] = 0;
i[1] = 0;
i[2] = 0;
char buffer[1024] = { 0 } ;

//Check to make sure the file was open
if (_file == NULL) {
    fprintf(stderr, "ERROR: File Not Found\n");

} //Else, file was opened
else {
    //Scan the entire file and print the integer
    fscanf(_file, …
Run Code Online (Sandbox Code Playgroud)

c file-io

1
推荐指数
1
解决办法
50
查看次数

链接器声称已定义对象

我有一个带有命名空间的头文件,在该命名空间中我声明了几个事件和一个函数。在相应的 .cpp 文件中,我充实了赋予这些对象属性的函数(对象是联合)。然而,当我编译链接器声称对象已经在 main.obj 中声明时,它们还没有。我觉得这是我使用命名空间的问题,但我找不到任何指向该假设的内容。

.h

#pragma once
#include <SDL.h>

namespace UserEvents {


    /*Events for the StateMachine*/
     SDL_Event switchToEntryState;
     SDL_Event switchToIntroState;
     SDL_Event switchToGameState;
     SDL_Event switchToPauseState;
     SDL_Event exitState;
     SDL_Event shutdownStateMachine;


    bool initUserStates();
};
Run Code Online (Sandbox Code Playgroud)

和 .cpp

#include "UserEvents.h"


using namespace UserEvents;
/*

SDL_Event switchToEntryState;
SDL_Event switchToIntroState;
SDL_Event switchToGameState;
SDL_Event switchToPauseState;
SDL_Event exitState;
SDL_Event shutdownStateMachine;

*/

/*
***********************************
USER EVENT CODE CHART
***********************************

EVENT CODE | MODULE
--------------------
0          | STATEMACHINE

*/


bool initUserStates() {
    //Attempt to register the number of events
    Uint32 …
Run Code Online (Sandbox Code Playgroud)

c++ namespaces linker-errors

0
推荐指数
1
解决办法
71
查看次数