parameter-passing

PHP: question about passing parameters in URL's

Hi, i have this two lines: var_dump($parametros_post_signin); $this->redirect('prueba/aux?email='.$parametros_post_signin['signin']); the first one prints this: array 'signin' => array 'email_address' => string '' (length=0) 'password' => string '' (length=0) the second one takes to another action where i h...

Passing list and dictionary type parameter with Python

When I run this code def func(x, y, *w, **z): print x print y if w: print w if z: print z else: print "None" func(10,20, 1,2,3,{'k':'a'}) I get the result as follows. 10 20 (1, 2, 3, {'k': 'a'}) None But, I expected as follows, I mean the list parameters (1,2,3) matching *w, and dictionary matching **...

How to pass values between two Custom UITableViewCells in iphone

I have two customized cells in an iphone UITableViewController and would like to capture the data in one cell into another..... I am currently unable to post images and pls assume the following points. There are two custom UITableViewcells 1) Notes Textfield in one customcell 2) Submit button in another text field. Now i want to pass ...

Parameter becoming zero somewhere

Hey guys, Something really weird is happening: when I call foo(100*1.0f), somewhere along the line that becomes 0. To verify I put a breakpoint on foo(), and it indeed is zero and it indeed gets called with 100*1.0f. The code is in Obj-C++. Here is the calling function in XCode's GDB frontend, as you can see, score*scoreMultiplier is ...

Passing 2D part of a 3D multidimensional array as a 2D method parameter array in C#

What I would like to do in my code is something like that below: public static class DataClass { public static byte[,,] Array3d = { { {0,0},{0,0}},{{0,0},{0,0}}}; } class MyClass { public MyClass() { someMethod(DataClass.Array3d[0]); someMethod(DataClass.Array3d[1]); } void someMethod(byte[,]) ...

Detect if parameter passed is an array? Javascript.

Hello all, I have a simple question: How do I detect if a parameter passed to my javascript function is an array? I don't believe that I can test: if (typeof paramThatCouldBeArray == 'array') So is it possible? How would I do it? Thanks in advance. ...

jQuery select by class and pass current element as parameter in ASP.NET

Hello all, Here is my code: $(document).ready(function(){ $('.classOne').mouseover(function(e) { alert($(e).attr('id')); }); }); Now, I know that something is actually wrong with my code, what will be correct in order to get the result with the ID of the current asp:LinkButton that I hovered in the alert() ...

How to pass object array as parameter in java

The method is public static void method(Object[] params), how should I call it in the following scenarios? with one object as parameter ClassA a with more than one objects as parameters ClassA a, ClassB b, ClassC c? thank you ...

How to Pass complex objects in ASP.NET MVC using Get parameters?

I am wanting to pass something like the following to my view from my controller via GET not POST: public class MyDTO { public string val1 { get; set; } public string val2 { get; set; } public MyObject obj { get; set; } } public class MyObject { public int SomeInt { get; set; } public string ACoolValue { get; set; } pu...

Urls parameters doesn't encoding correctly!

I'am using asp.net mvc version 1.0 and I've a problem with some parameter in a url! My url is look like so(http://localhost:2282/Tags/PostList/c#) routes.MapRoute( "TagsRoute", "Tags/PostList/{tag}", new { controller="Tags",Action="PostList",tag = "" } ); In effect the problem is that tag para...

$.(ajax) wrapper for Jquery - passing parameters to delegates

I use $.(ajax) function extensively in my app to call ASP.net web services. I would like to write a wrapper in order to centralize all the ajax calls. I found few simple solutions, but none address an issue of passing parameters to delegates, for example, if i have: $.ajax({ type: "POST", url: "http://localhost/Templat...

Passing objects by reference or not in C#

Suppose I have a class like this: public class ThingManager { List<SomeClass> ItemList; public void AddToList (SomeClass Item) { ItemList.Add(Item); } public void ProcessListItems() { // go through list one item at a time, get item from list, // modify item according to class' purpose ...

How do I mock a method with an open array parameter in PascalMock?

I'm currently in the process of getting started with unit testing and mocking for good and I stumbled over the following method that I can't seem to fabricate a working mock implementation for: function GetInstance(const AIID: TGUID; out AInstance; const AArgs: array of const; ...

Difference between double... and double[] in formal parameter type declaration

I have question: what is the difference between these two declarations? public static void printMax(double... numbers) { ... } public static void printmax(double numbers[]) { ... } Is double... numbers the same as double numbers[]? ...

jquery dialog calls a server side method with button parameters

Hello all, I have a gridview control with delete asp:ImageButton for each row of the grid. What I would like is for a jquery dialog to pop up when a user clicks the delete button to ask if they are sure they want to delete it. So far I have the dialog coming up just fine, Ive got buttons on that dialog and I can make the buttons call s...

How do C++ compilers actually pass reference parameters?

This question came about as a result of some mixed-language programming. I had a Fortran routine I wanted to call from C++ code. Fortran passes all its parameters by reference (unless you tell it otherwise). So I thought I'd be clever (bad start right there) in my C++ code and define the Fortran routine something like this: extern "C" ...

what functions are called when passing value to function

In C++, if an object of a class is passed as a parameter into a function, the copy constructor of the class will be called. I was wondering if the object is of nonclass type, what function will be called? Similarly in C, what function is called when passing values or address of variables into a function? Thanks and regards! ...

How to pass parameters for OPENDATASOURCE

I can connect to a linked server with this: SELECT testNo, soruTuruId, soruNo, cevap , degerlendirenTcNo, degerlendirilenTcNo FROM OPENDATASOURCE('SQLOLEDB', 'Data Source=192.168.150.42;User ID=readerUser;Password=1').akreditasyon.dbo.tblPerfCevap But I have to pass the password as parameter. and I try like this: SET @connectionStri...

How to pass parameters from one controller to another in CakePHP?

Can anyone tell me how to pass parameters to a function in another controller in cakephp? ...

Is it worth the trouble to avoid using the SqlParameterCollection.AddWithValue method?

Several articles tells you that you should avoid using AddWithValue method because it can lead to poor execution plans and performance. Should I go through my DAL and change all parameters to specify the SqlDbType? Is it worth the loss in maintainability? (If I change a column-type from varchar(50) to varchar(100) I would need to change ...