Questions for function


C++ extern function error: too many arguments to function

I have a cw.h file with a bunch of extern functions in it that I want to call from my cw.cpp file.

JQuery issue. Click - open code

I have this JQuery code

In PHP, how do I check if a function exists?

How can I check if the function my_function already exists in PHP?

Making a function with a random name and calling it later

So I'm trying to make a function that will have a random name generated on page load, but I'm having problems calling the method later.

Is leaving a procedure with a return statement a bad thing?

I sometimes have colleagues frowning about using the return statement to leave a routine (before the end) because it looks like a kind of hidden goto and all gotos are evil. I neither share the tho...

Why initializing data at global scope by passing it to some function is not possible?

I've been wondering for a while why initializing any data by passing it to some function is not permitted despite the fact that constructors that are a kind of function anyway can be called at global

How to concisely assign and immediately invoke a function variable?

The following is a method for defining an anonymous function within a closure, invoke the function, and forget it:

Typedef struct pointer to function (C)

I am trying to pass a typedef struct pointer to a function and the compiler is complaining with this error message: error: unknown type name ‘RootP’. Here is the code...

IF statement inside PHP function not working?

This is very basic, I know - but I simply can't figure out why this short section of PHP code isn't working for me? I'm trying to get a IF statement happening in my function, and then execute the

User defined function in Access, only running once, not per line

I'm having a problem with running a custom function within an Access database. Currently, there's a process in place to import new data, and assign a foreign key (ENTRY_ID) to -1 for all new rows. A

Passing a dictionary to a function in python as keyword parameters

I'd like to call a function in python using a dictionary.

function that will only insert Monday-Friday?

I've created a function that will insert a customer into the database, I just wondered if it was possible to make it so it will only except inserts on Monday to Friday days at how this would be don...

Convert javascript function to Obj-C function

I want to use a bunch of functions that were written in Javascript in my Obj-C app. I made a header file and got the first one converted, but got stuck on the second. Here's what I started with and

Different function for form success and for the form validation messages

I've just been helped with some functions and callbacks to get this animation on my form once submitted:

Does C# support inout parameters?

In C#, I am using a StreamReader to read a file, line per line. I am also keeping the current line's number in an int, for reports of possible error messages.

MPI creating structs over functions in C?

I'm creating a struct to send over MPI but am having a little trouble with using the struct in other functions..

javascript send variable to function

I want to SetTimeout and return variable name 'MyVAR' to timer:function('MyVAR') and I can't to do that.

Is this a hash function? python

im trying to implement a hash function in python. Would you consider the following a real hash function? I've 10 buckets and values from 1 to 7. It will also count amount of collisions :)

scriptaculous: onmouseover /onmouseout for several ids and flickering problem

Hi so basically what I want to do is to have the same event happen to different images and only write the code line one time in a .js file. This should be very basic but I can't find any easy guide.

C++ static pointer to function

I would like to have a private static pointer to a function in my class. Basically, it would look like this:

I need some help in Undo function in Java

I write a Text Editor with Java , and I want to add Undo function to it

Is it possible for a JavaScript function to return its own function call as a string?

In JavaScript, is it possible for a function to return its own function call as a string?

combining javascript and html

Design and code a program which prompts a user for the year they were born, calculates the user's age and displays the user's age. If the user's age is over 40 then set the background color of the ...

how to control return variable in matlab

i want to clarify how to control returning of variables from function in matlab,for exmaple let us consider this code

use external function in Yii Controller (Helper function)

I develop some web sites by CodeIgniter,it has got helper file,which can be written by developer to use some function in class.

sqlite select minimum function value of grouped result

i have a table with gps locations of restaurants chains and would like to return the addresses of the restaurants closest to point (A) within a certain radius

C++ Truncating Floats in Function Return

I have written my own FloatArray class to use for a project. The problem I'm having is that when I use the get method to return the value at a given index, the returned value is a truncated int an...

PHP - if (condition) execution

let's say I have something like this:

Get array keys when in argument in PHP

I'm passing some arrays as arguments inside a function. For example:

C++ pointers dynamic arrays and functions

This is from a beginning C++ class, no grade involved since I'm simply following along trying to remember stuff after too many years. The class has reached the point where we're using pointers and

C: How to pass a double pointer to a function

I am getting an segmentation fault when I pass the double pointers to the function to initialize the memory

php custom sort function numeric

I am having a custom sort-funktion wich I use with usort:

Why we should always return values from a function?

I am not a big programming guy but have listen from programmers a lot of times that we should always return values from a function. I want to know the reason.

Using selfmade functions in Google App Engine

I'm trying to make a function that checks if the user is logged in. I've placed the function outside of the mainpage class and it gives no errors until I try to use it insie the def get(self) withi...

Dynamically assigning calculation results in R

I'm in my first week programming in R and while I've made much progress on solving specific issues, I am in need for advice on a larger scale.

Checking anonymous function signatures at runtime (reflection) in AS3

Is there any way to have a look at signatures of anonymous functions in ActionScript 3 during runtime?

Where is the best location for this function? C++

Is it alright to have a function that is not a part of any specific class when using an object-oriented approach. In my case, I would like to have a check_collision() function that takes two SDL_Re...

Regular Expressions + Including one space in pattern

I'm trying to figure out how to write a pattern to match to the following: "3Z 5Z". The numbers in this can vary, but the Z's are constant. The issue I'm having is trying to include the white spa...

Problem with fibonacci function. C++

Should return the n place of the array. But instead of the value I'm only getting 0.

storing unbound python functions in a class object

I'm trying to do the following in python:

PHP: Calling a user-defined function inside constructor?

I have a class userAuth inside its constructor I have added code to check the user is valid or not, if there is no value in session then I check cookies (as a part of "Remember Me" feature), if the...

These two Objective-C functions crash with no message

I'm building a header with a bunch of functions to do some astronomy math and so far so good, except these two functions crash the debugger with a Debugging terminated. message and nothing else. The

Can an R function access its own name?

Can you write a function that prints out its own name?

How to properly structure functions?

let's say we have a class with some methods in it, of which at least one is of rather complex nature:

PHP - Accessing object name within a class function

First question here. Please excuse noob errors.

How do I pass specific .on selector into function

I have two versions of the same code. This first version works great but not for newly loaded content.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.