templates

Where to find the best user story template?

I want to implement user stories in a new project where can i find a good template or other ones used in agile development? ...

Problem with editing Template Monster .fla file

I am having the worst luck with this. We bought a template to update our own website (don't have enough time to start our own from scratch!) but when I make simple changes in the Flash CS4 native file and re-export the swf, it doesn't work correctly! I am wondering if anyone has run across the same problems with a Template Monster Flash...

Multiple definitions of a function template

Suppose a header file defines a function template. Now suppose two implementation files #include this header, and each of them has a call to the function template. In both implementation files the function template is instantiated with the same type. // header.hh template <typename T> void f(const T& o) { // ... } // impl1.cc #in...

designing business msgs parser / rewriting from scratch

I take care of critical app in my project. It does stuff related to parsing business msgs (legacy standard), processing them and then storing some results in a DB (another apps picks that up). After more then a year of my work (I've other apps to look after as well) the app is finally stable. I've introduced strict TDD policy and I have ...

Where do you find templates useful?

At my workplace, we tend to use iostream, string, vector, map, and the odd algorithm or two. We haven't actually found many situations where template techniques were a best solution to a problem. What I am looking for here are ideas, and optionally sample code that shows how you used a template technique to create a new solution to a ...

What are the coolest examples of metaprogramming that you've seen in C++?

What are the coolest examples of metaprogramming that you've seen in C++? What are some practical uses of metaprogramming that you've seen in C++? ...

Web Design Tool for Web Developer

I would like to see if there is such a tool that allows reusable web template with components like menu and form easily applied. Basically I want to mock a very simple interface using html, to see if the navigation is working, then generate a pure XHTML/CSS for me to use on my web projects. For your information, I use Ruby on Rails. H...

D Templates: Coolest Hack

What is the coolest somewhat practical metaprogramming hack you've done or seen done in the D programming language? Somewhat practical means excluding, for example, the compile-time raytracer. ...

typedefs for templated classes?

Is it possible to typedef long types that use templates? For example: template <typename myfloat_t> class LongClassName { // ... }; template <typename myfloat_t> typedef std::vector< boost::shared_ptr< LongClassName<myfloat_t> > > LongCollection; LongCollection<float> m_foo; This doesn't work, but is there a way to achieve a si...

How does PHP do recursive function calls?

PHP (among others) will execute the deepest function first, working its way out. For example, $text = strtoupper(str_replace('_', ' ', file_get_contents('file.txt'))); I'm doing something very similar to the above example for a template parser. It looks for the tags {@tag_name} and replaces it with a variable of the name $tag_name....

What is the best way to serve static web pages from within a django app?

I am building a relatively simple django app and apart from the main page where most of the dynamic parts of the application are, there are a few pages that I will need that will not be dynamic at all (About, FAQ, etc.). What is the best way to integrate these into django, idealing still utilizing the django template engine? Should I jus...

How to embed a tag within a url templatetag in a django template?

How do I embed a tag within a url templatetag in a django template? Django 1.0 , Python 2.5.2 In views.py def home_page_view(request): NUP={"HOMEPAGE": "named-url-pattern-string-for-my-home-page-view"} variables = RequestContext(request, {'NUP':NUP}) return render_to_response('home_page.html', variables) In home_page...

How to use boost::mpl to compose policies?

I have used something like the following to compose policies for my application: The policy classes look like this: struct Policy { static void init(); static void cleanup(); //... }; template <class CarT, class CdrT> struct Cons { static void init() { CarT::init(); CdrT::init(); } static void cleanup() { CdrT:...

Is it possible to write a C++ template to check for a function's existence?

Is it possible to write a C++ template that changes behavior depending on if a certain member function is defined on a class? Here's a simple example of what I would want to write: template<class T> std::string optionalToString(T* obj) { if (FUNCTION_EXISTS(T->toString)) return obj->toString(); else return "toSt...

Creating Visual Studio Templates

I'm looking to create a Visual Studio 2008 template that will create a basic project and based on remove certain files/folders based on options the user enters. Right now, I have followed some tutorials online which have let me create the form to query the user and pass the data into an IWizard class, but I don't know what to do from th...

WPF HiercharchicalDataTemplate.DataType: How to react on interfaces?

Problem I've got a collection of IThings and I'd like to create a HierarchicalDataTemplate for a TreeView. The straightforward DataType={x:Type local:IThing} of course doesn't work, probably because the WPF creators didn't want to handle the possible ambiguities. Since this should handle IThings from different sources at the same time,...

C++: CRTP to avoid dynamic polymorphism

How can I use CRTP in C++ to avoid the overhead of virtual member functions? ...

Drawbacks to templates and the STL in C++

Are there any drawbacks to using the STL or templates. Are there any situations for which they are inappropriate. ...

Nested templates gcc compiler 4.1.2 error

I'm trying to create a template class to insulate the users from a data type. I would have preferred to use an adapter class, but the function signatures needed to change requiring a template. In the code sample below(not the actual project just a simplified version to illustrate the problem), while in the main routine I'm able to use ...

Elegant template specialization

Is there an elegant way to specialize a template based on one of its template parameters? Ie. template<int N> struct Junk { static int foo() { // stuff return Junk<N - 1>::foo(); } }; // compile error: template argument '(size * 5)' involves template parameter(s) template<int N> struct Junk<N*5> { static in...