Yesterday morning I noticed Google Search was using hash parameters:
http://www.google.com/#q=Client-side+URL+parameters
which seems to be the same as the more usual search (with search?q=Client-side+URL+parameters). (It seems they are no longer using it by default when doing a search using their form.)
Why would they do that?
Mor...
Is there a naming convention or maybe some guideline on how to name function parameters?
Since forever, I have been doing it like this:
function divide( $pDividend, $pDivisor )
{ ... }
That way I'll always know which variables were passed as parameters.
(This one's PHP, but it should be applicable to most programming languages)
Is ...
This is a Function that does the following:
Create a random Token with 8 length
Insert that Token into the Database
> If the User has already a token, update it.
> If the User has no token, insert it.
procedure createToken(BenuNr: integer);
var
AQ_Query: TADOQuery;
strToken: string;
intZaehler: int...
Hi guys, need your help with PHP templating. I'm new to PHP (I'm coming from Perl+Embperl). Anyway, my problem is simple:
I have a small template to render some item, let it be a blog post.
The only way i know to use this template is to use 'include' directive.
I want to call this template inside a loop going thru all the relevant blog...
I have a stored procedure'test' in Sybase ASA with for example 4 parameters.
par1 INT = 0,
par2 VARCHAR(50) = NULL,
par3 VARCHAR(100) = NULL,
par4 VARCHAR(10) = ''
Now I want to execute this stored procedure with par1 as its default value.
call test(NULL, 'test')
But the actual value of par1 i not 0, but 1!
I also tried
call t...
Hi. Does anyone know of a way to get hold of the intercepted parameters sent into a method.
For instance...
You have an Update method inside a CustomerService like this.. Update(Customer c)
..and you want to get hold of the Customer object sent into the service.
Does it come out of the box in any way or do I have to do anything else e...
Hi, everyone!
Provided, I want to pass a modifiable parameter to a function, what should I choose: to pass it by pointer or to pass it by reference?
bool GetFoo ( Foo& whereToPlaceResult );
bool GetFoo ( Foo* whereToPlaceResult );
I am asking this because I always considered it the best practice to pass parameter by reference (1), b...
Hi all,
I'm trying to post to a webpage using WebClient in C#.
Somehow the parameters are not coming through.
The page itself is a php page.
I've tested the same page with a regular browser/html page and then it works, so I'm expecting that it is a client issue
Can anybody tell me what I might be doing wrong?
WebClient myClien...
hi guys
does anybody knows hot to set the parameters of a from wave device block in a simulink model?
i.e. i need to set the "samples per frame" parameter. it must be something like ('Model Name/ From Wave Device','Samples Per Frame',1024) ... but it doesnt work like this.
is it even possible to set the parameters of this block???
glob...
I'm frequently using shift to unpack function parameters:
sub my_sub {
my $self = shift;
my $params = shift;
....
}
However, many on my colleagues are preaching that shift is actually evil. Could you explain why I should prefer
sub my_sub {
my ($self, $params) = @_;
....
}
to shift?
...
I have a business object that I've been using, which has a bunch of properties and a Save method, which inserts/updates to the database. The save method is NOT status, so the object needs to be instantiated, and the properties for the DB update/insert get pulled from the object.
Now I'm trying to bind the object to a FormView with the O...
I'm having a bit of difficulty passing a reference type between webservices.
My set up is as follows.
I have a console application that references two web-services:
WebServiceOne
WebServiceTwo
WebServiceOne declares the details of a class I am using in my console application...let's call it MyClass.
My console application calls We...
I have a query that, basically, says this:
SELECT DISTINCT [DB_ID]
FROM [TableX]
WHERE ([ForeignKey]=@ForeignKey);
Once I have this, I return the first DB_ID (there should be only one).
The routine I've written for calling this is in C# so that I can get the database id for any table name, no matter what the DB_ID is named.
Most of ...
I'm trying to create a tagcloud for an application. When I click a tag from the tagcloud, the backgroud for the tag must be changed. Here a simple html code for a tag:
<a about="http://localhost/d456c6" href="http://localhost/d456c6" class="tagweight0 Resource">abda</a>
To change the background i'm using the following:
$('tagweight0'...
Referring to this question and especially the accepted answer of litb, I wonder why the gcc complain about this:
void func(const int (*ip)[3]) {
printf("Value: %d\n", ip[1][1]);
}
int main() {
int i[3][3] = { {0, 1, 2} , {3, 4, 5}, {6, 7, 8} };
func(i);
return 0;
}
If I eliminate the const the compiler keeps still. Di...
Is it possible to cast out param arguments in C#? I have:
Dictionary<string,object> dict; // but I know all values are strings
string key, value;
Roughly speaking (and if I didn't have static typing) I want to do:
dict.TryGetValue(key, out value);
but this obviously won't compile because it "cannot convert from 'out string' to 'o...
I have a javascript function that I need to call inside my body tags. My javascript fuction looks like this:
function NewExistingPicture(pictureName) {
//code for javascript function
}
And this is what I'm trying to do in HTML:
Existing Photos:
<% foreach (var Photo in Model.ProductThumbnails)
{ %>
NewExistingPicture(<...
This is an SO challenge
I would like to know how someone would get an invalid formal parameters in a function without the arguments object to as simulate not knowing the format of the parameter destructuring assignment. This is not an ECMAScript question and only pertains to JavaScript.
Your mySolution cannot access arguments or test. ...
How can you describe the parameters and return type (getter/setter) of your PHP functions?
I need to tell my moderator the return type and list the parameters for each function.
I have hundreds of functions so this is becoming problem, since I need to do this for every single revision.
I use at the moment the following procedure
ack-...
class MetaData {
public String version;
public String compression;
}
I make a MetaData object, pass it into a method, and fill the version and compression fields from within the method. And I want these changes to exist outside of the lifetime of the method. In C++ I think I added a & or something to pass the object itself and ...