Top "Function" questions

A function (also called a procedure, method, subroutine, or routine) is a portion of code intended to carry out a single, specific task.

In php, is 0 treated as empty?

Code will explain more: $var = 0; if (!empty($var)){ echo "Its not empty"; } else { echo "Its empty"; } The result returns "Its …

php function
Using generic std::function objects with member functions in one class

For one class I want to store some function pointers to member functions of the same class in one map …

c++ function function-pointers c++11 tr1
Simplest/Cleanest way to implement singleton in JavaScript?

What is the simplest/cleanest way to implement singleton pattern in JavaScript?

javascript function design-patterns singleton
Calling a javascript function recursively

I can create a recursive function in a variable like so: /* Count down to 0 recursively. */ var functionHolder = function (counter) { output(…

javascript function recursion function-expression
Declare variable in table valued function

How can I declare a variable in a table valued function? (like in my title)

sql-server function user-defined-functions
Javascript: Call a function after specific time period

In JavaScript, How can I call a function after a specific time interval? Here is my function I want to …

javascript function timer
Run php function on button click

I want to run a php function on button click. for eg : <input type="button" name="test" id="test" …

php function button onclick submit-button
Returning from a void function

Which is more correct way to return from function: void function() { // blah some code } OR void function() { // blah some code …

c function void
jQuery Button.click() event is triggered twice

I have the following problem with this code: <button id="delete">Remove items</button> $("#delete").button({ …

jquery function button click
Can functions be passed as parameters?

In Java I can do something like derp(new Runnable { public void run () { /* run this sometime later */ } }) and "run" the …

function go