hi,
I've got 2 jQuery functions. One calls the other (in theory...). These are:
$.testFunction = function(arg1){
alert("testFunction(arg1)");
$.testFunction(arg1, "");
}
$.testFunction = function(arg1, arg2){
alert("testFunction(arg1, arg2)");
alert("arg1: " + arg1 + "\narg2: " + arg2);
}
I've got two functions, beca...
Hi all,
Is it possible to execute function this way:
this.values(value);
not
this.values[value]();
this.values[value].call();
If so, how? Or any other methods? Thank you.
Here is my code:
write: function(value) {
this.values = {
"red": function() { /* do something */ },
"orange": function() { /* do something */ },
...
Hi all,
I've written a fairly basic jQuery plugin that takes an unordered list and creates a nice looking multi-selectable list. Calling it 'multiSelector', the plugin declaration looks like this:
jQuery.fn.multiSelector = function(options) {
// plugin code
}
The plugin actually runs on a containing div with an unordered list ins...
If i were to run this code:
def function(y):
y.append('yes')
return y
example = list()
function(example)
print(example)
Why would it return ['yes'] even though i am not directly changing the variable 'example', and how could I modify the code so that 'example' is not effected by the function?
...
In C or C++ what is the difference between function declaration and function signature?
I know something of function declaration but function signature is totally new to me. What is the point of having the concept of function signature? What are the two concepts used for actually?
Thanks!
...
Basically I have a draggable list which is connected with a sortable list. Works great except I need some sort of Drop event which I can use to change the list item after its dropped into the sortable list.
This works with .draggable -> .droppable but is there a fix for draggable -> .sortable?
...
Hello.
I have this:
$scCost = $row["gpsc"];
mysql_query("
UPDATE member_profile
SET points = points-$scCost
WHERE user_id = '".mysql_real_escape_string($userid)."'
") or die(mysql_error());
That takes do the user´s points - scCost.
How do i check if the user can afford it or not? So, if the user...
Hy guys.
I want to analyze the result of each function that I call. If this result is a exception or is false then the script ends. I can do this manually, but it is a big waste of time to call a control function for each new function.
Something like this:
http://codeviewer.org/view/code:c5c
Can I configure PHP to set this error ...
Why is the static keyword necessary at all?
Why can't the compiler infer whether it's 'static' or not?
As follows:
Can I compile this function without access to non-static member data? Yes -> static funcion.
No -> non-static function.
Is there any reason this isn't inferred?
...
i have value of 1.564 and 1.565 i need round this value to 1.56 and 1.56,which function suitable for this in c#.
...
I've been poking my nose in extending SAS string handling with some C functions such as a longest common substring algorithm. The proc FCMP functions get easily pretty inefficient.
The embedded C compiler in proc proto doesn't seem to produce the results I expect after writing the algorithm in Visual Studio. One thing I think I have ver...
Hi all.
We all know that you can access a property of a javascript object by it's name using the [] syntax.. e.g. ob['nameOfProperty'].
Can you do the same for a local variable? Another answer here suggested the answer is to use window['nameOfVar']. However, this only worked for the poster as he was defining variables at window-level ...
Hey everyone, not sure what is going on here :(
Basically I have a function that is needs to tell 2 other classes to do something. It works for one of the classes: BigPlayButton, but not Background for some reason.
TabMenu.as Class function
Note: The function below WILL call the hitPlayCircle function in my BigPlayButton class, but I ...
I've got a function that I want to take an optional boost::function argument as a callback for reporting an error condition. Is there some special value I can use a the default value to make it optional?
For example, with a regular function pointer I can do:
void my_func(int a, int b, t_func_ptr err_callback=NULL) {
if (error && (...
I have a string in a SQL Server table whose format is like this...
nvarchar int nvarchar int nvarchar
There are no obvious delimiters other than some chars are numeric and others are alpha.
How do I reference the second int value?
...
The full error I'm getting is this:
error: ambiguous overload for ‘operator[]’ in ‘a[boost::_bi::storage4<A1, A2, A3,
boost::arg<I> >::a4_ [with A1 = boost::_bi::value<MsgProxy*>, A2 = boost::arg<1>, A3 =
boost::arg<2>, int I = 3]]’
It references line 116 of a class I have, which is the boost::bind call in this function:
// Dis...
Is it possible to use Input to call a member function?
void one()
{
}
cout << "enter input:" << endl;
cin >> input; //where input is "one"
instance.input()
...
def lite(a,b,c):
#...
def big(func): # func = callable()
#...
#main
big(lite(1,2,3))
how to do this?
in what way to pass function with parameters to another function?
...
Hello Everybody, I've got a problem:
I'm writing a new WebApp without a Framework.
In my index.php im using: require_once('load.php');
and in * load.php* I'm using require_once('class.php'); to load my class.php.
In my class.php I've got this error:
Fatal error: Using $this when not in object context in class.php on line ... (in t...
Well, it's a kind of a web server.
I load .dll(.a) files and use them as program modules.
I recursively go through directories and put '_main' functors from these libraries into std::map under name, which is membered in special '.m' files.
The main directory has few directories for each host.
The problem is that I need to prevent usa...