A function (also called a procedure, method, subroutine, or routine) is a portion of code intended to carry out a single, specific task.
0
votes
0answers
6 views
Finding values with partial data in another worksheet - Excel
I would like to find similar data in another worksheet from partial data.
I have to worksheet - 1 contains column of data (some partial serial numbers) and would like to find similar or match or that ...
1
vote
0answers
6 views
Coffeescript: invoking function with space before parens
When I invoke a function with a space before the parens, it gives an error saying unepected ,
sum = (a, b) ->
a+b
console.log (sum (1, 2))
error: unexpected ,
console.log (sum (1, 2))
it ...
2
votes
2answers
22 views
How to pass a function as a parameter in Lua?
Bit confused by all this; so here's what I am attempting to do!
Have a def thus:
block_basic_DEF =
{
image = "button.png",
name = "basic block",
obj_table = ...
1
vote
2answers
39 views
How to calculate elapsed time of a function?
I would like to know how to calculate the time consumed for a function in Delphi.
Then I wanted to show the used time and compare it with another function or componentso as to know the faster ...
0
votes
3answers
33 views
How to pass additional parameters (besides of arguments) to a function in Python
I need to write a function (say fun1) that has one argument, because it will be used in other function (fun2). The latter requires a function with a single argument. However, I need to pass other ...
0
votes
0answers
21 views
c++: use boost range transformed adaptor with binary function
Suppose I have two std::vectors x and y and a binary function F. I would like to create a new object z (not necessarily a vector), with the property that the ith elemenent of z will be the application ...
1
vote
3answers
39 views
Can I create a function which accepts a pointer to an array which may contain a different type of numbers on each call?
I need to write a function which writes an array of "n" elements to a binary output file. I would like to avoid having to write a separate function for each type of data I may wish to write (int, ...
0
votes
1answer
30 views
Function for list elements concatenation?
I want to create a function which concatenates all the strings within a list and returns the resulting string. I tried something like this
def join_strings(x):
for i in x:
word = ...
-2
votes
2answers
47 views
PHP Read the URL Then
I'd like to know is there a function that reads the url from the browser after that running a code;
for example I've this php code:
echo "<a href='mypage.php?product=123456'>Search ...
0
votes
1answer
19 views
Changing function pointers after compilation
I am using Ogre3 to try to build a Spawner that automatically creates copies of an Enemy and drop them into the world. In addition to this, I want to save a behavior function so that when the entity ...
2
votes
1answer
51 views
How do I call special function using jQuery?
I'm trying to get a string by post method in jQuery by calling a method.
Here is my code:
$("#btn_Submit").submit(function () {
$.ajax({
type: "POST",
url: ...
0
votes
1answer
30 views
How to write the output to the text file same as output shown by show() function
May I know how to write the output to the text file same as output shown by show() function. For example when I executed this code:
p.show();
output:
(TOP (S (NP (PRP$ My) (NN name)) (VP ...
6
votes
2answers
71 views
Haskell Pattern Matching Fails on Negative Number
The Haskell compiler throws an error on the following function:
balancedMax :: Int -> Int -> Int
balancedMax -1 _ = -1
balancedMax _ -1 = -1
balancedMax a b = max a b
Flipping the sign solves ...
0
votes
2answers
26 views
This JQuery function only fires once. What's wrong?
I'm trying to trigger content to pop up when a title is clicked. Here is the function:
<script type="text/javascript">
jQuery(document).ready(function($){
...
0
votes
2answers
41 views
Using Regex to Find and Replace
I would like to take a text document that contains Feet+Frames values and convert them to Timecodes. For example, 0000+00 is replaced with 00:00:00:00.
I have a function to do the conversion from ...