Hi,
I am writing a function which is called into a page, but I am not sure how to call information form database into the function in order to use them. Basically I am doing some calculation in the function where I need information form database to do them.
Is there anyone who can give a clue on how ot do this? Many thanks F
From a co...
$comment = 'billie jean is not my lover she is just a girl';
$words = array('jean','lover','jean');
$lin = some_function_name($comment,$words);
($lin=3)
I tried substr_count() but it doesn't work on array. Is there a builtin function to do this?
Thanks!!
...
I want to apply a blur filter to an image in Flash CS4. I understand how to apply the filer but is there a way to apply it in differing amounts to different parts of the image? I.E. I want to have the edges very blurry while I want the center to stay relatively sharp (apply the blur filter as if it were a gradient coming from the cent...
hi foks,
i am facing issue while creating table where in that one column which is set to default value of current date........i would stress this point "that i need only date not time along with that"....i would be really thankfull to those who tries to help me....
...
I have a large complicated function that was ported from C++ to C#. I would like to perform a diff to see exactly what has changed between the two. Other can manually copying each of the functions to 2 temporary files oldFunction.cpp and newFunction.cs and diff-ing those is there another way?
...
I have two string arrays "Array1[size]" and "Array2[size]". They both have the same size.
I would like to write a function which contains this two arrays but I am having problems in the way that I am declaring them.
I am declaring it like this: void Thefunction (string& Array1[], string& Array2[], int size);
And when I call it I am...
Recently, I've been learning different programming langages, and come across many different names to initalize a function construct.
For instance, ruby and python use the def keyword, and php and javascript use function, while VB uses void, etc.
My question is: What is the reasoning and differences between these different constructs an...
code:
#define f(a,b) a##b
#define g(a) #a
#define h(a) g(a)
main()
{
printf("%s\n",h(f(1,2))); //[case 1]
printf("%s\n",g(f(1,2))); //[case 2]
}
output:
12
f(1, 2)
Why is the output not same in both cases?
[I understood the concatenation (a##b) and string conversion (#a) here, but I did not get why the outpu...
Are there some good ways to know how a function performs in C? I would like to, for example compare my own function to a library function.
...
I am counting words in a text field and after a certain amount of words, I use prevent default. In the else, I would like to renable the default commands.
Does preventDefault() have an opposite function?
Here is some sample code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-tr...
is it possible to alias a function with a different name in PHP? if yes how ?
suppose we have this function sleep();
is there any quick way to make an alias called wait();
without writing this code
function wait ($seconds) {
sleep($seconds);
}
...
Hi all,
If I have a person model with first_name and last_name, how do I create and display a full_name? I would like to display it at the top of my Edit and View views (i.e. "Edit Frank Luke") and other places. Simply dropping echoes to first_name and last_name isn't DRY.
I'm sorry if this is a very simple question, but nothing has ...
I read Scott Meyers article on the subject and quite confused about what he is talking about. I have 3 questions here.
Question 1
To explain in detail, assume I am writing a simple vector<T> class with methods like push_back, insert and operator []. If I follow mayers algorithm, I would end up with all non-member friend functions. I w...
What is wrong with this function... The function intends to remove the specified leading characters from a given string. I know there is a patindex base solution to this which however doesn't consider spaces and all zero entries... but I want to know what is wrong with this one...
If I input "00012345" it should out put me "12345" howev...
I've been having some issues with my Internet connection and I was wondering what is the fastest, error-less and most reliable way to check if the host computer is connected to the Internet.
I'm looking for something like is_online() that returns true when online and false when not.
...
My tables are as follows
workers:
id integer
...
days:
id INTEGER
event_date DATE
worker_id INTEGER
and
hours:
id INTEGER
hr_start VARCHAR2(8)
hr_stop VARCHAR2(8)
day_id INTEGER
I need a function which will calculate for every user in database, sum of hours in current month. ...
It would take too long to explain why I need this, but I was wondering if there was a PHP function to check if a type of object was recognized. In other words, a function that would check if
$dog = new Dog();
would cause an error, because Dog didn't exist. Thanks for you help.
...
I read that the pow(double, double) function is defined in "math.h" but I can't find its declaration.
Does anybody know where this function declared? And where is it implemented in C?
Reference:
http://publications.gbdirect.co.uk/c%5Fbook/chapter9/maths%5Ffunctions.html
...
Just for curiosity... If possible, where can I find and see the javascript submit() function's content on the form? Just to see how it handles http requests.
thanks!
...
Hi,
I have been studying JavaScript from one book. Once I was playing with the codes concerning the client-server site communication, I wanted to do a POST request with the code below (which uses IE ActiveX object XMLHttpRequest):
<script type="text/javascript">
var oRequest = HTTPRequestUtil.getXmlHttp();
var sRequestType = "post";
...