parameters

Is there a way to return a method parameter names in ruby

Is it possible to get the parameter names of a method ? Example with: def method_called(arg1, arg2) puts my_method.inspect end I would like to know what method (my_method) should I call to get the following output: ["arg1", "arg2"] ...

Passing a parameter in the header (XML RPC)

I'm trying to set up a server status for the MMORPG Champions Online. I got some basic information from the web master and this is all he told me: XML-RPC call to server: http://www.champions-online.com/xmlrpc.php function name: wgsLauncher.getServerStatus Parameter (language): en-US Now, I found a nice example to start with here, a...

Runtime C function details

Hi, Is there any way to find particular C language function's input and output parameters from a framework (apple's ARM) during the runtime or from any method with out knowing the headers. It is a framework and there are no header files for it.I decompile it with IDA Pro and it gives me the function names but not input and output para...

Is there a better way to pass by reference in Perl?

I am doing pass-by-reference like this: use strict; use warnings; sub repl { local *line = \$_[0]; our $line; $line = "new value"; } sub doRepl { my ($replFunc) = @_; my $foo = "old value"; $replFunc->($foo); print $foo; # prints "new value"; } doRepl(\&repl); Is there a cleaner way of doing it? Prototypes ...

Copying pointers in C++

Hello, I have a class A containing two pointers to objects of another class B. I want to initialize one pointer or the other depending on which one is passed to init(), which also takes other parameters. My situation is thus the following: class A { public: A(); init(int parameter, int otherParameter, B* toBeInitialized); prot...

Parameter based bindings in ninject 2.0

I want to use conditional binding in ninject, based on passed parameters. I have something like below: public class Subject { } public interface ITarget { } public class Target1 : ITarget { } public class Target2 : ITarget { } And now I need to instantiate ITarget interface: public void MethodName(IKernel kernel) { ...

How to pass specific variable in PHP function

I have a PHP function that requires can take 3 parameteres... I want to pass it a value for the 1st and 3rd parameters but I want the 2nd one to default... How can I specify which ones I am passing, otherwise its interpreted as me passing values for the 1st and 2nd slots. Thanks. ...

Problem in IE8 with GET Parameters in opening a new windows with javascript.

Hi, I have a problem with IE8 and the opening of a new window with javascript and submitting parameters with special characters. <a href="javascript:oWin('/html/de/4664286/printregistrationcontent.html?12-security question&#61;Wie hei&#223;t Ihr Lieblingsrestaurant','PRINT',800,600);" class="print">Seite drucken</a> The Problem is th...

CakePHP passing parameters to action

Hi im kinda new in cakephp and having a lot of trouble adjusting.. Here's my biggest problem .. Im trying to pass a parameter to an action, it does load, but when my script goes from the controller to the view, and goes back to the controller again, its gone. CONTROLLER CODE function add($mac = 0) { if(isset($this->params['form'][...

Enum as a Parameter in Dynamics AX

My report has a parameter which uses a base enum. The enum has 4 different options to choose when running the report. How do I insert an option which uses all 4 at once? For example, I have an enum named Phone and it has 4 types: 1 = None, 2 = Home, 3 = Mobile, 4 = Work. In a drop down, how do I add option 5 = None+Home+Mobile+Work? T...

How to pass a variable number of parameters to a SQL Server stored procedure ?

I used SQL Server 2005 for my small web application. I Want pass parameters to SP . But there is one condition. number of parameter that can be change time to time. Think ,this time i pass name and Address , next time i pass name,surname,address , this parameter range may be 1-30 , ...

Function parameter types in Python

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 ...

two controllers with same params

i have 2 actions public ActionResult FilesAdd(int id) { FillParentMenuDDL(id); return View(); } [HttpPost] public ActionResult FilesAdd(int id) { //some logic... FillParentMenuDDL(id); return View(); } but it is error because of same parameters, but i need only one param...

Can I indicate where my MySQL parameter should go more meaningfully than just having a ? to mark the position - using ODBC connectors and .NET

I've got a chunk of code where I can pass info into a MySQL command using parameters through an ODBC connection. Example code showing surname passed in using string surnameToLookFor: using (OdbcConnection DbConn = new OdbcConnection( connectToDB )) { OdbcDataAdapter cmd = new OdbcDataAdapter( "SELECT Firstname, Address, Postcode ...

URL rewrite with ?lang= parameter

my developer is saying that it is not possible to rewrite url form example.com/name/name/?lang=english to example.com/en/name/name/ is it possible to do or not? if yes, how should it be done? if not, what could be the reasons? we have windows based hosting from maddogdomains (godaddy) ...

PHP Function parameters - problem with var not being set

So I am obviously not a very good programmer. I have written this small function: function dispAdjuggler($atts) { extract(shortcode_atts(array( 'slot' => '' ), $atts)); $adspot = ''; $adtype = ''; // Get blog # we're on global $blog_id; switch ($blog_id) { case 1: // root blog HOME page if (is_home()) { ...

Log4j Dynamic Parameter

Hi. i have a j2ee web application running on spring framework and using log4j for logging. I have this line in my log4j.properties file. this will insert the logs in my database. How do I set a dynamic value in the message part so that I can somehow append the currently logged in user. The bean object containing info for the current user...

C/C++ method parameter hints in Eclipse

Hello, is there any way how to enable Eclipse to show hints for parameters of C/C++ functions. When I press Ctrl + Shift + Space it shows only types of parameters but not the names. And is there also any way Eclipse can show parameter hints automatically when ( is pressed? Thanks for any advice. ...

ajax parameter to send correctly a variable to a specified url

I am trying to send data to a servlet from a js file but the servlet never received the parameter. so this is what I have: function showProject(prj) { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Browser does not support HTTP Request"); return; } var url="ServletxmlGenerator"; idprj = prj.options[prj.selectedIndex...

Superfluous python parameters

I've noticed a discrepancy in the way that python parameters are called. In every other language I've dealt with, you either have foo() meaning either no parameters, or as many parameters as you like, or foo(arg1, arg2,...,argn) where you pass in the same number of parameters to define the function and call it. In python howev...