I have a Java project in a SVN repository, with a bunch of .java files, each of those files has a licence agreement flower box at the top of the file (I have customers which have licenced the source as well as running the product).
Is there a good way to be able to modify / maintain the licence text in one place rather than having to up...
I'm using a well known template to allow binary constants
template< unsigned long long N >
struct binary
{
enum { value = (N % 10) + 2 * binary< N / 10 > :: value } ;
};
template<>
struct binary< 0 >
{
enum { value = 0 } ;
};
So you can do something like binary<101011011>::value. Unfortunately this has a limit of 20 digits for a ...
I work in a department where people create (or select) algorithms that they implement in small-sized software to optimize some field-related objectives. Most of my colleagues know more about mathematical modelling and solvers than about programming.
I personally have a few years of experience developping C++ class templates. I pretty mu...
I was wondering if there are any source control systems that allow administrators to define custom keywords which are replaced on check in with different behaviours (i.e. similar to $Id$ or $Author$ etc.)
I'm only familiar with SVN and CVS which have a set list of keywords, but there would be applications for something like $LineNo$ or ...
The error I'm getting:
error C2664: 'v8::FunctionTemplate::New' : cannot convert parameter 1 from 'v8::Handle<T> (__cdecl *)(const v8::Arguments &)' to 'v8::InvocationCallback'
Relevant definitions:
typedef Handle<Value> (*InvocationCallback)(const Arguments& args);
template<class C> class V8ScriptClass
{
public:
template<cla...
I'm trying to read binary data to load structs back into memory so I can edit them and save them back to the .dat file.
readVector() attempts to read the file, and return the vectors that were serialized. But i'm getting this compile error when I try and run it. What am I doing wrong with my templates?
***** EDIT **************
Code:...
http://shop.auxout.com/
We're hosting the store on a virtual server for the time being. Can anyone tell me where I can edit OSComm so that the top AUX logo points to www.auxout.com?
...
Hi,
I would like to create in C++ a Notifier class that I will use in other objects to notify various holders when the object gets destroyed.
template <class Owner>
class Notifier<Owner> {
public:
Notifier(Owner* owner);
~Notifier(); // Notifies the owner that an object is destroyed
};
class Owner;
class Owned {
public:
Owned(...
I've updated my default templates in Visual Studio for classes, interfaces, code files, etc. I removed the default namespaces and added a copyright header blurb.
Is there a way to use a variable or something in the template so I don't have to zip/unzip and re-run the vs installer to change the copyright header? (I'm a consultant, the c...
I have some HTML that I got from a designer, from witch I made a "template" in an .ascx Web User Control about like below. Now I would like to put it into a library.
How can I do this in a nice way (Without concatenating strings etc.)
(There should be more parameters)
<div style="clear:both;margin-top:50px;"></div>
<div>
<div cla...
The .net EventHandler is limited to Templates that inherits from EventArgs. How is that done? The implementation (Got to refference in vs) shows the following code:
[Serializable]
public delegate void EventHandler<TEventArgs>(object sender, TEventArgs e);
But i think TEventArgs is just a name. How can I write a typed delegate that is...
I'm playing around with TMP in GCC 4.3.2's half-implementation of C++0x, and I was wondering if there was a way to somehow do the following:
template <char x, char... c>
struct mystruct {
...
};
int main () {
mystruct<"asdf">::go();
}
It obviously won't let me do it just like that, and I thought I'd get lucky by using user-defin...
Hi, I'm a little lost in how to cast templates. I have a function foo which takes a parameter of type ParamVector<double>*. I would like to pass in a ParamVector<float>*, and I can't figure out how to overload the casting operator for my ParamVector class, and Google isn't helping me that much. Does anyone have an example of how to do th...
Tumblr uses a very simple template language for it's themes:
{block:Text}
<li class="post text">
{block:Title}
<h3><a href="{Permalink}">{Title}</a></h3>
{/block:Title}
{Body}
</li>
{/block:Text}
Start.io also uses the same format:
<html>
<head>
<title>{Name} @ start.io</title>
</h...
I am binding an ObservableCollection to a ListBox in Silverlight. The list can contain multiple Person or Vehicle objects which both derive from DomainObject. I would like to be able to have a different template for Person and Vehicle, but show them both in the same list. What is the best way to do this?
...
Hi guys,
Does anyone have any ideas on how I can remove the focus rectangle from a silverlight textbox? (I'm talking about the blue rectangle that appears when you click on the texblock to start typing)
I'm looking through the default style and template for the textbox but can't seem to figure out which element to tweak.
Thanks!
...
I have a table with a smallint column that contains percentages as whole numbers (i.e., 50, 75, 85, etc.)
When I divide this column by 100, as in
SELECT MY_COLUMN/100 AS PCT_AS_FRACTION
FROM MY_TABLE
the result is rounded to the nearest whole number.
For example, for a row that contains the number "50", I get zero as my result.
I ca...
I would like to know if there is a good source of documentation for creating Asp.Net Templated Databound Controls or code samples for simple controls.
All the documentation I have seen on the net seems way too complex. Is there a place where it is explained in a simple and easy to understand manner ?
I could also be interested in text ...
Hi,
In my new project i am building a data management module.I want to give a simple template storage type to upper layers like
template<typename T>
class Data
{
public:
T getValue();
private:
boost::numeric::ublas::matrix<T> data;
}
My aim is, to change allocator of data with some different allocators like Boost.inter process...
I'm currently having a discussion about the choice between php as a template engine versus a template engine on top of php.
What is your choice, and why?
I say, why another template engine, if php is an template engine itself.
...