I understand Subsonic 3.0 is the latest and greatest, and I understand Subsonic 3.0 has T4 templates.
But Subsonic 3.0 is not backwards compatible with Subsonic 2.2, meaning, my project with hundreds of code files written in the subsonic 2.2 query language will not work in Subsonic 3.0.
So my question: Is there t4 templates someone ...
Hello! Does somebody know where I can find a sample of shader (HLSL / CG / GLSL / Backend-independent) class?
Of course, standard API (like D3DXEffect or same in GL) exists, but it's kind of ugly and not what I'm looking for.
I'm looking for a high-quality interface design, not "just yet another implementation sample".
Ideally someth...
Hi all,
I have a situation where I've overrided the admin_change.html template for a given model. I've created a file such as:
/myproject/templates/admin/myapp/mymodel/change_form.html
Then, in the overrided change_form.html template, where I am editing an existing object instance, I want to have access to that model instance varia...
Hi everybody,
I am developing the design of an application and I thought I might apply some sort of the Visitor design pattern, but it turned out that it's not exactly what I am looking for. Maybe someone can point me to the variant I require in this case?
Much of my code has a template argument "ContainerType" like
template <class Co...
Recently, I ran into mustache which is claimed to be Logic-less template.
However, there is no explaining why it is designed in Logic-less way. In another word, what's the advantage of Logic-less template?
...
Ignore this question, just found a mistake in my code, flag to delete it
This is from "Templates - the complete guide" ch. 19.2
Compound types are types constructed from other types. Simple compound types include plain types, pointer types, reference types, and even array types. They are constructed from a single base type. Class types ...
Hey
I'm creating a small service, which needs to have ability for custom themes. I like the way Tumblr handles them, and would like to know, if it's legal to just plain copy their way.
{Block:Post}
{Block:Title}<h1>{Title}</h1>{/Block:Title}
{/Block:Post}
Does someone know something about this? Would it be bad reputation?
Martti ...
template<typename T>
class A {
public:
A(T b) : a(b) {
}
private:
T a;
};
A object(12); //Why does it give an error?
Why can't the type T be deduced from the argument 12 automatically?
...
template<class T>
struct IsFunc
{
typedef char one;
typedef struct
{
char dummy_[2];
} two;
static one f(...);
static two f(T (*)[1]);
enum {value = (sizeof(f<T>(0)) == 1)};
};
And if I try to run it in main:
void functionA();
int _tmain(int argc, _TCHAR* argv[])
{
int a = 0;
...
In c++ we can write:
#include <iostream>
class Base1
{
public: void test() { std::cout << "Base 1" << std::endl; }
};
class Base2
{
public: void test() { std::cout << "Base 2" << std::endl; }
};
template<class T>
class Derived: public T
{
};
int main()
{
Derived<Base1> d1;
Derived<Base2> d2;
d1.test();
d2.test()...
Hi,
I installed Windows Phone Developer Tools.
I can create the projects with Blend 4 or VS Express Edition.
I want to use the templates in Visual Studio 2010 Pro.
I can see the Windows Phone Game Template under XNA Studio but the other main templates are missing.
I can see them at this directory:
C:\Program Files (x86)\Microsoft Visu...
I'm writing a "PersonalVec" template class - a vector with other qualities.
As a template class, i've implemented everything in the .hpp, as follows:
#ifndef PERSONALVEC_HPP_
#define PERSONALVEC_HPP_
#include <vector>
#include <iostream>
#include <string>
#include <algorithm>
#include <ctime>
#include <cstdlib>
#include <cassert>
usi...
Maybe my Google-fu just isn't strong enough.
Using GCC 4.4.3, I've got a set of classes like this:
template <typename storage_t, typename index_t = std::size_t, typename
leaf_payload_t = std::size_t>
struct btree_node {
public:
typedef btree_node<storage_t, index_t, leaf_payload_t> this_t;
typedef boost::shared_ptr<this...
Hi,
I need to adapt a two parameter template to a one parameter template.
I would like to bind the first parameter of a template:
template<class T1, class T2>
struct Two_Parameter_Template {
// Two ctor's
Two_Parameter_Template() { };
template<class Param>
Two_Parameter_Template(Param) { /* ... */ }
};
by using antoher ...
I am having a hard time determining if data passed into the jquery template exists and is false without getting errors. This is what I am using to test
<html>
<head>
<title>jQuery Templates {{if}} logic</title>
</head>
<body>
<p id="results"></p>
<p>How do you test if the Value exists and is false?</p>
<script id="testTemplate" type="...
template<typename T>
class CompoundT { // primary template
public:
enum { IsPtrT = 0, IsRefT = 0, IsArrayT = 0,
IsFuncT = 0, IsPtrMemT = 0 };
typedef T BaseT;
typedef T BottomT;
typedef CompoundT<void> ClassT;
};
template<typename T, size_t N>
class CompoundT <T[N]> { // partial special...
I have the following test code
#include <iostream>
template <typename T>
struct PS
{
template <typename U>
static void foo()
{
std::cout<<"Some test code";
}
};
template <typename T>
void bar()
{
PS<T>::template foo<T>(); //won't compile without `::template`
}
int main()
{
bar<int>();
}
ISO C++03 14.2/4: sa...
For reviewing, we'd like to be able to print a wiki page with line numbers. The ideal solution would be where we could create a template which adds line numbers (when printing - or possibly all the time) which we could then include on any page for reviewing.
...
Hi, I tried to bind data to a template created using GroovyPagesTemplateEngine, but cannot.
Here is what I can as far I can go. Could some one help? Thanks!
import org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine
import org.springframework.core.io.FileSystemResource
File myfile = new File("c:\\myTools\\mydata.gsp")
def ...
Hey all , I want to put a flash file in the bottom of the page like this site
I used margin property & Padding but it doesn't look well .
I need the code to put it in the bottom of the page
thanks in advance .
...