templates

CruiseControl Themes

Does anyone know where to find CruiseControl themes? ...

How do I correctly use a std::queue as a element in a template class?

I am reasonably new to C++ and have limited experience of templates. At the moment I am trying to implement a concurrent queue based on the example provided here. I am having problems compiling it and keep getting an error stating that "ISO C++ forbids declaration of ‘queue’ with no type" even after I stripped down the code to the follow...

C++ template "deferred instantiation"

What is meant with "deferred instantiation" in C++ templates? ...

Compilation of large class hierarchy consumes lots of memory after adding boost::serialization

We needed serialization of quite large C++ class hierarchy with lots of inheritance, contraction, shared pointers, etc. I decided to use boost::serialization library. My problem is that while compilation of this library on VS 2008 cl takes over 1 GB of RAM memory. I suppose this is caused by template-based serialization in Boost. This c...

Disable web2py templates ?

Hi, i'm implementing a web app using web2py and jquery. I want to use the jquery templating plugin (http://github.com/jquery/jquery-tmpl) but the plugin uses the same notation for templates as web2py ( {{ code }} and collides with web2py templating. Is there any way i can disable web2py templating or escape the {{ and }} parts ? Than...

How to repeat similar fields in a word template?

Hello, I am delving into the realm of programmatically editing a word document based on a template. If for example, the template had a section in it for My address, and they wanted my past addresses going back 5 years, and I have moved 3 times, I will have to put in 3 addresses. Obviously the fields here are exactly the same, but I want...

STL: convoluting two unary_function arguments

Working on Windows with VS2005 and struggling to understand the error messages I'm getting. If this question has been asked before, I'm sorry. I couldn't find it. Class I'm testing: #include <functional> using std::unary_function; template<typename F, typename G> struct UnaryConvolution : unary_function<typename G::argument_type,typ...

what files in django are not necessary for using only templates?

hi, I use django templates 1.2 in my GAE app. I remember default templates in GAE were some kind of old version (0.96 or smth) and I moved to the new one. The question is - what files and directories I can delete from django folder to minimize its size - I need only templates. ...

Passing variadic class template's sub-classes to function that only accepts the base class (via parameter pack deduction/inference)

**I've gotten a few suggestions to make my function pure generic, which would work, but I'd prefer limiting the function to only accept Base and its children. Having trouble making a function that can accept arguments of a variadic template class base type, while the function will actually be called with classes that derive from Base. ...

django magic: context passed to template

Hi, There is something i don't get in django template system. I have a FileField in my model called myfile. If i pass an instance of my model to a template, i can access file.size (this is an example). Form where this variable 'size' come from?? it's not part of the FileField class as far as i know. A small test: def save(self): s...

WPF popup: how to make a reusable template for popups?

Since Popup doesn't derive from Control and doesn't have a template, how can I define a template so that all popups look the same? I need to design one that has a certain look and don't want to have to copy markup each time one is used. This seems pretty easy but I can't figure out how to do it. The Child property defines a logical tree...

Using a regex as a template with Python

I have the idea to use a regex pattern as a template and wonder if there is a convenient way to do so in Python (3 or newer). import re pattern = re.compile("/something/(?P<id>.*)") pattern.populate(id=1) # that is what I'm looking for should result in /something/1 ...

Xslt1.0: passing a node paramter rom a template to another template

I am trying to pass a node as a parameter from a named template to another named template but it doesn't work. It works in the first one, but not in the second level call. It complains about trying to convert from java.lang.String to node-set. I am using xslt1.0. Any ideas? Thanks <xsl:template match="whatever"> <xsl:call-templat...

Is std::array<T, S> guaranteed to be POD if T is POD?

I'm currently writing a C++ memory editing library and for the read/write APIs I use type traits (std::is_pod, std::is_same) and boost::enable_if to provide 3 overloads: POD types. e.g. MyMem.Read(SomeAddress); String types. e.g. MyMem.Read>(SomeAddress); (This doesn't actually read out a C++ string, it reads out a C-style string and c...

How to sum non consecutive cells in jxls template

I am creating a xls report from template that uses data obtained from the Oracle database. I have a group and a subgroup. In a subgroup I create a table that displays the PREMIUM values and then the total using: $[SUM(I18)] Because values here are consecutive this formula is converted to i.e. SUM(I18:I35). After all subgroups are dis...

Ambiguous call to templated function due to ADL

I've been bitten by this problem a couple of times and so have my colleagues. When compiling #include <deque> #include <boost/algorithm/string/find.hpp> #include <boost/operators.hpp> template< class Rng, class T > typename boost::range_iterator<Rng>::type find( Rng& rng, T const& t ) { return std::find( boost::begin(rng), bo...

template method pattern and long parameter lists in c++

After the helpful answers to my last question I started using the template method pattern for a class with a lot of different options. Without having implemented them all, my current declarations for objects of that class now look like this: pc < prg, tc, 9, 0, 4, 4, test, true, true, true, true, false, true, true, 10, 0, -1, 3, 3 > mp;...

custom template operator

Is it possible? I know about filters, but is it possible to create something like this: {% if 75 is_divisible_by 5 %} It just looks a lot nicer than: {% if 75|is_divisible_by:5 %} (this is a concept question, is_divisible_by is just an example) ...

Overloading functions not compiling

Hi guys, I am following the book C++ Cookbook from O'Reilly and I try one of the examples, here is the code: #include <string> #include <iostream> #include <cctype> #include <cwctype> using namespace std; template<typename T, typename F> void rtrimws(basic_string<T>& s, F f){ if(s.empty()) return; typename basic_strin...

Magento CSS not Loading in New Template

I have posted on the template creator's site, as well as Magento support, but no one has responded. The CSS is not loading at all on the custom theme I have installed, which is supposedly compatible with the current version of Magento. You can view the page here: shop.dearearth.net This is a fresh installation of Magento and the theme...