templates

Is there any kind of template engine in VB?

Is there any kind of template engine in VB? Something akin to Apache velocity or Freemarker? My goal is to be able to dynamically generate sql statement criteria for an MS Access application based on form input, with something more powerful than string cats. ...

Templated operator<< explicit instantiation and header

Typically for my templated classes, I include declarations in a .hpp file and templated implementation code in a .t.hpp file. I explicitly instantiate the class in a .cpp file: template class MyClass< AnotherClass >; whose object code gets put in a library. The problem is that if I try to print the object with operator<<, which is de...

heredoc for Windows batch?

Is there a way of specifying multiline strings in batch in a way similar to heredoc in unix shells. Something similar to: cat <<EOF > out.txt bla bla .. EOF The idea is to create a customized file from a template file.. ...

C++ Shared Library with Templates: Undefined symbols error

I'm trying to link to a shared library with a template class, but it is giving me "undefined symbols" errors. I've condensed the problem to about 20 lines of code. shared.h template <class Type> class myclass { Type x; public: myclass() { x=0; } void setx(Type y); Type getx(); }; shared.cpp #include "shared.h" template <cla...

How to use Comparer for a HashSet

As a result of another question I asked here I want to use a HashSet for my objects I will create objects containing a string and a reference to its owner. public class Synonym { private string name; private Stock owner; public Stock(string NameSynonym, Stock stock) { name=NameSynonym; owner=stock } //...

Where can I go for free design / templates for a web app?

I have started to code a web app for small businesses, and I have some trouble with the page design. I know the layout that I want, and I can code it fine, but I have always been hopeless at choosing colours / co-ordinating the elements on the page. I am wondering if there are any sites that provide free templates specifically for we...

ASP.net Page object null when invoking it from within templated control

Hi, I created a control that uses an ITemplate internally in order to allow the user to add its own stuff. <my:MyControl id="myControl" runat="server"> <Content> //some stuff in here </Content> </my:MyControl> The "Content" property is the template. (This is just simplified. This construct is within a larger control). ...

is it possible to put the template of a component in an other folder then the template folder in Symfony

I have a component that calls a template from the template folder as it should be done. But as there are a lot of files in the template folder i would rather have them split up in different sub folders. Is it possible to call a template in a specific folder for a component? And how is this done? now i have public function executeTest(){...

alloca() of a templated array of types: how to do this?

I have a smart pointer type, and would like to construct an object that takes a pointer of that type and a count (dynamically calculated at runtime) and allocates enough memory from the stack to hold that many instances of the object the smart pointer points to. I can't seem to find quite the right syntax to achieve this; is it possible?...

Useful Eclipse Java Code Templates

You can create various Java code templates in Eclipse via the Window->Preferences->Java -> Editor -> Templates e.g. sysout is expanded to: System.out.println(${word_selection}${});${cursor} You can activate this by typing sysout followed by CTRL+SPACE What useful Java code templates do you currently use? Include the name and des...

How to Deal With Codeigniter Templates?

I'm fairly new to MVC framework and found codeigniter recently. I'm still learning everyday but one problem is it's template engine. What is the best way to create it's template? CakePHP comes with it's own template library so how to the same with codeigniter? ...

Open template files in Dreamweaver

How do I open up the template files in Dreamweaver, without having to go through all the "open with" process? I've had problems getting this to work properly in Vista 64-bit, but have had this working in prior versions of Windows, so I know it's possible. I'm working with CakePHP, so it uses the "ctp" extension, but I'm sure other frame...

When to use a Templating Engine in Python?

As a "newbie" to Python, and mainly having a background of writing scripts for automating system administration related tasks, I don't have a lot of sense for where to use certain tools. But I am very interested in developing instincts on where to use specific tools/techniques. I've seen a lot mentioned about templating engines, includ...

Printing on a template form

Hi, I have a template form (paper form) that I want my application to print on but I want the printer to print at specific places on the form. I am not sure how to do it in C# so I can tell the application (or webform) to print at a specific position. Any idea how to do that? Thanks for the help ...

template-ing a for loop in C++?

First time poster, be gentle! I have a C++ snippet below with a run-time for loop, for(int i = 0; i < I; i++) for (int j = 0; j < J; j++) A( row(i,j), column(i,j) ) = f(i,j); The snippet is called repeatedly. The loop bounds 'I' and 'J' are known at compile time (I/J are the order of 2 to 10). I would like to unroll the loop...

HTML templates in NetBeans

Is it possible to do template layouts which you can assign to all your pages within NetBeans. (The equivalent to Dreamweaver templates) Please note this is a PHP Project Thanks in advance! Any takers on this one? ...

Django template timezone in :date filter - is abbreviation possible?

If I write {{some_time|date:"h:i A T"}} in a django template, it outputs "12:00 AM Eastern Daylight Time". I would prefer the short timezone format "EDT". Any way you can do this? ...

generate mpl::vector from fusion::vector

How to generate fusion::vector from mpl::vector? How to generate mpl::vector from fusion::vector? BOOST_MPL_ASSERT((is_same< fusion::vector<int, char>, generate_fusion_vector<mpl::vector<int, char> >::type >)); BOOST_MPL_ASSERT((is_same< mpl::vector<int, char>, gen...

C++ - Generic programming - Type selection

The following fragment returns the next highest power of two for an (assumed unsigned) integer of type T. It does this by shifting the bits repeatedly. For all intents and purposes the unsigned type i used in the bit shifting loop is sufficiently large to represent a (nominally) 65536 bit number. Practically therefore it's fine to lea...

Why is the C++ STL is so heavily based on templates? (and not on *interfaces*)

I mean, aside from its obligating name (the Standard Template Library)... C++ initially intended to present OOP concepts into C. That is: you could tell what a specific entity could and couldn't do (regardless of how it does it) based on its class and class hierarchy. Some compositions of abilities are more difficult to describe in this...