0
голосов
1ответов
531 просмотров

httphandler filetype mapping requires virtual directory (or does it?)

I am using an httpHandler to pass all requests for *.gif files to an ashx handler. i only want to do this for requests to a sub-folder within the website. The website root is called 'demo' and the subfolder is called et. So, I add a web.config file to the et folder with an entry as follows: ...

0
голосов
3ответов
295 просмотров

How to create a virtual network for an application

I'm creating a simple p2p application. To test this I'd like to be able to simulate a simple network of about 2-3 computers, such that each instance of the application thinks its on a different computer and talking with others over the network. I considered qemu, but haven't managed to get networ...

0
голосов
5ответов
600 просмотров

Using an abstract class to implement a stack of elements of the derived class

I have to do this for a basic C++ lecture at my university, so just to be clear: i would have used the STL if i was allowed to. The Problem: I have a class named "shape3d" from which i derived the classes "cube" and "sphere". Now i have to implement "shape3d_stack", which is meant be able of hol...

1
голосов
2ответов
149 просмотров

Virtual non-method members

Is something similar to this possible? This way it produces an error. class A { public: virtual std::string key; }; class B : public A { public: std::string key; }; int main() { A a; a.key = "Foo"; return 1; }

0
голосов
8ответов
992 просмотров

Accessing a method from a templated derived class without using virtual functions in c++?

How do I get around this? I clearly cannot make the value() method virtual as I won't know what type it is beforehand, and may not know this when accessing the method from b: class Base { public: Base() { } virtual ~Base() { } private: int m_anotherVariable; }; template <typename...

2
голосов
3ответов
97 просмотров

Fine-grained sandboxing

Scenario: a program running in a byte code virtual machine like Java or Python, wants to evaluate (by compiling on the fly to byte code and then running) a function whose code was automatically generated or supplied from outside. The tricky bit is that the function's code is not trusted -- it ma...

3
голосов
1ответов
9875 просмотров

how to programatically edit the cell value of a datagridview in virtual mode?

I have a DataGridView in virtual mode. I only implemented the CellValueNeeded eventhandler as described in http://msdn.microsoft.com/en-us/library/15a31akc.aspx. Implementing the rest of the events only seems needed when you want to be able to edit the cells manually. I would like to programati...

0
голосов
2ответов
1303 просмотров

How to compare two pointers to object by their most derived type?

I have a following class hierarchy: class Base{ .... virtual bool equal(Base *); } class Derived1: public Base{ .... virtual bool equal(Base *); } class Derived2: public Derived1{ } class Derived3: public Derived1{ } class Derived4: public Base{ } How I should write Base::equal(Base *) functi...

14
голосов
9ответов
15339 просмотров

How to hack the virtual table?

