parameters

passing data to javascript on page load

I want to pass data to id <script language="javascript" src="/foo.aspx?id=1"></script> I have this code in a aspx page. The data should be passed on load, before this code is being executed. how can i do that? ...

objective-c determine if parameter is an object

in Objective-c I have this function prototype: -(NSString*)formatSQL:(NSString*) sql, ... I may pass to this function any type of parameters: NSString, NSNumber, integer, float How can I determine in the function if a parameter is an object (NSString..) or a primitive (integer...)? thanks BrochPirate ...

In a C function declaration, what does "..." as the last parameter do?

Often I see a function declared like this: void Feeder(char *buff, ...) what does "..." mean? ...

How to get a name of a variable coming into a function as a parameter using F#?

Is there any way in F# how to get a name of a variable passed into a function? Example: let velocity = 5 let fn v = v.ParentName let name = fn velocity // this would return "velocity" as a string Thank you in advance EDIT: Why this code does not work? It is matched as value, so I can not retrieve the "variable" name. type Test() =...

Override Javascript Function Based on Passed Parameters

Is it possible to override a function based on the number of parameters that you are passing into it? For instance: function abc(name) { document.write ('My name is' + name); } function abc(name,friend) { document.write ('My name is' + name + 'and my best friend\'s name is' + friend); } So in the HTML if I just called abc(ge...

How can i validate a SOAP message with a WSDL file?

when we receive a SOAP message, then we Resolve it, then we have a TEXT like: 1 how can i validate the para: xx . to check it's value is accord to the WSDL of the web service ...

Problem inserting parameters into a function

Ok, I am trying to place parameters into a function that is called like so: $parameters['function']($parameters['params']); Here is the function and the parameters that I need to be placed into this: $parameters['function'] = 'test_error'; $parameters['params'] = array(0 => $txt['sometext'], 1 => 'critical', 2 => true); The test_er...

Is there any way to do something like this in C#?

Is there any way to do something like this in C#? public void DoSomething(string parameterA, int parameterB) { } var parameters = ("someValue", 5); DoSomething(parameters); ...

Using Report (Reporting Services) parameter values in ASP.NET page

I have a report (Reporting Services) integrated into an ASP.NET that shows dropdownlists to select report parameter values. The dropdownlists are populated using direct database selects, though I see the report RDL files do contain the paramter values and datasets as defined in the report designer. Is it possible to obtain the report pa...

CodeIgniter: Sending params to a view?

Hello, My controls receives some params from the user, I would like to place them inside the view I'm calling, how should I do this without splitting the view into multiple parts? Thank you. ...

create_function with default parameter values?

Ok, I'm looking into using create_function for what I need to do, and I don't see a way to define default parameter values with it. Is this possible? If so, what would be the best approach for inputting the params into the create_function function in php? Perhaps using addslashes? Well, for example, I have a function like so: functi...

Why does jQuery.ajax() add a parameter to the url?

Hi, I have a data fetching method that uses jQuery.ajax() to fetch xml files. /* */data: function() { ...

capturing CMD batch file parameter list; write to file for later processing

I have written a batch file that is launched as a post processing utility by a program. The batch file reads ~24 parameters supplied by the calling program, stores them into variables, and then writes them to various text files. Since the max input variable in CMD is %9, it's necessary to use the 'shift' command to repeatedly read and ...

Pass parameters to Flash Main (Document) class

In Flash CSn/AS3 you associate a Main class with a flash file which when loaded in the flash player "automatically creates an instance of the program's main class." I'd like to know how to pass arguments to the main class, since you don't write it yourself (you put its name in the Document textfield in the IDE). ...

get program name in drupal

I would like to get program name in Drupal (actually name in URL that calls program or function). example: http://localhost/drupal6/my_widget This works: $myURL = (basename($_SERVER['REQUEST_URI'])); // $myURL=my_widget but not when I have additional parameters: http://localhost/drupal6/my_widget/parm1/parm2 ...

Flash Builder 4 - using relative paths with the -output (-o) compiler argument

I'm trying to use a relative path in the -output compiler argument, here's what I've tried (with and without quotes): -o="./deploy/file.swf" -o="/./deploy/file.swf" -o="./file.swf" -o="/./file.swf" -o="file.swf" -o="file.swf" None of these attempts yields a new file, it's as if they are ignored. The deploy directory is in the roo...

Java: prebuild flag to check pars not NULLs?

Currently, I use a very conservative way to stop malfunctioing code. It is annoying at the time of a change when I have to change the checker parts as well. if(ds==null||s==null||maxDs==null) { System.out.println("NULL in getDirs(ds[],s,maxDs)"); System.exit(9); ...

sybase 'drop procedure'. can I get it to take a parameter instead of a naked proc name?

Happy Monday o/ I'm looking to do the following within a stored proc select @parameter="fooproc" drop procedure @parameter instead of drop procedure fooproc But it's choking with a syntax error. Is there some way I can bend this to my will? I would've expected to be able to do this. I've tried a few permutations of type de...

Choosing a Reporting Services parameter value based on the currently logged in user

Here's my situation. I have a Microsoft Reporting Services report that as a parameter takes a salesperson's name and shows them their sales across their territories blah blah blah. But, salesperson A should not be able to choose and view salesperson B's data. So, my thought was to get the currently logged in user from Reporting Servic...

What's the best way to return total item count from a repository getitems method

We've got the following repository method public IList<Foo> GetItems(int fooId, int pageIndex, int pageSize , string sortField, string sortDir, out int totalItems) { // Some code } My question is: is it ok to use out in this way. I'm somewhat uncomfortable with out, but can't come up with a better way to write this as a single call. ...