templates's questions - English 1answer

39.922 templates questions.

F‌irst of all, sorry for my bad english. I started to use the Dream Template and I added some changes on the template files and in the custom.css to make the site like I want to. But I am facing a ...

In Xcode 9, when you create a folder it creates a folder in the file system, too. So you don't need to create folder for each group manually. I have a custom Xcode project template which generates a ...

I'm making an HTML Templating Engine. The program goes through the HTML, and finds all instances of {{ }}. It then goes through all the keys in our countroller, and replaces instances of variable ...

I want to check if a type is instantiation of a particular template during compilation. For example: std::vector<int> is instantiation of std::vector std::array<int, 5> is instantiation ...

I want to add some value in an input field with jQuery in my Smarty tpl file. If the hostname input field is left blank and you hit the order button it should add an general domain name to the input ...

I want to change the default Testtemplate from PHPUnit when creating a testclass using the PHPUnit wizard. The current one is the following: class CustomClassTest extends ...

I am greatly confused about designing an email template for a mailchimp campaign. I want to know if I can use a div with a class of "Container" on my email template. Is using div tags supported by all ...

Introduction I am writing tests on Eigen matrices using Google's testing framework Google-Mock, as already discussed in another question. With the following code I was able to add a custom Matcher ...

I have created some layouts and added in home.blade.php, when i view it in browser some space is added whenever i include the layouts! here is my home.blade.php <!DOCTYPE html> <html ...

When I click and enter the page admin/index.xhtml the error is displayed: HTTP Status 500 - Internal Server Error Error Parsing /WEB-INF/templates/template.xhtml: Error Traced [line: 22] The element ...

The question is about JS template engine: JavaScript Templates https://github.com/blueimp/JavaScript-Templates How create an unique id for each generated html elements using the for loop variable? ...

I have a class, something like BizClass below. I'd like to define a templated function and a specialization for a particular concrete type. I'm not sure of the appropriate syntax. template <class ...

Is it possible to deduce template value (not type) for a c++17 function? The function foo: template<int I> int foo() { return (I); } Can be called via: foo<5>(); And will return 5....

I have my site built with bootstrap. I want to create a div with data stored in a JSON file and rendering with mustache. I have the script inside the HTML for mustache template: <script id="plutos"...

привет, задача проста - выбросить \<\script\>console.log('hello world'); \<\/script\>\ в страницу при наступлении события OnPageStart. Как правильно это сделать? Пробовал что-то ...

:) I have made a Wordpress site, which I have migrated from local to a server. I have created a one pager with images in the bottom that links to the different post of my site. I have used the plugin ...

Some Background: I'm working on putting together a templated class which, as part of template specialization, deduces a type to use for one of its members. This data member needs to support being ...

I made a solution template to use with Visual Studio 2015. My problem is that all the projects are contained in the same folder, but I need to separate them in 2 folders. For example, one for my Own ...

I'm trying to use inheritance with variadic templates. First, consider the following snippet as a skeleton I'd like to build upon. #include <type_traits> #include <iostream> template <...