I would like to know how to change the address of Test which is in the virtual table with that of HackedVTable. void HackedVtable() { cout << "Hacked V-Table" << endl; } class Base { public: virtual Test() { cout <<"base"; } virtual Test1() { cout << ...

0
голосов
1ответов
85 просмотров

Performance problem Loading Dataset inside a virtual

Host Configuration: HP EliteBook 8530w 4G Ram Win7 Ultimate 64Bit RC SQL Server 2005 64bit Developer Edition Virtual: Windows Virtual PC 1G Ram allocated Integration Services installed Windows XP 64bit Up to date service packs and .Net framework through 3.5 SP1 Sharing the Gigabit network a...

0
голосов
3ответов
1603 просмотров

wilcard DNS and Virtual subdomains?

I just don't get it.. I'm planning to get scenario like this: username.mydomain.com = mydomain.com/user.php?user=username Well, let's not go that far yet because this wildcard DNS is making me insane!! :/ I have DNS record * A my-ip-address And I have in my vhost file ServerAlias *.mydoma...

3
голосов
1ответов
2644 просмотров

combine directories into a virtual one

in Windows XP Does anybody know a software that maps multiple directories to ONE virtual drive or directory? When I open the virtual directory, I want to see all files from mapped directories as if it was one physical dir. Linux software mhddfs seems to correspond exactly to my need. from h...

3
голосов
6ответов
2752 просмотров

simple VirtualFilesystem for delphi - must be FREE!

my application stores infos about some files analyzed in given directory... it produces one file for each file found in a directory, so it could be any number ... I need to store those produced files separately, but it's not the best idea to put them like it is ... so I'm looking for some virtual...

14
голосов
8ответов
14528 просмотров

C++ Overridden method not getting called

Shape.h namespace Graphics { class Shape { public: virtual void Render(Point point) {}; }; } Rect.h namespace Graphics { class Rect : public Shape { public: Rect(float x, float y); Rect(); void setSize(float x, float y); virtual void...

7
голосов
1ответов
1079 просмотров

Where virtual constructors are used?

I read about virtual constructors are used for implementing some design patterns, but didn't understood any need of virtual constructors. So what are virtual constructors and why we really need them?

1
голосов
6ответов
2084 просмотров

Is there any relation between Virtual destructor and Vtable

If we write virtual function it adds a vtable in object of that class. Is it true for virtual destructor too ? Is vtable used to implement virtualness of destructor

0
голосов
3ответов
2420 просмотров

virtual attribute problems with undefined methods

I've used Virtual attributes in the past but I can't seem to get past this, and I know the answer is probably staring me in the face. I have a model like so: model Confirmation.rb class Confirmation < ActiveRecord::Base #attr_accessible :confirmation, :confirmation_token #attr_accessib...

3
голосов
1ответов
1253 просмотров

Has anyone setup tomcat to run virtual hosts using mod_jk

I work in OSX primarily with mostly PHP. Normally I work locally using MAMP and virtual hosts setup in my httpd.conf so that I can point a browser to http://some-project and have as many projects as I need setup. We have a project coming up where we need to serve JSP pages and I would like to s...

1
голосов
8ответов
1849 просмотров

What's the difference between virtual function instantiations in C++?

What's the difference between the following two declarations? virtual void calculateBase() = 0; virtual void calculateBase(); I read the first one (=0) is a "pure abstract function" but what does that make the second one?

21
голосов
4ответов
3290 просмотров

In C++, is a function automatically virtual if it overrides a virtual function?

I would expect that if foo is declared in class D, but not marked virtual, then the following code would call the implementation of foo in D (regardless of the dynamic type of d). D& d = ...; d.foo(); However, in the following program, that is not the case. Can anyone explain this? Is a me...

1
голосов
3ответов
739 просмотров

Acceptable to use virtual inheritance to prevent accidentally creating a diamond?

This is a simplification of some real code, and a real mistake I made when I didn't realize someone else had already implemented Foo and derived from it. #include <iostream> struct Base { virtual ~Base() { } virtual void print() = 0; }; struct OtherBase { virtual ~OtherBase() { ...

4
голосов
2ответов
2112 просмотров

How to mix-and-match inputs from two game controllers into one "virtual" controller?

Image the following situation: You're on Windows XP (even though the dialog shown below is a Vista screenshot). You have two physical USB game controllers, let's call them A and B. You have a piece of software that apparently accesses joysticks in a legacy way, only recognizing and allowing use...

19
голосов
4ответов
7747 просмотров

can we implement a java interpreter in hardware that executes Java bytecodes natively?

if we implement java interpreter in hardware then how we can achieve architecture neutrality of java bytecode... does java uses JIT(just in time interpreter) ? and how all this is related to Virtual Machine concept of operating system and java virtual machine(JVM)

10
голосов
4ответов
2654 просмотров

C++ Inheritance/VTable questions

Update: Replaced the destructor example with a straight up method call example. Hi, If I have the following code: class a { public: virtual void func0(); // a has a VTable now void func1(); }; class b : public a { public: void func0() { a::func0(); } void func2(); }; Is the...

2
голосов
4ответов
10899 просмотров

virtual data type/enum

I want a virtual class like this: class Configuration { public: enum EPromptId; virtual CString getPrompt( EPromptId promptId ) = 0; private: }; So that each derived configuration can have its own set of EPromptIds class Configuration1 : public Configuration { public: enum EPro...

4
голосов
10ответов
334 просмотров

How virtual is this?

can you explain me why: int main (int argc, char * const argv[]) { Parent* p = new Child(); p->Method(); return 0; } prints "Child::Method()", and this: int main (int argc, char * const argv[]) { Parent p = *(new Child()); p.Method(); return 0; } prints "Parent::M...

5
голосов
3ответов
6636 просмотров

How to Implement a Base Class with a Method and yet force the Derived Class to Override it?

Having something like this this : public abstract class AAA { protected abstract virtual string ToString() // Error { // Base Stuff } } public abstract class BBB : AAA { public override string ToString() { // Use base.ToString(); // More Stuff } } I read another pos...

7
голосов
3ответов
1079 просмотров

What does Virtual and Override do behind the scene

I just came to understand Virtual and Override is use for(I can't find a use for so long). Now I'm using them in Factory Patterns. So my question is what does Virtual and Override do behind the scene? I'm willing to go in to IL and Machine code stuff.

354
голосов
12ответов
259725 просмотров

Virtual/pure virtual explained

What exactly does it mean if a function is defined as virtual and is that the same as pure virtual?

9
голосов
7ответов
2831 просмотров

about the cost of virtual function

If I call a virtual function 1000 times in a loop, will I suffer from the vtable lookup overhead 1000 times or only once?