Questions for function


3603

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.
4112

JQuery issue. Click - open code

I have this JQuery code
538

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

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

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.
9682

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...
941

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
6179

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:
2669

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...
2373

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
2471

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
8109

Passing a dictionary to a function in python as keyword parameters

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

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...
9862

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
9816

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:
2164

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.
1958

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..
5273

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.
8007

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 :)
6706

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.
3189

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:
6460

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
294
4553

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?
5896

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 ...
3677

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
754

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.
5046

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
4079

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...
4078

PHP - if (condition) execution

let's say I have something like this:
2237

Get array keys when in argument in PHP

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

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
9718

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
7881

php custom sort function numeric

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

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.
4483

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...
2887

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.
8090

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?
9565

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...
9244

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...
2491

Problem with fibonacci function. C++

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

storing unbound python functions in a class object

I'm trying to do the following in python:
6383

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...
5442

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
3388

Can an R function access its own name?

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

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:
4503

PHP - Accessing object name within a class function

First question here. Please excuse noob errors.
4204

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.