templates

Microsoft Dynamics CRM -- Do people build websites with it?

Forgive my ignorance, but do people build websites with Microsoft Dynamics CRM? I have a potential client who says that is the technology they will use for a new web project, for which I would be doing the HTML templating. I want to learn all I can as I am new to this particular system, but I can't seem to find anything related to web b...

Debugging C++ Templates in Linux/TotalView.

Debugging code in TotalView. Can not step into local templatized code (STL code can be stepped into). Looking for the correct flags/mechanism that is missing so that I can enable debugging for my templatized code. ...

Will the template argument's destructor to a templated class be called on deletion?

If you have a templated base class as in the following example: class A{ public: A(); virtual ~A(); }; template <class T> class B : public T { public: B(); virtual ~B(); }; typedef B<A> C; class D : public C { public: D(); virtual ~D(); }; When you delete an instance of D, will the destructor of A be ...

Spring-samples don't understand the templates

Could please anybody explain to my how the templates work ? Can't find any info about it, there is no README, nothing. Is it supposed to be some kind of maven archetype or what ? https://src.springframework.org/svn/spring-samples Thank you ...

Can I edit cocos2d-iphone template (v 0.99.2)

hey, I am new to iPhone development. I am using cocos2d 0.99.2 templates with xcode. Is it possible for me to make changes to these templates, like removing comments or adding some code? ...

Python templates for huge HTML/XML

Hello, Recently I needed to generate a huge HTML page containing a report with several thousand row table. And, obviously, I did not want to build the whole HTML (or the underlying tree) in memory. As result, I built the page with the old good string interpolation, but I do not like the solution. Thus, I wonder whether there are Python...

calling template function without <>; type inference

Hi, if I have a function template with typename T, where the compiler can set the type by itself, I do not have to write the type explicitely when I call the function like: template < typename T > T min( T v1, T v2 ) { return ( v1 < v2 ) ? v1: v2; } int i1 = 1, i2 = 2; int i3 = min( i1, i2 ); //no explicit <type> but if I have a ...

Set background color for a field depending on its value

I have a Customer table and one of the fields here is for Status....I want to have the background colour of the cell containing this field to be set according to it's value e.g green for the status "Closed"; yellow for the status "Pending" and so on. What's the best way to do this...possibly something that'll be easy to modify if need ...

template function roundTo int, float -> truncation

Hi, according to this question: http://stackoverflow.com/questions/2833730/calling-template-function-without-type-inference the round function I will use in the future now looks like: template < typename TOut, typename TIn > TOut roundTo( TIn value ) { return static_cast<TOut>( value + 0.5 ); } double d = 1.54; int i = rountTo<...

MOSS: Creating site templates from publishing sites

Hi, On my MOSS site I am trying to save a publishing site as a site template. Then create subsites from this template. I am able to sucessfully create the site template and it is populated in the site template gallery. Following these instructions.. http://blah.winsmarts.com/2007-7-All_you_ever_wanted_to_know_about_SharePoint_2007_Site...

Django url and request GET in template

Hey, I am using "url" tag in my template and everything works fine, except I cant capture anything thats behind it. Since I have multiple filters on that page, that are kept via GET request in the url, I need to be able to apend them to it. What happens is, that when I select one filter url will change to some/url/?f=1, then when I sele...

Type parameterization in Scala

So I'm learning Scala at the moment, and I'm trying to create an abstract vector class with a vector-space of 3 (x,y,z coordinates). I'm trying to add two of these vectors together with the following code: package math class Vector3[T](ax:T,ay:T,az:T) { def x = ax def y = ay def z = az override def toString = " found : T r...

how to templatize partial template specializations?

I'm not even sure what title to give this question; hopefully the code will demonstrate what I'm trying to do: #include <string> #include <list> using namespace std; template<typename A> class Alpha { public: A m_alpha_a; }; template<typename B> class Bravo { public: B m_bravo_b; }; template<> class Alpha<string> { public: string m_al...

The default DisplayTemplates views of ASP.NET-MVC2 are not compiled

Some of the default DisplayTemplates and EditorTemplate views of ASP.NET-MVC2 are not compiled. Why and what to do you do to get them fixed. ...

template warnings and error help, (gcc)

Hi there, I'm working on an container class template (for int,bool,strings etc), and I've been stuck with this error cont.h:56: error: expected initializer before '&' token for this section template <typename T> const Container & Container<T>::operator=(const Container<T> & rightCont){ what exactly have I done wrong there?. Also n...

left-hand operand of comma has no effect?

Hello there, I'm having some trouble with this warning message, it is implemented within a template container class int k = 0, l = 0; for ( k =(index+1), l=0; k < sizeC, l < (sizeC-index); k++,l++){ elements[k] = arryCpy[l]; } delete[] arryCpy; this is the warning i get cont.h: In member function `void Container<T...

allocating extra memory for a container class.

Hey there, I'm writing a template container class and for the past few hours have been trying to allocate new memory for extra data that comes into the container (...hit a brick wall..:| ) template <typename T> void Container<T>::insert(T item, int index){ if ( index < 0){ cout<<"Invalid location to insert " << index << endl...

How to loop through a boost::mpl::list?

This is as far as I've gotten, #include <boost/mpl/list.hpp> #include <algorithm> namespace mpl = boost::mpl; class RunAround {}; class HopUpAndDown {}; class Sleep {}; template<typename Instructions> int doThis(); template<> int doThis<RunAround>() { /* run run run.. */ return 3; } template<> int doThis<HopUpAndDown>() { /* hop ho...

How to call a templated operator overload without using the word 'operator'?

class RunAround; class HopUpAndDown; class Sleep; template<typename Acts> int doThis(); template<> int doThis<RunAround>() { /* run run run.. */ return 3; } template<> int doThis<HopUpAndDown>() { /* hop hop hop.. */ return 2; } template<> int doThis<Sleep>() { /* zzz.. */ return -2; } struct Results { template<typenam...

"Ambiguous template specialization" problem

I'm currently porting a heap of code that has previously only been compiled with Visual Studio 2008. In this code, there's an arrangement like this: template <typename T> T convert( const char * s ) { // slow catch-all std::istringstream is( s ); T ret; is >> ret; return ret; } template <typename T, typename T2> T...