Thank you one and all.
I have an PHP MVC framework that uses XSLT for the templates. I have registered some php functions with the template to allow the use of modules in the template. This allows us to call modules at need be instead of running all the modules first regardless if you need them all.
The problem is the fact some (most, ...
I'm wondering if it is necessary to reinterpret_cast in the function below. ITER_T might be a char*, unsigned char*, std::vector<unsigned char> iterator, or something else like that. It doesn't seem to hurt so far, but does the casting ever affect how the bytes are copied at all?
template<class ITER_T>
char *copy_binary(
unsigned ch...
I'm writing a template engine (something that will add data to a template to produce a document, like that used in Active Server Pages or JavaServerPages or PHP - or even shell/bash scripts, ant or Word form letters).
Some examples:
${yourVariableHere}
<TMPL_LOOP NAME=EMPLOYEE_INFO>
<%= toStringOrBlank( "expanded inline data " + 1 ) %>...
Good Morning All,
I've been a PHP programmer for quite some time, but I've felt the need to move more towards the Python direction and what's better than playing around with Django.
While in the process, I'm come to a stopping point where I know there is an easy solution, but I'm just missing it - How do I display manytomany relationsh...
I need to do this in order to create a dynamic background brush for a custom control (inherits ContentControl). My custom control has two dependency properties: StartColor and EndColor. In the control template for the custom control, the control is wrapped in a border that's background is a RadialGradientBrush with gradient stops. one gr...
I downloaded and installed the SubSonic MVC templates. I'm able to create a new project from this template and the 'prewritten' views work fine. I'm able to edit records from the Artist table of the included 'Chinook' database.
So now I'd like to get this to work with MY database. Here's what I've done.
Changed to connectionstring in...
With MVC 2's addition of the HtmlHelper EditorFor() it is not possible to create strongly typed Display and Editor templates for a given Model object and after fiddling with it I am a bit stumped as to how to pass additional Model data to the editor without losing the strong-typing of the editor control.
Classic Example: Product has Cat...
App_1 has a view and a template for this view. It would like to "aggregate" information into this view from other sources (i.e. other apps), without having to add or change anything itself. Perhaps App_2 wants to put "hello world" into this designated area in App_1's view. What is the best way of achieving this?
Signals come to mind nat...
What does the word 'Template' mean when talking about ASP.NET?
For example I have heard about Page template, item template, etc.
What are they?
...
Consider:
template <typename T>
class Base
{
public:
static const bool ZEROFILL = true;
static const bool NO_ZEROFILL = false;
}
template <typename T>
class Derived : public Base<T>
{
public:
Derived( bool initZero = NO_ZEROFILL ); // NO_ZEROFILL is not visible
~Derived();
}
I can't compile...
Hy,
I want to display a certain part (a div for example) of my wicket-template only under a certain condition (for example only if I have the data to fill it). The problem is:
If I only add the panel (filling the div) if I got the data, an exception is thrown every time I call the page without the data (because the referenced wicket-id ...
In Jinja2, I have a base template like this:
<title>{% block title %}{% endblock %} - example.com</title>
[...]
<h1>
{% block title %}{% endblock %} - example.com
</h1>
Jinja2, then, fails with the following message:
lines = [self.message, ' ' + location]
: block 'title' defined twice
It must be now evident as to what I am t...
For example:
{{test|linebreaksbr|safe}}
...
Hi,
I'm looking how to do the best something like a UserControl in ASP.NET in Django.
For example:
1) There's a Book model defined
2) There's a regular representation of the book which I want to use all over my site (called "book_template.html").
Now let's say I want to use this one representation from 2 views: recent_books_view, pop...
I'm trying create a class which adds functionality to a generic class, without directly interfacing with the wrapped class. A good example of this would be a smart pointer. Specifically, I'd like to create a wrapper which caches all the i/o for one (or any?) method invoked through the wrapper. Ideally, the cache wrapper have the follo...
I have a matrix class with the size determined by template parameters.
template <unsigned cRows, unsigned cCols>
class Matrix {
...
};
My program uses matrices of a few sizes, typically 2x2, 3x3, and 4x4. By setting the matrix size with template parameters rather than run-time parameters allows the compiler to do a lot of inlinin...
I am now doing an application that shows the HDD usage in the system. For that I want to generate the grid and the controls (like progress bar and labels) dynamically to show the usage. Is there any XAML template available for this purpose?
...
I have a template function where the template parameter is an integer. In my program I need to call the function with a small integer that is determined at run time. By hand I can make a table, for example:
void (*f_table[3])(void) = {f<0>,f<1>,f<2>};
and call my function with
f_table[i]();
Now, the question is if there is some aut...
I'm working on a plugin framework, which supports multiple variants of a base plugin class CPlugin : IPlugin. I am using a boost::shared_ptr<IPlugin> for all reference to the plugins, except when a subsystem needs the plugin type's specific interface. I also need the ability to clone a plugin into another seprate object. This must return...
I'm having trouble deciding whether not this code should compile or if just both compilers I tried have a bug (GCC 4.2 and Sun Studio 12). In general, if you have a static class member you declare in a header file you are required to define it in some source file. However, an exception is made in the standard for static const integrals. ...