2
votes
3answers
91 views

Theoric topic about functions in Javascript

I decided to post this question because I've followed several tutorials online & the treat this topic in different ways. Let's say I've got a function to increment a counter: function ...
0
votes
1answer
30 views

how to get value of variable from one function code into another function php wordpress

I have the following (very reduced code) and I want to call the value of the variable $sendmilisecs from the first function in the second function (line 7 from bottom), but every attempt failed. I ...
11
votes
3answers
9k views

Django template call function

I'm passing to Django's template a function, which returns me some records. I want to call this function and iterate over it's result. {% for item in my_func(10) %} That doesn't work. I've ...
1
vote
1answer
30 views

Variable range in function

I have problem with this code... How can I subtract variable global variable inside function and get it? var liczba = 0 function create(data) { liczba-- } if(e.keyCode == 32) { liczba++ ...
0
votes
2answers
48 views

TSQL: Using a Table in a Variable in a Function

I'm trying to do a select from a table that will need to be in a variable. I'm working with tables that are dynamically created from an application. The table will be named CMDB_CI_XXX, where XXX ...
5
votes
5answers
890 views

How to get the original variable name of variable passed to a function

Is it possible to get the original variable name of a variable passed to a function? E.g. foobar = "foo" def func(var): print var.origname So that: func(foobar) Returns: >>foobar ...
2
votes
1answer
30 views

assign a function to a variable in R

The question is in the title. I'd like to do something like this : myfunc<- pexp plot(function(x) myfunc(x, 0.5)) I'd like to call several functions given as parameters in my script. I'd like to ...
0
votes
3answers
358 views

Calling a function with same name in another JS file

I'm just a bit confused here... If I have one .js file with function like this: function myMain() { var count=0; count++; myHelper(count); alert(count); } function ...
-1
votes
3answers
44 views

On the fly functions [closed]

Why can't I do this? Or am I just getting the syntax wrong? $status = function() { switch($job['status']) { case "CREATED": return "Created by <b>$creator</b> on " . date("jS ...
-9
votes
4answers
83 views

unable to cout string in C++ [closed]

I am new to programming and I can only use C++. I have been working on an RPG, and for some reason I can't get the program to print out the value that I set a string to. I started by defining the ...
-1
votes
3answers
38 views

php 5 create global variable within function [closed]

I'm trying to create a global variable within a function but it isn't passed when I try to echo outside the function. function check_input($data) { if ( preg_match("/http/i", $data)) ...
0
votes
1answer
57 views

Passing variables between functions in Javascript

I have this code: collection = (function() { function collection(removeLinkTitle){ this.removeLinkTitle = removeLinkTitle || 'delete'; } collection.prototype = { ...
0
votes
4answers
104 views

Is this a function call or a variable declaration?

I can not understand the meaning of the following code, please help me, thank you. In the following code: FrameDetect::Point FrameDetect::tracer(LabelData *ldata, int x, int y, int &pos, int ...
0
votes
8answers
82 views

PHP Variables in Functions

I am trying to make a grading scales for a grouping of variables. I'm running in to a few problems and am completely brain dead at the moment. Could anyone possibly give me some help on how to ...
2
votes
3answers
119 views

C++ How do I use variables from one function to another?

For the record I am completely green in C++ and any other programming language for that matter, so if it's possible I'd be happy if you can answer in a way that I can understand :) I have been ...

1 2 3 4 5 50
15 30 50 per page