The below example generates an error:
VBScript compilation error: Cannot use parentheses when calling a Sub
This error does not occur if all parameters are not objects.
Is there a special way to pass object parameters to VBScript functions?
Option Explicit
Dim obj
Function TestFunc(obj)
WScript.Echo "Why doesn't this work?"
End Fu...
In PHP,
I want to execute a function when a hyperlink is clicked. The only way I can think of doing this is by having the link attach a get parameter to the url when clicked and by doing an if statement that checks to see if that parameter exists and if so then have the function executed. But is there a way to do this like:
<a href='#'...
Let say i have some words AB, AAB, AA.
AB is not a prefix to AAB but AA is a prefix to AAB because if i just add B at the end of AA it will become AAB, which is not possible with AB.
So, is there any function in c++ (STL) so that i can determine of two words if one is prefix to the another ?
Thanks.
...
whats the use of calling a cakephp function
http://localhost/project/controller/method.hello
so whats hello?
but it requires views/method/hello/method.ctp...
...
Hi
I have problems with my keyup binding when cloning an element. Here's the scenario:
I have an html markup like this:
<tr class="rijbasis">
<td>
<input type="text" class="count" />
</td>
<td>
<span class="cost">10</span>
</td>
<td>
<span class="total">10</span>
</td>
</tr>
I'm binding an keyup...
I was reading up about bypassing objective-c's messaging to gain performance (irrelevant to this specific question) when i found an interesting bit of code:
#import <Cocoa/Cocoa.h>
@interface Fib : NSObject { }
- (long long) cFib: (NSUInteger) number;
@end
@implementation Fib
// c implementation of fib
long long cFibIMP(NSUInteger ...
See example:
<!DOCTYPE html>
<html>
<head>
<title>language</title>
<script type="text/javascript" src="http://www.google.com/jsapi">
</script>
</head>
<body>
<div id="language"></div>
<script type="text/javascript">
var loaded = false;
function load_api...
I'm just starting with Object Oriented PHP and I have the following issue:
I have a class that contains a function that contains a certain script. I need to call a variable located in that script within another function further down the same class.
For example:
class helloWorld {
function sayHello() {
echo "Hello";
$var = "...
I can't seem to figure out what's wrong with my function.... I need to ask the user for a price and then return it as a double pointer, but I get tons and tons of errors:
double* getPrice()
{
double* price;
cout << "Enter Price of CD: " << endl;
cin >> &price;
return price;
}
...
In javascript there's this sweet, sweet function window.setTimeout( func, 1000 ) ; which will asynchronously invoke func after 1000 ms.
I want to do something similar in C++ (without multithreading), so I put together a sample loop like:
#include <stdio.h>
struct Callback
{
// The _time_ this function will be execut...
I relogin to my server in dreamhost and test some scripts.And I found I couldn't use str_split. Message of Undefined function was given.I checked the version in the server and its PHP Version is 5.2.12.And I just wonder which version is required?Thanks.
Testcode:
<?php
$arr = str_split("lsdjflsdjflsdjflsdjfl");
print_r($arr);
?>
Mes...
I'm trying to make a PHP regex to extract functions from php source code. Until now i used a recursive regex to extract everything between {} but then it also matches stuff like if statements. When i use something like:
preg_match_all("/(function .(.))({([^{}]+|(?R))*})/",$this->data,$matches2);
It doesn't work when there is more than 1...
I have function that updates log table.
function wslog($userID, $log, $where) {
safe_query("INSERT INTO ".PREFIX."log ( time, userID, log, where ) values( '".time()."', '".$userID."', '".$log."', '".$where."' ) ");
}
And I have this php code:
wslog($userID, 'server|'.mysql_insert_id().'', 'servers');
But I keep getting syntax e...
Here's my code:
sentenceToTranslate = raw_input("Please write in the sentence you want to translate: ")
words = sentenceToTranslate.split(" ")
for word in words:
if isVowel(word[0]):
print "TEST"
def isVowel(letter):
if letter.lower() == "a" or letter.lower() == "e" or letter.lower() == "i" or letter.lower() == "o" or...
Unless I'm mistaken, creating a function in Python works like this
def my_func(param1, param2):
# stuff
However, you don't actually give the types of those parameters. Also, if I remember, python is a strongly typed language, as such, it sesms like Python shouldn't let you pass in a parameter of a different type then the function ...
As in http://nant.sourceforge.net/release/latest/help/functions/nant.get-base-directory.html, they explaint the meaning of this function is:
The base directory of the appdomain in which NAnt is running.
I don't know what does appdomain mean! Someone please explain it for me. Thank you.
...
How do I use function arguments declared like
void f(double)
{
/**/
}
if it is possible?
...
This simple regex matching returns a string instead of an object on every browser but the latest firefox...
text = "language. Filename: My Old School Yard.avi. File description: File size: 701.54 MB. View on Megavideo. Enter this, here:"
name = text.match(/(Filename:)(.*) File /);
alert(typeof(name));
as far as i know ...
Here's the story... I have a jQuery function that does something, this function is referenced very regularly. One of the input parameters is an array, this array data is hard coded and thus I want to pass the data like this: (this is how I would do it using PHP)
myFunction(Array("url"=>"abc.com","example"=>"hello_world"));
Instead of ...
Or in other words, does the order of functions in the function name list matter? It does on windows, for loading by ordinal. I don't think such a thing exists on OsX. Using Google I don't find anything, but Google will only find things that do exist, and not prove that they don't exist ;) I might just not be using the right search terms....