argument

Argument passing in c# does not work as should ? Inside function used reflection.

Hi all, I am passing one parameter/object to the function "RefValTest(object oIn)" by the value but after function call is over object passed by the value is changed, that shoud not happened, right ? class MilanTest { public int SomeValue { get; set; } } class PR { public static object RefValTest(ob...

Python __init__ issue: unbound method __init__() must be called with Bank instance as first argument (got int instance instead)

class Teller(object): def __init__(self): self.occupied = False self.timeLeft = 0 self.totTime def occupy(self, timeOcc): self.occupied = True self.timeLeft = timeOcc def nextMin(self): self.timeLeft -= 1 self.totTime += 1 if self.timeLeft == 0: sel...

Why won't gcc compile a class declaration as a reference argument?

This compiles fine in Visual studio, but why not in XCode? class A() {}; someMethod(A& a); someMethod(A()); //error: no matching function call in XCode only :( Is this bad form? it seems annoying to have to write the following every time: A a; someMethod(a); //successful compile on Xcode Am i missing something? I am not very...

Figure out function argument from custom struct?

I have a function which takes a custom struct as the argument. how can I figure out what the argument should be? I know it is a date format of sorts... (C library imported to Objective-C...) Struct: typedef struct { /** The number of day in the hebrew month (1..31). */ int hd_day; /** The number of the hebrew month 1..14 (...

NSInvalidArgumentException: *** -[NSPlaceholderString initWithFormat:locale:arguments:]: nil argument

Found the answer. It was a silly mistake from my part. I did not convert NSNumber to int like how I was supposed to. Thanks for reading ...

argument order in cygwin gcc 4.3 matters when linking with glib-2.0

I am trying to compile code that works on os x and linux using cygwin. However, I am finding that the argument order to gcc gives unanticipated results. For example, the following fails: gcc -std=gnu99 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -lglib-2.0 -lintl -liconv -fgnu89-inline -fno-leading-underscore -o nb-learn.exe n...

Warning: array_multisort() [function.array-multisort]: Argument #1 is expected to be an array or a sort flag in

Hi, the following code produces the error in the title. I've tried to google it, but all I got were pages who got the same error (and not an explanation thereof). This isn't really a problem since it's actually working and cancelling the error out with the @ works out just fine. Though I'm still wondering why I haven't been able to execu...

Visual Studio 2010 (Argument Exception)

Hi, I get the following exception: 'Cannot find the method on the object instance' when I hover over a property of one of my classes in Visual Studio 2010. Any ideas? ...

multiple argument list with NS_REQUIRES_NIL_TERMINATION

Hello I have a function -(id) func: params1, ... NS_REQUIRES_NIL_TERMINATION and2: params2, ... NS_REQUIRES_NIL_TERMINATION; Compiler says: error: expected `;' before 'and2' Is there any way to make function with 2 argument lists? ...

C++ vector reference parameter

Hello folks, let's say we have a class class MyClass { vector<vector<int > > myMatrice; public : MyClass(vector<vector<int > > &); } MyClass::MyClass(vector<vector<int > > & m) { myMatrice = m; } During the instanciation of MyClass, I pass a big vector < vector < int > > and I find that the object is actually copied and not ...

Webcombo return error when trying to populate based on another WebCombo

This has gotten me completely frustrated I have a few webcombo boxes that are hierachial: Continent Country When the form loads everything works fine, when I change the continent the first time, the country repopulates correctly. However if I change the continent a second time I receive an error: Specified argument was out of the...

AS3: How can I require a method argument to implement multiple interfaces?

The argument to my method func() must implement the two unrelated interfaces IFoo and IBar. Is there a better way of doing this than declaring another interface only for this purpose that inherits from IFoo and IBar and using that interface as the argument type? public interface IFooBar extends IFoo, IBar { } public function func(arg:I...

A/UX cc compiler errors on trivial code: "declared argument argc is missing"

On a quite ancient UNIX (Apple A/UX 3.0.1 for 680x0 processors) using the built-in c compiler (cc), this issue arrises. Here is the code I'm trying to compile: #include <stdlib.h> #include <stdio.h> int main() int argc; char **argv; { if (argc > 1) puts(argv[1]); return (EXIT_SUCCESS); } And here is the o...

javascript - How to pass an argument in a function call?

function rp_marcadesmarcaFarm(valor) { FM_log(3, "marcadesmarcaFarm called = "+valor); for (i = 0; i < farmList.length; i++) { var arr = farmList[i].split("|"); var xy = arr[0].split(","); var fvillageId = xy2id(parseInt(xy[0]), parseInt(xy[1])); GM_setValue("farmAtivada_"+suffix...

Can I pass an argument to a VBScript (vbs file launched with cscript)?

...

Windows Workflow Foundation 4 (WF4) Arguments

I am working on a WF4 project for manager's to approve requests made to them for resources needed. I and am passing in an argument of a custom type, a class called "Request". The Request class contains a List of type Player where "Player" is another class I've created to represent the approving manager. I'm using the DataContract Seri...

Using argument (this) passed via element eventhandler

Hey guys, I want to use the argument I pass (this) in a JS function and treat it as an jQuery variable. Example: <script> function useMe(obj){ $(obj).val(); ... ... ... } </script> <select id="selectid" onChange="useMe(this)"> <option>......</option> </select> Is there a possibility to treat the passed argument as ...

Can't start Tomcat 6.0.26 after update to Debian Squeeze

Working Tomcat setup stopped working after dist-upgrade on Debian (to Squeeze). 8005 is the shutdown port but it is not occupied. Any ideas on what it may be? It's not quite self-speaking exception. This is log from catalina: org.apache.catalina.core.StandardServer await SEVERE: StandardServer.await: create[8005]: ...

jquery - pass $(this) as argument?

$(document).ready(function() { function GetDeals() { alert($(this).attr("id")); } $('.filterResult').live("click", function(event) { GetDeals(); }); }); What do I need to pass as argument in function GetDeals() so that I can manipulate with $(thi...

How to specify arguments to a SWF loaded using a SWFLoader whose source was a ByteArray?

When a path is specified as the source argument of a SWFLoader, arguments can be appended to the path so that the SWF runs with the desired arguments. <mx:SWFLoader id="mySwf" source="pathOfSwf.swf?arg1=1"/> How do you do the same thing when instead of a path you specify a ByteArray as the source argument of a SWFLoader. <mx:SWFLoade...