Search Results

Search found 10 results on 1 pages for 'gilbertc'.

Page 1/1 | 1 

  • ASP.NET MVC Html.RouteLink

    - by gilbertc
    I am trying to understand what this RouteLink does. Say, in my Global.asax, I have the default route for MVC routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = "" } // Parameter defaults ); and on a View page, I do <%=Html.RouteLink("Dinners", "Default", new { controller="Dinners", action="Details", id="1"} %> Why it does not generate the link /Dinners/Details/1 but thrown an exception? Thanks. Gil.

    Read the article

  • Direct2D fallback to GDI in XP

    - by gilbertc
    I'd like to use Direct2D for my .Net application using the Windows Code pack. Since some of my users are using XP, I need to provide a GDI+ fallback. I wonder how people usually do this kind of fallback. Do they abstract/interface all the necessary graphics feature into some custom generic library? If so, is there any open-source library for direct2d/GDI? Thanks, Gil.

    Read the article

  • ClickOnce deployment to production

    - by gilbertc
    Our smart-client application is deployed using the ClickOnce. Our production site is hosted on 2 separate web servers, and they are pointed from the same domain-name (for load-balancing). Here is what we do when we push updates to the production. In VS, publish the smart-client application into a localhost directory Copy/Paste the directory to the webservers The deployment address from VS is localhost while it is being used in some other production website. Is that a proper way to deploy smart-client applications?

    Read the article

  • C++: Retriving values of static const variables at a constructor of a static variable

    - by gilbertc
    I understand that the code below would result segmentation fault because at the cstr of A, B::SYMBOL was not initialized yet. But why? In reality, A is an object that serves as a map that maps the SYMBOLs of classes like B to their respective IDs. C holds this map(A) static-ly such that it can provide the mapping as a class function. The primary function of A is to serve as a map for C that initializes itself at startup. How should I be able to do that without segmentation fault, provided that I can still use B::ID and B::SYMBOL in the code (no #define pls)? Thanks! Gil. class A { public: A() { std::cout<<B::ID<<std::endl; std::cout<<B::SYMBOL<<std::endl; } }; class B { public: static const int ID; static const std::string SYMBOL; } const int B::ID = 1; const std::string B::SYMBOL = "B"; class C { public: static A s_A; }; A C::s_A; int main(int c, char** p) { }

    Read the article

  • C++ using this pointer in constructors

    - by gilbertc
    In c++, during a class constructor, I started a new thread with 'this' pointer as a parameter which will be used in the thread extensively (say, calling member functions). Is that a bad thing to do? Why and what are the consequences? Thanks, Gil.

    Read the article

  • Does C++ have a proper implementation of interface that does not use vtable?

    - by gilbertc
    Does C++ have a proper implementation of interface that does not use vtable? for example class BaseInterface{ public: virtual void func() const = 0; } class BaseInterfaceImpl:public BaseInterface{ public: void func(){ std::cout<<"called."<<endl; } } BaseInterface* obj = new BaseInterfaceImpl(); obj->func(); the call to func at the last line goes to vtable to find the func ptr of BaseInterfaceImpl::func, but is there any C++ way to do that directly as the BaseInterfaceImpl is not subclassed from any other class besides the pure interface class BaseInterface? Thanks. Gil.

    Read the article

  • Does C++ have a static polymorphism implementation of interface that does not use vtable?

    - by gilbertc
    Does C++ have a proper implementation of interface that does not use vtable? for example class BaseInterface{ public: virtual void func() const = 0; } class BaseInterfaceImpl:public BaseInterface{ public: void func(){ std::cout<<"called."<<endl; } } BaseInterface* obj = new BaseInterfaceImpl(); obj->func(); the call to func at the last line goes to vtable to find the func ptr of BaseInterfaceImpl::func, but is there any C++ way to do that directly as the BaseInterfaceImpl is not subclassed from any other class besides the pure interface class BaseInterface? Thanks. Gil.

    Read the article

1