Tag Archives: template

Fast generic c++ algo app technique

 

Fast generic c++ algo api technique

generic template programming could be one if the fastest ways to build out algo api computations. There is no state to maintain here

http://www.codeproject.com/Articles/828776/Generic-Memoization-Infrastructure

 

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Battlefin is sharing a free fund template for download for potential a new start up quant and hedge fund

battlefin-presentation-deck template

I just got this from a Linked IN member. He is giving back with this neat template from BattleFin. I wish I could goto this FREE Matlab Computational Finance event in NYC.Thanks to him for sending.

 

 

Thanks for setting up that awesome Deltix webinar! Your stuff just keeps getting better! It the spirit of giving back, Battlefin is sharing a free fund template (attached)
                    (I don’t think I ever sent you this, but let me know if I’m wrong) I know your not there yet, but it’s still educational to view what investors may feel is important.

   Best regards,

 

   PS: Got the Matlab all day conference at the Marriott in Times Square today. It should be fun.

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Joomla sites almost ready to go with further customization and template fixing

Joomla sites almost ready to go with further customization and template fixing

I am very excited to see the reaction of these new sections with added functionality!!

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

C++ template job interview questions you can expect include errors and macro differences

C++ template job interview questions you can expect include errors and macro differences

This is a typical template function:
template
T sum(T* arr, int num){
T sum=0;
for(int i=0;i
T min (T i, T j)
{
return i < j ? i : j; } Below will generate errors: template
int Product (T1 a, T2 b, T3 c)
{
return a * b * c;
}

The class parameter arguments need to be separated by commas versus semi colons. Also, the function Product needs to return the class not int. To correct, do:

Tutorial Example:
template
T GetMin (T a, U b)
{
return (a NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

C++ Interview questions on template programming with code samples

C++ Interview questions on template programming with code samples

Template:

Write a template function?
template
T sum(T* arr, int num){
T sum=0;
for(int i=0;i
class Foo {
Foo(T t) t_(t) { t.baz(); } //baz may not exist, but the compiler does not know that till instantiation
void bar() //Notice the
T t_;
};

int main() {
return 1;
}
ahh, I misunderstood the question… Jasmeet is right. non template parameter syntax errors are issues. (aka missing semi colon), it should also be noted that these are also only issues if the template is included somewhere.. aka, if template is in a header that is not “included” (#include…) anywhere, it will not complain. (though that might be a given)

What is difference between template and macro??
There is no way for the compiler to verify that the macro parameters are of compatible types. The macro is expanded without any special type checking.
If macro parameter has a postincremented variable ( like c++ ), the increment is performed two times.
Because macros are expanded by the preprocessor, compiler error messages will refer to the expanded macro, rather than the macro definition itself. Also, the macro will show up in expanded form during debugging.
for example:
Macro:
#define min(i, j) (i < j ? i : j) template: template
T min (T i, T j)
{
return i < j ? i : j; } template
int Product (T1 a, T2 b, T3 c)
{
return a * b * c;
}

What is the error in the sample code above?

I think that:
template Should use , not ; between the types here

Tutorial Example:
template
T GetMin (T a, U b)
{
return (a NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!