function

PHP 5.3 Namespaces should i use every PHP function with backslash?

Hi, im now using namespaces in PHP 5.3 now there is a fallback mechanism for functions which dont exist in the namespace. so php every time checks if the function exists in namespace and then tries to load it from global space. So what about all php internal functions? strstr for example? Should i now use every php internal function wit...

How is this function being made use of?

Hello all, I am just studying a few classes given to me by my lecturer and I can't understand how the function heapRebuild is being made used of! It doesn't change any global variables and it doesn't print out anything ad it doesn't return anything - so should this even work? It shouldn't, should it? If you were told to make use of hea...

Function changing input

I would like to go from one number to another. For example if I started at 6 and my goal was 10 I want a function that on every pass would bring me from 6 towards 10 or if I had the number 14 and my goal was 9 it would count down from 14 towards 9.So far I have (this is written in Processing a Java Api but there is essentially no differe...

Can't get syntax correct for dynam. create onclick the ie way.

I was hoping to keep cross-browser compatibility and afaik this is the only issue so far. .setAttribute("onclick", "return showRapidText("+itemnum+");"); This works PERFECT but I'd like to make it IE compatible by putting it in this syntax .onclick = new Function("fnDisplay_Computers('" + alines[i] + "')"); so... I tried .oncli...

how to do thread in matlab?

how to do thread in matlab? i want to run one function on two variables simulatniosly how to do it? ...

How to properly use the .animate() function -- top

Is this the proper way to use the .animate(top) function? Positive number (animate down)-- $("div#container div#history-menu").animate({top:'180px'}, 600); Negative number (animate up)-- $("div#container div#history-menu").animate({top:'-180px'}, 600); Because I'm getting a java error in my error console that says: "error...

PHP class function.

What is wrong with this code? <?php class users { var $user_id, $f_name, $l_name, $db_host, $db_user, $db_name, $db_table; function users() { $this->$db_host = 'localhost'; $this->$db_user = 'root'; $this->$db_name = 'input_oop'; $this->$db_table = 'users'; } function userInput($f_name, $l_name) { $dbc ...

Jquery Dom and functions in html body

I have <script>...</script> before my closing body tag here i have the usual $(function() { function test(){ alert("test"); } }); in my html i have input tags <input type="text" onchange="test()" /> I get an error of that test is undefined. I am trying to make IE7 call function onchange I had a whole solution working but ...

complex arguments for function

My task is to create function funCall taking four arguments : pointer for 2d array of ints that stores pairs of numbers variable int maintaining number of numbers in 2d array pointer for table of pointers to functions int variable storing info about number of pointers to functions I was thinking about something like this : typedef i...

C++ choose function by return type.

I realize standard C++ only picks functions by argument type, not return type. I.e I can do something like: void func(int); void func(double); but not double func(); int func(); Where in the former, it's clear, in the latter, it's ambigious. Are there any extensions that lets me tell C++ to pick which function to use also by return...

Boost bind with asio::placeholders::error

...

Simple question about C++ constant syntax

Here is some code copied from Thinking in C++ Vol1 Chapter 10. #include <iostream> using namespace std; int x = 100; class WithStatic { static int x; static int y; public: void print() const { cout << "WithStatic::x = " << x << endl; cout << "WithStatic::y = " ...

Using a Function returning apointer as LValue

Why cant I used a function returning a pointer as a lvalue? For example this one works int* function() { int* x; return x; } int main() { int* x = function(); x = new int(9); } but not this int* function() { int* x; return x; } int main() { int* x; function() = x; } While I can use a pointer variab...

PHP Application Flow Graph (or function call graph)

Happens that I've ended up working on a big PHP program and I need a program (or easy to install script) which draws a flow control/call graph of a PHP application (ie; must work over multiple PHP files). Already saw stuff like Graphviz, not sure which one works for PHP? Any suggestions? Cheers! ...

[PHP] How to pass array as multiple parameters to function?

I have a parameters array: $params[1] = 'param1'; $params[2] = 'param2'; $params[3] = 'param3'; ... $params[N] = 'paramN'; I have a caller to various functions: $method->$function( $params ); How can I parse the $params array, so multiple (and unlimited) parameters can be passed to any function: $method->$function( $params[1], $pa...

How Can I do this??

I have a table records(ID, ParentID) containg this data ID ParentID 1 null 2 1 3 2 4 2 5 3 6 null 7 6 If you draw this table in hierarchy as a family 1,2,3,4,5 will be related to each other. I want to find a way, where I can pass an ID like 3 it give me the others family members using SQL or us...

How to create a function with vectors and vertical asymptote using MATLAB

Plot the function f(x) = 1.5x / x-4 for -10 equal or less than X equal or less than 10. Notice that the function have a vertical asymptote at x = 4. Plot the function by creating two vectors for the domain of x. The first vector (call it x1) with elements from -10 to 3.7, and the second vector (calle it x2) with elements from 4.3 to 10. ...

Xpath help function

Hi i have a document from which i am trying to extract a date. But the problem is within the node along with the date their is some text too. Something like <div class="postHeader"> Posted on July 20, 2009 9:22 PM PDT </div> From this tag i just want the date item not the Posted on text. something like ./xhtml:div...

xpath help substring expression

Hi i have a document from which i am trying to extract a date. But the problem is within the node along with the date their is some text too. Something like <div class="postHeader"> Posted on July 20, 2009 9:22 PM PDT </div> From this tag i just want the date item not the Posted on text. something like ./xhtml:div[@...

jQuery calling a predefined function

I have a big function defined and executed on an element click. Is there a way to execute again that "big" function later, call it somehow, without writing it again? $('#element').click(function(big){ some big function ... ... }); $('#another_element').click(function(){ this should execute the previous "big" function }...