function

Function template in non-template class

Hi, I'm sure that it is possible but I just can't do it, which is: How can I define function template inside non-template class? I tryied something like this: class Stack_T { private: void* _my_area; static const int _num_of_objects = 10; public: /* Allocates space for objects added to stack */ explicit Stack_T(size_t); /* Puts object o...

Php exit function question

I have noticed a behavior in PHP that makes sense, but I am unsure how to get around it. I have a long script, something like this <?php if ( file_exists("custom_version_of_this_file.php") ) { require_once "custom_version_of_this_file.php"; exit; } // a bunch of code etc function x () { // does something } ?> Interestin...

problem with Excel automation function

hi folks, i´m programming a vsto add-in combined with an automation add-in in VB.NET using MS Visual Studio 2008. The automation add-in is activated in excel and registered at the system. basically the automation add-in running very well, when you call the function with "=<function-name>(<argument1>;<argument2>;...;<argument-n>)" by w...

Some questions about Function point

Hi, I try to learn how to use Function Point analysis, however, there are questions that i can't answer. Hopefully, stackoverflow and you guys out there can help me answer those questions. According to the IFPUG manual, the menu is not counted. However, if we can perform some functions, which do not invoke a dialog, via the menu, then...

strange function definition in Scilab<->C interface

Hi there, I'am talking about this example of a Scilab<->C wrapper: http://www.scilab.org/doc/intro/node89.html. The strange part is this one: int intsfoubare(fname) char *fname; { ....(some code) } It is some kind of function defintion but I really don't understand what the char *fname is good for also just fname as par...

image editing function

Hiya, I've created a function to overlay text onto images, but I'm scratching my head to find a way of outputting the image in a way in which it can be utilised within another script or outputted to the screen. I can call this function from a php script, passing it the image and the text to use, but when the function returns the data ...

How do I use externalInterface to allow Flash to call javascript to update a value on the screen?

I have a Flash movie that is embeded in a PHP page. The PHP page displays a value to the user (the number of images they have uploaded). When the user uploads a new image I want the value on the PHP page to reflect the change without refreshing the page. This value is retrieved from database using MySQL. So heres what Ive done so far - ...

How can I assign the output of a function to a variable using bash?

I have a bash function that produces some output: function scan { echo "output" } How can I assign this output to a variable? ie. VAR=scan (of course this doesn't work - it makes VAR equal the string "scan") ...

How to get the maximum of more than 2 numbers in Visual C#?

I have an array of five numbers and an array of 2 numbers. How would I find out the largest number among these 7 numbers? Is there a method that can make things easier? ...

MySQL: CAST requires no space before parenthesis?

In MySQL 5.1, why won't this SQL work correctly? SELECT CAST (20091023 as date); [I've just figured out the answer to this question myself-- and I'll answer it myself below-- but the behavior was so odd that I wanted to capture it as a StackOverflow Q&A pair so others won't waste time on the same problem.] ...

What is difference between "function" and "function!" in VIM?

I beheld quite a few usage of "function!" in others vimrc files, but there is no easy-to-find documentation of "function!". What's the difference between "function" and "function!"? ...

jQuery: inherit functions to several objects

hi, i made several table-based-widgets (listview-kind-of) which all have the same characteristics: styling odd/even rows, hover on/off, set color onClick, deleting a row when clicking on trash-icon. so it's always the same (prototype-)code for each widget. is there a way to have the code only once then simply apply/inherit it to all wi...

Declare a Function in PHP Using a String?

Invalid code: $functionName = 'sayThis'; function $functionName($string) { echo $string; } Can I do anything like this? ...

Check if_parent and if_child in Wordpress

I need to create a function for WP that will check if the current category is both child of X category and parent to Z category. Ideas? ...

calling jquery function & passing variable

Hiya Not really much of a JS man - so can anyone explain why this isn't working? I want to call a predefined function in one script from my simple AJAX script - I just want it to call the qtip functionality upon the contents of the div brought into the page via AJAX. Thanks, H SCript 1 - AJAX loader if(myHttpRequest.readyStat...

Why can't I save an object's methods as properties of another object literal

The code below is used to note some methods to run in particular circumstances so they can be called using a simpler syntax. var callbacks = {alter: SPZ.sequenceEditor.saveAndLoadPuzzle, copy: SPZ.sequenceEditor.saveAsCopyAndLoadPuzzle, justSave:SPZ.sequenceEditor.saveAndLoadPuzzle}; But the code keeps retu...

HLSL DirectX9: Is there a getTime() function or similar?

Hi all. I'm currently working on a project using C++ and DirectX9 and I'm looking into creating a light source which varies in colour as time goes on. I know C++ has a timeGetTime() function, but was wondering if anyone knows of a function in HLSL that will allow me to do this? Regards. Mike. ...

storing value in an array and passing that array to a js function.

hi friends, This is a code from my c# web application <% var text = File.ReadAllText(@"D:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\test.html"); Regex regex = new Regex("href\\s*=\\s*\"([^\"]*)\"", RegexOptions.IgnoreCase); MatchCollection matches = regex.Matches(text); //Response.Write...

(Delphi) Call DLL with function pointer parameter

Hi everyone ! I'm stuck with calling an external DLL and passing a function (pointer) as parameter. I've recently had different problem of passing some arguments to DLL and you helped. Hope, someone know how to do this as well.... Here's function declaration in DLL (cpp) that needs to be called from Delphi: typedef void (*PTR_Alloca...

Big performance difference (1hr to 1 minute ) found in SQL. Can you explain why?

The following queries are taking 70 minutes and 1 minute respectively on a standard machine for 1 million records. What could be the possible reasons? Query [01:10:00] SELECT * FROM cdc.fn_cdc_get_net_changes_dbo_PartitionTest( CASE WHEN sys.fn_cdc_increment_lsn(0x00)<sys.fn_cdc_get_min_lsn('dbo_PartitionTest') THEN sys.fn_...