Search Results

Search found 27 results on 2 pages for 'metdos'.

Page 1/2 | 1 2  | Next Page >

  • XMl Data Structure

    - by metdos
    Which one of two XML structures below do you prefer? Why? Any other suggestion is welcome :) <Parameters> <Parameter id=username>metdos</Parameter> <Parameter id=password>123</Parameter> </Parameters> or <Parameters> <username>metdos</username> <password>123</password> </Parameters>

    Read the article

  • TCP Message Structure with XML

    - by metdos
    Hello Everybody, I'm sending messages over TCP/IP and on the other side I parse TCP message.For example this is one of the sent messages. $DKMSG(requestType=REQUEST_LOGIN&requestId=123&username=metdos&password=123)$EDKMSG Clarification: $DKMSG( //Start )$EDKMSG //End requestType //Parameter REQUEST_LOGIN //Parameter Value Now I also want to add an Xml file to my message. I'm considering this option: $DKMSG(requestType=REQUEST_LOGIN&xmlData= <Item id="56D@MIT" type="SIGNAL"> <Label> <Text>56D</Text> <X1>10</X1> <Y1>40</Y1> <RotateAngle>90</RotateAngle> </Label> <X1>0</X1> <Y1>20</Y1> <Width>35</Width> <Height>10</Height> <Source>sgs3lr</Source> </Item> )$EDKMSG There are problems with this way: 1-)It doesn't seem right to me. 2-)I have to handle delimeter "=" with much more care or I need to change it in parameters. What are your suggestions, thanks.

    Read the article

  • How to reach subdomain with IP

    - by metdos
    Here website which I want to access http://elele.cmpe.boun.edu.tr/ I guess there is a problem with DNS, so I can reach it via Ip adress : http://79.123.177.252/ but how I gonna reach subdomain: http://projects.elele.cmpe.boun.edu.tr Edit: I added 79.123.177.252 elele.cmpe.boun.edu.tr to host.txt under %windir%\system32\drivers\etc\hosts elele.cmpe.boun.edu.tr works http://projects.elele.cmpe.boun.edu.tr/ doesn't work

    Read the article

  • Windows partition and double operation system

    - by metdos
    I bought a notebook, Sony Vaio VPC-EB1M1E and I want to make partition and use both windows-7 and Linux(Ubuntu). Should I make partition from inside windows, or should make partition using recovery discs? There is windows-installer version of Ubuntu, should I use it, or should I install it separately? Thanks.

    Read the article

  • Create XML File Using XML Schema

    - by metdos
    Is there any easy way to create at least a template XML file using XML Schema? My main interest is bounded by C++, but discussions of other programming languages are also welcome.By the way I also use QT framework.

    Read the article

  • Calls to singleton library

    - by metdos
    I have a singleton class, and I will compile it as a library static(lib) or dynamic(dll). Is it guaranteed that calls to same file in a machine always refer to same and unique instance in both cases?

    Read the article

  • QT warning level suggestion

    - by metdos
    What is the warning level you use while compiling QT projects? When I compiled with W4, I'm getting a lot of warnings such as: C4127: conditional expression is constant Should I compile at W3, or find other ways to handle warnings at W4, such as: adding a new header file and using pragma's(mentioned here C++ Coding Standards: 101 Rules, Guidelines, and Best Practices). What are your practices? Thansk.

    Read the article

  • How install gems locally?

    - by metdos
    I have no internet connection on server machine, so I need to install gems locally. I tried gem install rails-2.3.4.gem But, I'm getting errors. How Can I install gems locally. Thanks.

    Read the article

  • Polymorphic Queue

    - by metdos
    Hello Everyone, I'm trying to implement a Polymorphic Queue. Here is my trial: QQueue <Request *> requests; while(...) { QString line = QString::fromUtf8(client->readLine()).trimmed(); if(...)){ Request *request=new Request(); request->tcpMessage=line.toUtf8(); request->decodeFromTcpMessage(); //this initialize variables in request using tcpMessage if(request->requestType==REQUEST_LOGIN){ LoginRequest loginRequest; request=&loginRequest; request->tcpMessage=line.toUtf8(); request->decodeFromTcpMessage(); requests.enqueue(request); } //Here pointers in "requests" do not point to objects I created above, and I noticed that their destructors are also called. LoginRequest *loginRequest2=dynamic_cast<LoginRequest *>(requests.dequeue()); loginRequest2->decodeFromTcpMessage(); } } Unfortunately, I could not manage to make work Polymorphic Queue with this code because of the reason I mentioned in second comment.I guess, I need to use smart-pointers, but how? I'm open to any improvement of my code or a new implementation of polymorphic queue. Thanks.

    Read the article

  • Is factory method proper design for my problem?

    - by metdos
    Hello Everyone, here is my problem and I'm considering to use factory method in C++, what are your opinions ? There are a Base Class and a lot of Subclasses. I need to transfer objects on network via TCP. I will create objects in first side, and using this object I will create a byte array TCP message, and send it to other side. On the other side I will decompose TCP message, I will create object and I will add this object to a polymorphic queue.

    Read the article

  • Factory Method and Cyclic Dependancy

    - by metdos
    If I'm not wrong, because of its nature in factory method there is cyclic dependency: Base class needs to know subclasses because it creates them, and subclasses need to know base class. Having cyclic dependency is bad programming practice, is not it? Practically I implemented a factory, I have problem above, even I added #ifndef MYCLASS_H #define MYCLASS_H #endif I'm still getting Compiler Error C2504 'class' : base class undefined And this error disappers when I remove subclass include from base class header.

    Read the article

  • Constructor Overload Problem in C++ Inheritance

    - by metdos
    Here my code snippet: class Request { public: Request(void); ……….. } Request::Request(void) { qDebug()<<"Request: "<<"Hello World"; } class LoginRequest :public Request { public: LoginRequest(void); LoginRequest(QDomDocument); …………… } LoginRequest::LoginRequest(void) { qDebug()<<"LoginRequest: "<<"Hello World"; requestType=LOGIN; requestId=-1; } LoginRequest::LoginRequest(QDomDocument doc){ qDebug()<<"LoginRequest: "<<"Hello World with QDomDocument"; LoginRequest::LoginRequest(); xmlDoc_=doc; } When call constructor of Overrided LoginRequest LoginRequest *test=new LoginRequest(doc); I came up with this result: Request: Hello World LoginRequest: Hello World with QDomDocument Request: Hello World LoginRequest: Hello World Obviously both constructor of LoginRequest called REquest constructor. Is there any way to cape with this situation? I can construct another function that does the job I want to do and have both constructors call that function. But I wonder is there any solution?

    Read the article

  • Constructor Overload Problem in C++ Inherrentance

    - by metdos
    Here my code snippet: class Request { public: Request(void); ……….. } Request::Request(void) { qDebug()<<"Request: "<<"Hello World"; } class LoginRequest :public Request { public: LoginRequest(void); LoginRequest(QDomDocument); …………… } LoginRequest::LoginRequest(void) { qDebug()<<"LoginRequest: "<<"Hello World"; requestType=LOGIN; requestId=-1; } LoginRequest::LoginRequest(QDomDocument doc){ qDebug()<<"LoginRequest: "<<"Hello World with QDomDocument"; LoginRequest::LoginRequest(); xmlDoc_=doc; } When call constructor of Overrided LoginRequest LoginRequest *test=new LoginRequest(doc); I came up with this result: Request: Hello World LoginRequest: Hello World with QDomDocument Request: Hello World LoginRequest: Hello World Obviously both constructor of LoginRequest called REquest constructor. Is there any way to cape with this situation? I can construct another function that does the job I want to do and have both constructors call that function. But I wonder is there any solution?

    Read the article

  • Object Deletion: use parent or not

    - by metdos
    Which one do you prefer to delete objects? Especially in QT, but other practices are also welcome. These two alternatives seem same to me, are they? 1.Bound to another class, and destroy when it is destroyed. SomeClass::SomeClass{ socket_ = new QTcpSocket(this); } or 2.Destroy in the destructor of class SomeClass::SomeClass{ socket_ = new QTcpSocket(); } SomeClass::~SomeClass{ delete socket_; }

    Read the article

  • Linkage Error with Inherited Class

    - by metdos
    I have static library and another program which uses it. In the static library If I define header without inheretence it works fine. class TcpCommunication On the other hand If I use inheretence with a QT class, class TcpCommunication:public QTcpServer I'm getting linkage error when I compiling code which uses this static library. >MStoDKAPId.lib(TcpCommunication.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QTcpServer::~QTcpServer(void)" (__imp_??1QTcpServer@@UAE@XZ) referenced in function "public: virtual __thiscall TcpCommunication::~TcpCommunication(void)" (??1TcpCommunication@@UAE@XZ) What can be the problem? Thanks.

    Read the article

1 2  | Next Page >