I have a problem with passing parameter to class template struct Car { int id; char *model; int date; int cost; }; template <class T> class Set { private: int *a; int ...

I have a class Node with a template this is header file // node.h #ifndef NODE_H #define NODE_H #include <iostream> using namespace std; template <typename T> class Node { private: ...

I am very close to getting what I want, but I don't like the background poking out beyond the border on the corners. Can anyone point me to the right way to style the background to also round the ...

I want to create a repository with template. Since several database can share similar operations. Code like below: public interface MyRepository<T> extends MongoRepository<T, String> { ...

I have been starting with some SFINAE, but I can't quite get a handle on some of the cases that I want to use it for. For example if I have a template based class which should have different ...

In order to connect to Eduroam wifi on wicd, I added the following Eduroam file to my /etc/wicd/encryption/templates folder: name = Eduroam author = hautod version = 1 require identity *Username ...

I have written a class multi_array which is sort of an extension of std::array to multiple dimensions. template <typename T, std::size_t... N> class multi_array { template <std::size_t......

I have a directive that can have dynamic templates with expressions inside them. If I use ng-bind-html, the expression won't evaluate and if I use ng-bin-template, the HTML part will come back as ...

I instance a template and want to use that instance for other template template <typename I> class A { I name; public: A(I n){ name = n; } void show() const { cout << ...

The book "C++ primer 5" says that there are some restrictions on the expression parameter; expression parameter can be integer/enum/quote or pointer. The above is the meaning, let's take an example ...

I am trying to come up with a generic buffer (or heap container - not sure how to call it) for generic objects. So I could have a large number of them in contiguous memory. The header I did works, ...

I like using factory design pattern to inject dependencies, but that means having lots of very similar classes (almost one factory per class). Then I got to an idea to create a generic factory pattern ...

Is it possible to use template within a template, a list can be a list of anythings and a string can be a string of anythings, so can I have a list of strings of some other type, for example int? The ...

So, in template.html I use: {% if dict %} {{ s={} }} {% endif %} The error is - Could not parse the remainder: '={}' from 's={}'. How to fix it?

The following example produces this run-time error: pure virtual method called terminate called without an active exception e.g. template<class DERIVED> struct Base { int val; Base(...

I am using nodejs,express, and bootstrap. So this seems like a pretty general question, but I can't find exactly what I am looking for anywhere. I have a layout.jade file and a index.jade file, and I ...

Possible Duplicate: Can a member function template be virtual? In a base class, the function my_func is defined as virtual. However, in the derived class I would like to have my_func to be a ...

Here's a small snippet of code: template<void(*)()> struct s{}; int main() { s<+[]{}> t; } I'm trying to take the pointer to the function of the lambda. It compiles in clang but GCC ...

In Polymer, the dom-repeat template helper emits a dom-change event whenever it stamps the result of an iteration into the DOM. Is there a way for me to tell when ALL of the iterations are complete?

I am not able to pass an initializer list to a templated function, to then call a non templated function which would coerce the initializer list to a container. However, when skipping the intermediate ...

I have three files: main: #include <iostream> #include "Punkt.h" int main() { const Punkt s1(0, 1); const Punkt s2(-5, 2); std::cout << "s1 " << s1.wsp<0>() << "...

I am experimenting with C++ for Arm Cortex M micro controllers. I wrote a template class to access register with ease without any run time overhead ( inspired from here). It is working correctly, with ...

I am trying to implement an overload for operator!= that compares two objects of different types (InnerA and InnerB). Both of the types are defined as nested classes within a template class (Outer). ...

I'm building a restaurant-website. In a previous version of the site, in the mail that the restaurant gets when somebody wants a delivery, I had a link directing to google maps. Easy for the ...

It is probably easier to explain what I mean by an example. Imagine a following template: template <class... Args> std::tuple<Args...> foo(); It can be invoked, for example, like this: ...

I've got some code in which I need to forward-declare the a template class (or at least, forward-declaring would make things a lot easier for me...). I've written a simplified version of the problem I'...

I have a class with a boolean template argument. template<bool b> class Foo { void doFoo(); }; I want doFoo to do different things based on the value of b. Naively I could write Option 1 ...

I'm trying to create a template class (event class manager) that will instantiate multiple event class objects. I'm able to get it work for one class, but not able to get it work in the variadic case. ...

Consider: void* global_ptr; template<typename T> void set_global_ptr(T* ptr) { global_ptr = ptr; } int main() { int foo = 123; float bar = 456; set_global_ptr(&foo); ...

I am having some trouble passing data from 2 queries into my view. I have a blog system on which people can comment, but i want to show the blog post at the top of my comments page. To do this I ...

I'm working on a Joomla website which has been created by someone else a couple of years ago. When I try viewing the templates (Extensions > Templates > Templates) I receive the following error: ...

Related tags

Hot questions

Language

Popular Tags